11 · Spend fewer bytes and steps

Deep systems understanding · Study map 52 of 85

KV precision and architectural compression

Suggested preparation: Quantization: fewer bits, different errors

Picture it

If weight quantization shrinks the vast library of a model's brain, KV compression shrinks the scratchpad it uses during a conversation. Imagine multiple readers sharing a single massive reference book; instead of each reader copying the same background chapters into their own notes, they share a compressed summary. Techniques like grouped-query attention pool these shared context notes, freeing up space to host entirely new conversations in the same room.

What to understand

  • KV precision, scale calibration, cache capacity, and attention accuracy
  • GQA/MQA versus MLA; architecture and backend compatibility

Follow the references

  1. 1 · Documentation

    vLLM · Quantized KV cache ↗

    Read accuracy and scaling-factor guidance before enabling low-precision KV.

  2. 2 · Paper

    DeepSeek · DeepSeek-V2 ↗

    Use the MLA diagram to contrast latent cache storage with ordinary per-head KV.

Make it concrete

Hold weight precision fixed; compare KV formats supported by the backend. Sweep context length and measure memory, retrieval accuracy, and decode latency.

You understand it when…

Why can KV compression matter more than weight compression at very long contexts?

This is a study map. Follow the reference for the full explanation; use the question to test your mental model. Browse the reference shelf.