ToolJoltTools

Qwen2.5 72B KV-Cache Calculator

Per-token and total key-value cache memory for Qwen2.5 72B across context length, batch size and cache precision.

โ€”
Per token (KB)
โ€”
Per sequence (GB)
โ€”
Total cache (GB)

Qwen2.5 72B: ~320.0 KB per token at FP16. Qwen2.5 72B is the long-context flagship of the Qwen family โ€” 128K context with GQA, sized almost identically to Llama 3 70B in memory terms.

Formula

cache/token = 2(K,V) ร— layers ร— kv_heads ร— head_dim ร— bytes = 2 ร— 80 ร— 8 ร— 128 ร— bytes
References: Qwen2.5 72B config.json (Hugging Face); Kwon et al. (2023), PagedAttention / vLLM

Disclaimer: This tool is for general informational and estimation purposes only and is not professional financial, tax, accounting or legal advice. All figures are estimates โ€” verify with a qualified professional before making decisions. Read the full disclaimer.

About Qwen2.5 72B KV-Cache Calculator

The KV cache is the hidden memory cost of serving Qwen2.5 72B: every generated or prompted token stores its attention keys and values for reuse, and at long contexts this cache can rival the model weights themselves. This calculator uses Qwen2.5 72B's exact attention geometry (8 KV heads ร— 128-dim heads ร— 80 layers) to give per-token, per-sequence and whole-batch cache sizes at FP16, FP8 and INT4 precision. Use it to size batch limits for your GPU or to see what a 128K-context request really costs.

How to use Qwen2.5 72B KV-Cache Calculator

  1. 1Enter your values into Qwen2.5 72B KV-Cache Calculator โ€” sensible, domain-typical defaults are pre-filled so you see a real result immediately.
  2. 2The result recomputes live using the formula shown on the page; there is no button to press.
  3. 3Adjust any input to compare scenarios, then read the worked example to see the substituted numbers.

Why use Qwen2.5 72B KV-Cache Calculator?

  • โœ“Computes Qwen2.5 72B KV-Cache instantly in your browser โ€” no sign-up, no upload, no server round-trip.
  • โœ“100% free and unlimited, with the exact formula shown: cache/token = 2(K,V) ร— layers ร— kv_heads ร— head_dim ร— bytes = 2 ร— 80 ร— 8 ร— 128 ร— bytes.
  • โœ“Runs entirely client-side, so every value you enter stays private on your device.
  • โœ“Live recompute as you type, with a worked example and authoritative references for trust.

Frequently asked questions

Qwen2.5 72B vs Llama 3 70B โ€” which needs more VRAM?+

They are nearly identical: ~145 GB vs ~141 GB at FP16 for weights, both with 80 layers and 8 KV heads. Qwen's larger 152K vocabulary adds a slightly bigger embedding table; the real difference is Qwen's native 128K context support.

What does a 128K-token request cost in KV cache on Qwen2.5 72B?+

About 2 ร— 80 ร— 8 ร— 128 ร— 131072 ร— 2 bytes โ‰ˆ 40 GB at FP16 โ€” half an H100 for one request. Production long-context serving uses FP8 KV cache (~20 GB) and chunked prefill to keep batches viable.

Why does the KV cache matter more than weights for serving throughput?+

Weights are paid once per GPU; cache is paid per concurrent request and per token of context. Batch size โ€” and therefore throughput โ€” is capped by how many sequence caches fit in the VRAM left after weights, which is exactly what this tool computes.

What does paged attention change?+

PagedAttention (vLLM) allocates the cache in fixed-size blocks on demand instead of reserving the full context up front, eliminating fragmentation and letting you overcommit. The per-token cost shown here is unchanged โ€” you just stop paying for unused reservation.

Related tools

Related ML & AI tools

Sponsored