VKVlad KulikovPublic / lectures
Modern LLMs10 / 20

Module 10. KV Caches and Efficient Inference

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 / 20 · Correct: 0

Question 10.4.1

10.4. Formalism and worked example A: how many bytes does one token add?

For Llama-3-8B, use 32 layers, 8 KV heads, head dimension 128, and bf16. What is the KV payload per token?

One correct option

Question 10.4.2

10.4. Formalism and worked example A: how many bytes does one token add?

Why does MLA need its own memory formula instead of the standard GQA one?

One correct option

Question 10.5.1

10.5. One request, two computational regimes

Which profile is common for a long prefill and a small-batch decode?

One correct option

Question 10.6.1

10.6. Worked example B: the bandwidth ceiling and the KV term

Use 16 GB of weights, 128 KiB/token, 3.35 TB/s, and batch one. What bandwidth ceiling does the 8B teaching model give at 128K?

One correct option

Question 10.6.2

10.6. Worked example B: the bandwidth ceiling and the KV term

In GQA, which head counts enter KV storage and the teaching QK/AV FLOP estimate?

One correct option

Question 10.7.1

10.7. Batch economics: where weight amortization stops being the whole story

What does the batch knee B* = W / KV(N) mean?

One correct option

Question 10.8.1

10.8. PagedAttention: decouple logical length from physical placement

What problem does PagedAttention solve?

One correct option

Question 10.8.2

10.8. PagedAttention: decouple logical length from physical placement

Why is copy-on-write needed when a partially filled KV block is shared?

One correct option

Question 10.8.3

10.8. PagedAttention: decouple logical length from physical placement

How many unused slots does an exactly 2048-token sequence have with 16-token pages?

One correct option

Question 10.9.1

10.9. Prefix caching: do not rebuild an identical beginning

What does prefix caching give?

One correct option

Question 10.9.2

10.9. Prefix caching: do not rebuild an identical beginning

A 7680-token prefix is cached and a 512-token suffix arrives. Which work remains?

One correct option

Question 10.9.3

10.9. Prefix caching: do not rebuild an identical beginning

Identical token blocks follow different earlier prefixes. Are their KV states interchangeable?

One correct option

Question 10.10.1

10.10. Tiered placement: when HBM is only the first level

What is the main trade-off of tiered KV offloading?

One correct option

Question 10.11.1

10.11. Prefill/decode disaggregation: give each phase its own pool

Why separate prefill and decode onto different device groups?

One correct option

Question 10.12.1

10.12. Code (level 1): geometry, bandwidth, and private pages

How should a KV pool behave when blocks run out during append?

One correct option

Question 10.12.2

10.12. Code (level 1): geometry, bandwidth, and private pages

A cache retains absolute positions [2,5). What should truncate(1) do?

One correct option

Question 10.14.1

10.14. Compression I: eviction changes which history exists

How does eviction based on accumulated attention mass differ from a simple streaming policy?

One correct option

Question 10.15.1

10.15. Compression II: quantization, low rank, and the order of operations

Why does bf16→3 bits per coordinate not guarantee a 16/3 reduction in total memory?

One correct option

Question 10.15.2

10.15. Compression II: quantization, low rank, and the order of operations

Why does the suggested evaluation order leave eviction until last?

One correct option

Question 10.17.1

10.17. Reading a model’s inference passport

What must an inference passport contain besides the weight size?

One correct option