Reported interview periodNov 2025–Sep 2026
Debug a minimal transformer computation
A small NumPy model produces incorrect attention outputs and fails to learn. Implement corrected versions of four operations used by a decoder-style model. The model dimension is small and attention uses one he…
Practice focusScenario A small NumPy model produces incorrect attention outputs and fails to learn. Implement corrected versions of four operations used by a decoder-style model. The model dimension is small and attention uses one head, so focus on tensor semantics rather than framework APIs. Interface Requirements pos embed Return token representations with positional embeddings added elementwise. Shapes must match or broadcast unambiguously. attention - Compute scaled dot-product attention using a scale of 1 / sqrt(d k) .…