unsloth · text · mixture of experts

gpt-oss-20b-BF16

unsloth/gpt-oss-20b-BF16

gpt-oss-20b-BF16 at Q4_K_M is exactly 15,805,134,880 bytes (14.72 GiB / 15.81 GB) — an effective 6.045 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
20.9B
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_M12.03 GiB12,916,149,6004.941huihui-ai
Q4_K_M14.72 GiB15,805,134,8806.045Melikshah
Q4_K_M14.72 GiB15,805,135,2006.045huihui-ai
Q5_K_M15.73 GiB16,893,060,6406.462Melikshah
Q8_020.73 GiB22,261,910,5608.515Melikshah
Q8_020.73 GiB22,261,910,8808.515huihui-ai
F1638.99 GiB41,860,886,56016.012Melikshah
F1638.99 GiB41,860,886,88016.012huihui-ai

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 . 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 10.96 GiB. The real file is 14.72 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
MLA
no
Experts
32
Experts per token
4
use_sliding_window

Questions people ask

How much VRAM does gpt-oss-20b-BF16 need?
Q4_K_M is exactly 15,805,134,880 bytes (14.72 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-BF16'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-BF16 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-BF16 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.