Raw tensor storage is only a starting point. Quantization metadata, unquantized tensors, drivers, runtime buffers and multi-GPU communication add memory. There is no universal overhead percentage.
This is the basic standard-attention cache shape, before allocator overhead. MLA storage depends on the model and backend implementation; it does not provide a universal 82% reduction.
A configuration can fit decoding while exceeding memory during prefill. Context, concurrency, attention kernels and chunked prefill affect peak usage. Safe context is an estimate under this model, not a deployment guarantee.
Bandwidth models describe limits and trends, not measured speed. Compute, kernels, batching, sparse activation, interconnects, host memory and scheduling also matter. Offloading does not necessarily transfer all weights every step or impose a fixed slowdown.
Not at ordinary 4-bit precision: raw weights alone are about 335.5GB in decimal units, before metadata, cache or runtime overhead. Lower precision, offloading and distributed execution require separate capacity analysis.
Attention Cache Memory Reference
One request, FP16 cache, decimal GB. Calculated from catalog layers, KV heads, head dimensions or MLA latent dimensions, before allocator and runtime overhead. These models are not equivalent-capability benchmarks.
Raw attention cache storage by context length
Context
Llama 3.1 8B Instruct
GQA · 8 KV heads · 32 layers
DeepSeek-R1-Distill-Qwen-14B
GQA · 8 KV heads · 48 layers
DeepSeek-R1 (671B Full MoE)
MLA · 576 latent · 61 layers
4k
0.537 GB
0.805 GB
0.288 GB
8k
1.074 GB
1.611 GB
0.576 GB
16k
2.147 GB
3.221 GB
1.151 GB
32k
4.295 GB
6.442 GB
2.303 GB
64k
8.590 GB
12.885 GB
4.605 GB
128k
17.180 GB
25.770 GB
9.211 GB
MHA uses the same 2 × layers × KV heads × head dimension × element bytes × tokens × concurrency shape, with KV heads equal to query heads. The MLA column reflects its catalog compressed-cache dimensions, not a universal compression ratio.
GPU values are catalog specifications. PCIe values are one-direction theoretical data rates after 128b/130b encoding, before protocol, device and software overhead. Neither is measured inference throughput.
Device / Link
GB/s
Basis
NVIDIA GeForce RTX 3060 (12GB)
360
Catalog VRAM bandwidth
NVIDIA GeForce RTX 4090
1008
Catalog VRAM bandwidth
NVIDIA GeForce RTX 5090
1792
Catalog VRAM bandwidth
PCIe 3.0 x8
7.88
Encoded one-direction ceiling
PCIe 3.0 x16
15.75
Encoded one-direction ceiling
PCIe 4.0 x8
15.75
Encoded one-direction ceiling
PCIe 4.0 x16
31.51
Encoded one-direction ceiling
PCIe 5.0 x8
31.51
Encoded one-direction ceiling
PCIe 5.0 x16
63.02
Encoded one-direction ceiling
VRAM Math And Architecture FAQ
Why can a model file fit while inference runs out of memory?
Weights are only part of the footprint. KV cache, activations, drivers, communication buffers and desktop applications consume memory. Long-prompt prefill can peak above decoding. Validate the actual backend and workload.
Can GQA, MHA and MLA cache sizes be compared directly?
Only with explicit layer counts, heads, head dimensions, precision and context. Cross-model examples illustrate storage shapes, not equivalent capability or speed. MLA values assume a backend that stores compressed latent states.
Are weight quantization and KV quantization the same?
No. Formats such as Q4_K_M describe weights. KV precision is independent and depends on the backend, device and attention kernels. Smaller weights do not automatically shrink all caches by the same factor.
Does PagedAttention guarantee a fixed memory saving?
No. Block allocation changes cache management and fragmentation. Utilization depends on block size, request lengths, concurrency and scheduling; a universal percentage is not a substitute for runtime measurement.
Can PCIe bandwidth be converted directly into real token throughput?
No. Encoded-link bandwidth is not effective transfer throughput. CPU execution, weight streaming, kernels and scheduling also matter. The link table is not an inference benchmark and does not imply a fixed offload slowdown.
Is all unified memory or aggregate multi-GPU VRAM available for weights?
No. Unified memory is shared with the OS and other applications. Multiple GPUs add sharding, duplicated tensors and communication costs. Verify model and backend support rather than just adding capacities.