hard20 pts · first answer countskv-cachetransformersdeployment
Sizing the KV cache
A model has 32 layers, 32 query heads but only 8 key-value heads (grouped-query attention), head dimension 128, and stores the KV cache in 16-bit precision. How much KV cache memory does one 8,192-token sequence need?
Discussion 0
Join free to post in the discussion.
Related questions
- What LLM pretraining learnsAI Engineer (LLM & Generative AI)
- How BPE builds its vocabularyAI Engineer (LLM & Generative AI)
- Tokens per English wordAI Engineer (LLM & Generative AI)
- Why Hindi text uses more tokensAI Engineer (LLM & Generative AI)
- What the end-of-sequence token doesAI Engineer (LLM & Generative AI)
- What the embedding layer doesAI Engineer (LLM & Generative AI)
- Query, key and value in attentionAI Engineer (LLM & Generative AI)
- Why transformers need position informationAI Engineer (LLM & Generative AI)