openai · text · mixture of experts

gpt-oss-20b

openai/gpt-oss-20b

gpt-oss-20b at Q4_K_M is exactly 11,624,759,488 bytes (10.83 GiB / 11.62 GB) — an effective 4.323 bits per weight, not the nominal 4. Its KV cache at 32K is 0.77 GiB, not the 1.50 GiB a flat formula predicts.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
21.5B
total, not active
Architecture
gpt-oss
24 layers
Context
131,072
native (config.json)
License
apache-2.0

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q3_K_S10.68 GiB11,463,894,2084.263unsloth
Q2_K10.68 GiB11,468,317,8884.265unsloth
Q4_010.71 GiB11,501,495,4884.277459unsloth
Q3_K_M10.72 GiB11,506,103,4884.279459unsloth
Q4_110.78 GiB11,577,504,4484.306unsloth
Q4_K_S10.82 GiB11,618,492,6084.321unsloth
Q4_K_M10.83 GiB11,624,759,4884.323459unsloth
Q5_K_S10.91 GiB11,711,827,6484.356unsloth
Q5_K_M10.91 GiB11,717,357,2484.357459unsloth
Q2_K_L10.95 GiB11,757,884,6084.373unsloth
Q6_K11.21 GiB12,041,000,1284.478459unsloth
MXFP411.28 GiB12,109,565,6324.503lmstudio-community
MXFP411.28 GiB12,109,566,6244.503ggml-org
Q8_011.28 GiB12,109,567,1684.503459unsloth
F1612.85 GiB13,792,639,1685.129459unsloth

KV cache by context

computed per layer — this model uses sliding-window attention
ContextKV cache (f16)Flat formulaOverstated byFull / windowed / recurrent
4,0960.11 GiB0.19 GiB1.68×12 / 12 / 0
8,1920.21 GiB0.38 GiB1.83×12 / 12 / 0
16,3840.39 GiB0.75 GiB1.91×12 / 12 / 0
32,7680.77 GiB1.50 GiB1.95×12 / 12 / 0
65,5361.52 GiB3.00 GiB1.98×12 / 12 / 0
131,0723.02 GiB6.00 GiB1.99×12 / 12 / 0

12 of 24 layers cache only a 128-token window rather than the full context, on a period of 2. Figures assume the default configuration; --swa-full disables the saving entirely.

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 11.27 GiB. The real file is 10.83 GiB, because a quantization is a mixture and some tensors are always kept at higher precision. The larger discrepancy is the cache: a flat formula gives 1.50 GiB at 32K context where the real figure is 0.77 GiB, because most of this model's layers cache a fixed window rather than the whole context.

Architecture

from config.json
Layers
24
Attention heads
64
KV heads
8
Head dim
64
Hidden size
2880
Vocab
201,088
Sliding window
128
SWA period
2
MLA
no
Experts
32
Experts per token
4
use_sliding_window

Questions people ask

How much VRAM does gpt-oss-20b need?
Q4_K_M is exactly 11,624,759,488 bytes (10.83 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
How large is gpt-oss-20b's KV cache?
0.77 GiB at 32K context with an f16 cache, computed per layer. Quantizing the cache to q8_0 roughly halves it, which is often the difference between a context length fitting and not.
Is gpt-oss-20b a mixture-of-experts model?
Yes — 32 experts, 4 routed per token. Every expert must be resident, but only the routed ones are read per token, which is why its memory requirement and its speed behave very differently.
Which quantization of gpt-oss-20b should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.
gpt-oss-20b — VRAM requirements, exact quant sizes — ossmodeldb