medium10 pts · first answer countsllm-servinggpu-memory
KV cache size for one long request
A model has 32 layers and hidden size 4096, uses standard multi-head attention and stores the KV cache in fp16. Roughly how much KV cache memory does one 4,096-token sequence need?
Discussion 0
Join free to post in the discussion.
Related questions
- Memory for 7B parameters in fp16MLOps Engineer
- Where GPU tensors liveMLOps Engineer
- Reading a CUDA OOM errorMLOps Engineer
- First thing to try after OOMMLOps Engineer
- Memory during evaluationMLOps Engineer
- Serving many fine-tuned variantsMLOps Engineer
- Allocated and reserved memoryMLOps Engineer
- empty_cache does not helpMLOps Engineer