Skip to content
Artwork for LLM.co
LLM.co · Today · 5 min

KV Cache Math: How Many Users Can One GPU Actually Handle?

Deploying a private LLM and wondering how far a single GPU can actually stretch? The answer isn't in the model's parameter count — it lives in the KV cache. This episode of LLM.co walks through the memory arithmetic that governs real-world concurrency, drawing on the KV cache concurrency deep-dive to turn an abstract infrastructure question into a planning tool any team can use. The episode covers the full picture, from first principles to production monitoring: What the KV cache actually holds — key and value tensors for every token, every layer, every active session, all sitting in GPU memory until the session ends. The per-token cost formula — a short equation using layer count, KV head count, head dimension, and bytes per element, pulled directly from a model's config file. Grouped-query attention's quiet advantage — why modern open-weight models with fewer KV heads produce a dramatically smaller cache footprint than older architectures. Concurrency worked examples — Llama 3.1 8B on an H100 supports roughly 107 concurrent users at a 4K context window, but that number collapses to about 3 at 128K; doubling context length roughly halves capacity, linearly, with no exceptions. The 70B model crossroads — why weight memory alone forces a hardware decision (H200, multi-GPU tensor parallelism, or INT4 quantization) before cache sizing even begins. Two concurrency multipliers — PagedAttention's virtual-memory approach to cache management, and KV cache quantization (FP8, NVFP4), which can more than quadruple the user count at long context lengths without touching the model weights. The production metric that actually matters — why KV cache utilization above 90% signals hidden queuing and rising tail latency even when GPU compute appears healthy. A key practical takeaway: when an organization specifies a maximum context length in an RFP or service agreement, they are implicitly making a hardware budget commitment. That single configuration knob sets the GPU count on the bill of materials. Teams building custom private AI chatbots or any high-concurrency deployment need to run this math before finalizing infrastructure — not after. For organizations operating in regulated environments where hardware choices are constrained, the same arithmetic applies whether the stack runs in a commercial data center or an air-gapped offline deployment. Full worked examples, model-specific numbers, and a sizing calculator are available on the LLM.co blog. For more on the economics of AI hardware, check out the earlier episode The Sticker Gap: Why Every GPU Now Costs More Than Its Launch Price. LLM.co hardware.co

0:00-5:50

transcript

No transcript — this publisher did not publish one.

show notes

Deploying a private LLM and wondering how far a single GPU can actually stretch? The answer isn't in the model's parameter count — it lives in the KV cache. This episode of LLM.co walks through the memory arithmetic that governs real-world concurrency, drawing on the KV cache concurrency deep-dive to turn an abstract infrastructure question into a planning tool any team can use.

The episode covers the full picture, from first principles to production monitoring:

  • What the KV cache actually holds — key and value tensors for every token, every layer, every active session, all sitting in GPU memory until the session ends.
  • The per-token cost formula — a short equation using layer count, KV head count, head dimension, and bytes per element, pulled directly from a model's config file.
  • Grouped-query attention's quiet advantage — why modern open-weight models with fewer KV heads produce a dramatically smaller cache footprint than older architectures.
  • Concurrency worked examples — Llama 3.1 8B on an H100 supports roughly 107 concurrent users at a 4K context window, but that number collapses to about 3 at 128K; doubling context length roughly halves capacity, linearly, with no exceptions.
  • The 70B model crossroads — why weight memory alone forces a hardware decision (H200, multi-GPU tensor parallelism, or INT4 quantization) before cache sizing even begins.
  • Two concurrency multipliers — PagedAttention's virtual-memory approach to cache management, and KV cache quantization (FP8, NVFP4), which can more than quadruple the user count at long context lengths without touching the model weights.
  • The production metric that actually matters — why KV cache utilization above 90% signals hidden queuing and rising tail latency even when GPU compute appears healthy.

A key practical takeaway: when an organization specifies a maximum context length in an RFP or service agreement, they are implicitly making a hardware budget commitment. That single configuration knob sets the GPU count on the bill of materials. Teams building custom private AI chatbots or any high-concurrency deployment need to run this math before finalizing infrastructure — not after. For organizations operating in regulated environments where hardware choices are constrained, the same arithmetic applies whether the stack runs in a commercial data center or an air-gapped offline deployment.

Full worked examples, model-specific numbers, and a sizing calculator are available on the LLM.co blog. For more on the economics of AI hardware, check out the earlier episode The Sticker Gap: Why Every GPU Now Costs More Than Its Launch Price.

LLM.co

hardware.co

links6