VKVlad KulikovPublic / lectures
Modern LLMs5 / 20

Module 5. Modern Attention Mechanisms

Choose your answers and select “Check”. Numbers accept a decimal point, comma, or simple fraction. Answers and drafts are saved in this browser and shared between RU/EN.

Checked: 0 / 23 · Correct: 0

Question 5.4.1

5.4. SDPA, masks, and the square-root scale

Why does SDPA divide dot products by dh\sqrt{d_h}?

One correct option

Question 5.4.2

5.4. SDPA, masks, and the square-root scale

Which keys may query position 5 attend to with W=3 including the current position?

One correct option

Question 5.4.3

5.4. SDPA, masks, and the square-root scale

Why can SDPA is_causal=True be wrong for one query after a prefix?

One correct option

Question 5.5.1

5.5. Worked storage arithmetic: four head layouts and one hybrid model

Under which storage policy does the gpt-oss-120b K/V estimate at 131,072 positions fall from 9 to 4.504 GiB?

One correct option

Question 5.5.2

5.5. Worked storage arithmetic: four head layouts and one hybrid model

What does the 56.89× factor mean in the teaching MLA comparison?

One correct option

Question 5.6.1

5.6. GQA is a grouping invariant, not a quality guarantee

With Hq=64H_q=64 and Hkv=8H_{kv}=8, what is the GQA group size g=Hq/Hkvg=H_q/H_{kv}?

One correct option

Question 5.6.2

5.6. GQA is a grouping invariant, not a quality guarantee

Which quality conclusion is supported by the original GQA paper?

One correct option

Question 5.7.1

5.7. MLA: cache a shared latent and move the projections

Why does MLA decouple the RoPE branch when absorbing projections?

One correct option

Question 5.7.2

5.7. MLA: cache a shared latent and move the projections

How can q^T A c be evaluated without expanding key A c?

One correct option

Question 5.8.1

5.8. FlashAttention: dense attention without the quadratic HBM object

Which three quantities does online softmax carry across tiles?

One correct option

Question 5.8.2

5.8. FlashAttention: dense attention without the quadratic HBM object

What does FlashAttention make linear in sequence length?

One correct option

Question 5.8.3

5.8. FlashAttention: dense attention without the quadratic HBM object

What should online softmax do with a fully masked tile before any allowed key?

One correct option

Question 5.8.4

5.8. FlashAttention: dense attention without the quadratic HBM object

Why does streaming computation not guarantee linear memory for the whole program?

One correct option

Question 5.9.1

5.9. Windowed attention and layer schedules

What does distance L(W−1)L(W-1) describe for L consecutive local layers with equal windows W, including the current position, and no dilation?

One correct option

Question 5.10.1

5.10. “Attention sink” refers to two different objects

How is the learned sink implemented in gpt-oss?

One correct option

Question 5.10.2

5.10. “Attention sink” refers to two different objects

Why can an ordinary fixed key not generally replace a constant learned sink?

One correct option

Question 5.10.3

5.10. “Attention sink” refers to two different objects

Does adding 2 only to token logits preserve the result when a learned sink is fixed?

One correct option

Question 5.11.1

5.11. Sparse attention: selecting a subset of positions

When was DSA officially introduced?

One correct option

Question 5.11.2

5.11. Sparse attention: selecting a subset of positions

How does the original MoBA score a block?

One correct option

Question 5.11.3

5.11. Sparse attention: selecting a subset of positions

With N=2048, d=32, r=8, k=64, what is (Nr+kd)/(Nd)?

One correct option

Question 5.12.1

5.12. A transparent NumPy reference

Why can a fully masked row produce NaN even before a division by zero?

One correct option

Question 5.14.1

5.14. Reading gpt-oss configuration and code

Why does np.tile give the correct shape but wrong GQA grouping?

One correct option

Question 5.16.1

5.16. Multimodal attention: where image information is stored

What does 4096 × 72 KiB = 288 MiB count for early-fusion visual tokens?

One correct option