Skip to content

KV cache

The KV cache stores each previous token's key and value tensors so a transformer doesn't recompute them at every generation step.

  • KV cache
  • key-value cache
  • attention cache
  • transformer inference memory
  • context length
  • grouped query attention
  • multi-query attention
  • VRAM sizing
  • batch size inference