10 users can crash a 48 GB GPU running a 13B model. The maths says 60 GB.
An interview-style post: a 13-billion-parameter model is deployed on a 48 GB GPU, only 10 users are on it, and the server still dies with CUDA out of memory. The caption blames the KV cache, uncontrolled concurrency and memory fragmentation, and prescribes continuous batching (vLLM, TensorRT-LLM, TGI), capping tokens and context, keeping 10 to 15 percent of memory free, and queueing with backpressure.
- 26 GB13B weights, fp16
- 0.8 MBKV per token, 13B
- 60 GB10 users × 4k tokens
- A 13B model needs about 26 GB in fp16, so 48 GB looks like plenty.13 billion parameters at 2 bytes each is 26 GB before anything else is loaded. The weights are the smallest part of the surprise.
- The KV cache is what actually fills the card.For Llama-2-13B (40 layers, hidden size 5,120) every token keeps 2 × 40 × 5,120 × 2 bytes ≈ 0.8 MB of keys and values. A 4,096-token conversation is 3.4 GB. Ten of them are 34 GB. Add 26 GB of weights and you are at 60 GB on a 48 GB card.Llama 2: Open Foundation and Fine-Tuned Chat Models (Table 1)
- KV growth is exponential.It is linear: tokens × concurrent sequences × a fixed per-token cost. Linear is enough to kill you, but calling it exponential leads people to the wrong fixes.Efficient Memory Management for Large Language Model Serving with PagedAttention
- Fragmentation means a free 15 GB may have no 3 GB block to give.The vLLM paper measured 60 to 80 percent of KV memory wasted by fragmentation and over-reservation in earlier servers. PagedAttention fixes it by storing the cache in fixed-size blocks, the way an operating system pages memory.Efficient Memory Management for Large Language Model Serving with PagedAttention
- Set gpu_memory_utilization=0.85 in vLLM.vLLM's default is 0.9; the post's 0.85 is a reasonable choice, not the setting that prevents the crash. What prevents it is that vLLM pre-allocates the KV budget inside that fraction and admits only as many sequences as fit.vLLM engine arguments
the line to remember
Serving memory = weights + (tokens × concurrent users × per-token KV cost). Size the card for the cache, not the model.
For your product
If a vendor quotes you a GPU from the model size alone, the quote is wrong. Ask for the per-token KV cost, the context cap and the concurrency cap; those three numbers decide whether the box is enough.
Sources: Llama 2: Open Foundation and Fine-Tuned Chat Models (Meta) · Efficient Memory Management for LLM Serving with PagedAttention (UC Berkeley (vLLM)) · vLLM engine arguments (vLLM)