LLM memory & architecture reference

Real per-model architecture from official config.json — the numbers that decide memory

Computed with the open FitLLM engine — accurate per-layer KV-cache modeling, not a naive estimate. Updated 2026-10-23.

The real architecture of current open models, read from their official Hugging Face config.json — these are the values that actually determine memory, and the ones generic VRAM calculators get wrong. Reproduce any number with the open-source FitLLM engine (MIT).

Per-model architecture & KV cache

ModelParamsLayersAttentionKV heads × dimSliding windowMax ctxFull-ctx KV (bf16)
GLM-4.7-Flash31.2B (3B active)47Full20×256—198K10.22 GiB
GLM-5.2753B (40B active)78Full64×256—1M87.75 GiB
gpt-oss-20b20.9B (3.6B active)24Sliding-window + global8×64128128K3.00 GiB
gpt-oss-120b116.8B (5.1B active)36Sliding-window + global8×64128128K4.50 GiB
Qwen 3.6 27B27.2B64Hybrid — 16/64 full-attn4×256—256K16.00 GiB
Qwen 3.6 35B-A3B35B (3B active)40Hybrid — 10/40 full-attn2×256—256K5.00 GiB
Qwen-AgentWorld-35B-A3B34.7B (3B active)40Hybrid — 10/40 full-attn2×256—256K5.00 GiB
Gemma 4 e2b5.1B (2.3B active)35Sliding-window 4:1 + global1×256512128K0.89 GiB
Gemma 4 e4b8B (4.5B active)42Sliding-window 5:1 + global2×256512128K1.78 GiB
Gemma 4 12b11.95B48Sliding-window 5:1 + global8×256 · global 1×5121024256K4.31 GiB
Gemma 4 26b A4B25.5B (4B active)30Sliding-window 5:1 + global8×256 · global 2×5121024256K5.20 GiB
Gemma 4 31b30.7B60Sliding-window 5:1 + global16×256 · global 4×5121024256K20.78 GiB
Llama-3.2-3B-Instruct3.2B28Full8×128—128K14.00 GiB
Llama-3.1-8B-Instruct8B32Full8×128—128K16.00 GiB
MiniCPM5-1B1.081B24Full2×128—128K3.00 GiB
Qwen3-0.6B0.596B28Full8×128—40K4.38 GiB
Qwen3-1.7B1.721B28Full8×128—40K4.38 GiB
Llama-3.2-1B-Instruct1.236B16Full8×64—128K4.00 GiB
Gemma-3-1B-it1B26Sliding-window + global1×25651232K0.14 GiB
Hy3298.8B (21B active)80Full8×128—256K80.00 GiB
Qwen 3.8 27B27.781B64Hybrid — 16/64 full-attn4×256—256K16.00 GiB
Qwen 3.8 2.4T-A95B2446.183B (95B active)92Hybrid — 23/92 full-attn4×256—256K23.00 GiB
Laguna XS 2.133.443B (3B active)40Sliding-window + global8×128512256K10.06 GiB
Laguna S 2.1117.562B (8B active)48Sliding-window + global8×1285121M48.07 GiB
Spark-X2.5-4B4.112B36Sliding-window 3:1 + global4×2565121M36.05 GiB
Granite-4.2-30B29.277B64Full8×128—128K32.00 GiB
GLM-5.3753B (40B active)78Full64×256—1M87.75 GiB
MiniCPM5-2B2.517B42Full2×128—128K5.25 GiB
Nex-N2.5-mini35.107B40Hybrid — 10/40 full-attn2×256—256K5.00 GiB
Nex-N2.5-Pro396.802B60Hybrid — 15/60 full-attn2×256—256K7.50 GiB
DeepSeek-V4.1-Flash-1017763.2B (16B active)40Compressed sparse — cache on 4/40 + window 1281×512—1M3.64 GiB
DeepSeek-V4-Flash290.9B (13B active)43Compressed sparse — cache on 41/43 + window 1281×512—1M7.24 GiB
DeepSeek-V4-Pro1598.8B (49B active)61Compressed sparse — cache on 61/61 + window 1281×512—1M10.14 GiB
Muse Spark Open822B (42B active)62Sliding-window 23:8 + global16×6420481M64.36 GiB

Full-context KV cache = KV memory at the model's maximum context in bf16, computed per layer with the real head shape — sliding-window layers capped at the window, hybrid/linear layers excluded, global layers using their own head_dim. This is why Gemma 4 31B's full-context KV is 20.78 GiB, not the ~240 GB a naive "all layers × full context" formula implies.

Why these fields decide memory

See the full explanation in why naive VRAM calculators are wrong, or check any model on hardware in the fit pages.

▶ Open the FitLLM calculator

All numbers are computed by the open-source fitllm-engine (MIT) from official model config.json values — reproduce or audit them yourself. Estimates; real usage varies with runtime (llama.cpp / MLX / Ollama), driver and display. Found a mismatch? Report it. · FitLLM home