Mistral AIMachine Learning Engineer · Phone ScreenCodemia practiceEstimate KV Cache Memory for Grouped-Query and Sliding-Window Models
For a 7B-class decoder with 32 layers, 32 query heads, 8 key/value heads, head dimension 128 and fp16 KV, compute the KV cache size per token, for one 32k-token sequence, and for a batch of 64, then show how a 4,096-token sliding window changes the answer.