Worked Calculation — Why Long Contexts Exhaust VRAM
示例
Suppose a serving engine allocates roughly 0.5 MB of KV cache per token for a 70B-parameter model at FP16 precision. Compare the KV-cache VRAM footprint of a single 4,000-token OpsDesk ticket prompt against a single 100,000-token log dump on an 80 GB GPU.
演示讲解
- A single 4,000-token OpsDesk ticket prompt uses 4,000 x 0.5 MB = 2 GB of KV cache. One 80 GB GPU can serve dozens of users concurrently.
- A single 100,000-token log dump uses 100,000 x 0.5 MB = 50 GB of KV cache—leaving almost no memory for a second concurrent user, collapsing throughput and driving up serving cost.