Interview question bank
Explain the mechanism and why it is useful before naming an equation. Answer aloud, then check the response.
How do efficient, sparse, and compressed attention differ?
An efficient dense kernel changes execution. Sparsity removes comparisons. Compression replaces historical representations. Each changes a different cost and carries a different quality risk.
What does multi-token prediction change?
It adds training targets for future offsets. Those forecasts can help representations or supply drafts, but they are not automatically a causally valid continuation.
Why is local attention useful and limited?
It bounds each layer’s visible neighborhood. Information can travel farther through stacked layers, but structural reach does not guarantee that distant details survive or are retrieved.
Why mix local and full layers?
Local layers reduce work and retained history while full layers restore direct long-range access. The schedule is a hypothesis about the workload, not a universal quality-preserving substitution.
Why does pooling historical keys and values change attention?
A summary merges distinctions between individual entries. Softmax over the summary cannot reproduce choosing among the original entries, so exact retrieval can fail even when broad context remains useful.
What does latent attention store?
A shared smaller representation from which head-specific content keys and values are derived, together with the required positional information. It changes both the memory representation and the computation.
Why can linear projection be absorbed into a query?
Matrix associativity lets a fixed key reconstruction transform move to the query side of a dot product. Position-dependent transforms or nonlinearities can invalidate that simple reassociation.
Why separate the rotary branch in MLA?
Rotating reconstructed content keys introduces a different transformation at each position. A separate positional branch keeps the content path compatible with latent-space reassociation.
Why compare MLA with GQA rather than only full MHA?
GQA already shares KV memory. The relevant baseline may be much smaller than full multi-head attention, so a favorable comparison against MHA can overstate the deployment benefit.
How does speculative decoding preserve the target?
The target verifies the draft. Greedy mode keeps the matching prefix; exact sampling uses acceptance and a correction distribution. After rejection, the dependent draft suffix is discarded.
When does speculation fail to speed up generation?
Low acceptance, expensive drafting, or verification overhead can outweigh the work saved. Emitting more tokens per round is not by itself a wall-clock speedup.
What does an architecture experiment need to establish?
An isolated change, a declared baseline and budget, correct mechanics, repeated runs, and measurements of quality and cost. A changed project plan or an undertrained proxy is not evidence that a mechanism cannot work.
Exercises
One filled dot is a short explanation, two require diagnosis, and three require a system design. Draw the relevant mechanism before checking the solution.
E1. ●○○ Explain why applying a sparse mask to a dense kernel may save no work.
E2. ●○○ Why can a smaller cache produce slower inference?
E3. ●●○ A local model can structurally reach an old fact but fails to copy it. Is that contradictory?
E4. ●●○ A speculative draft disagrees with the target halfway through. What happens next?
E5. ●●● Design a fair evaluation of compressed versus full history.
E6. ●●● An architecture wins once on a tiny model. What evidence would justify a broader claim?
Worked solutions
Follow the reasoning, including the assumption that makes each answer valid.
E1. The kernel may calculate every score before masking, and the mask itself may be large. Actual savings require an implementation that skips disallowed relationships efficiently.
E2. The representation may require extra projections or poorly supported kernels. Other work can dominate memory reads. Measure the actual implementation rather than inferring speed from storage alone.
E3. No. A path permits influence but does not preserve exact identity. Intermediate layers may mix or discard the fact, and learned attention may not use the path. Test retrieval separately from structural reach.
E4. Keep the accepted prefix, replace the mismatch according to the declared greedy or sampling rule, and discard later draft tokens. Their predictions depended on a prefix that is no longer valid.
E5. Fix data, training and scoring contracts. Test exact copying, distant fact retrieval, ordering, and broader quality at different lengths and insertion depths. Include compression boundaries and partial blocks. Report quality, actual retained tensors, compression overhead, prefill, and decode.
E6. Repeat the comparison under controlled budgets and inspect uncertainty and learning curves. Check that implementations realize the intended savings. Test relevant scales and tasks, and isolate other changed components. If resources cannot resolve the comparison, report it as inconclusive.