Interactive GGUF / EXL2 VRAM, KV-Cache & tok/s Calculator

Model exact memory footprints, concurrent batch throughput, prompt prefill speeds, and electricity cost per 1M tokens across 16 GPUs and Apple Silicon machines.

JetBrains IDE Plugin

Switching Between Local Ollama, vLLM & Cloud API Keys? Try EnvGuard for JetBrains

Prevent accidental leaks of OPENAI_API_KEY, HF_TOKEN, and GPU cluster credentials inside PyCharm, IntelliJ IDEA, and WebStorm before git push.

Explore JetBrains Plugins & Kits ->

Frequently Asked Questions

How is KV cache VRAM calculated?

For standard Grouped-Query Attention (GQA) models, KV cache bytes equal 2 * layers * kv_heads * head_dim * bytes_per_element * context_length * batch_size. DeepSeek-R1 uses Multi-Head Latent Attention (MLA), shrinking KV cache to ~0.07 MB/token.

How much VRAM does Q8_0 or Q4_0 KV cache save?

Quantizing the KV cache from FP16 to Q8_0 cuts KV memory by ~47% with negligible quality impact, while Q4_0 cuts KV memory by ~72% for 64K-128K contexts.

Why does partial CPU offload drop tok/s so sharply?

When model layers spill from 1,000+ GB/s GPU VRAM into ~50-80 GB/s DDR5 system RAM over PCIe, sequential token generation becomes bottlenecked by the slowest offloaded layers.