How much memory does gpt-oss 20B need?

About 14 GB at Q4_K_M with an 8K context. It runs on a Mac with 24 GB of unified memory or more.

Try other settings in the calculator

Memory by quantization and context

Total memory: weights, KV cache in F16 and about 1 GB of buffers. Under each total, the smallest Mac that can run it with the default GPU memory limit.

Quantization8K context32K context128K context
Q3_K_M11 GB16 GB Mac12 GB24 GB Mac14 GB24 GB Mac
Q4_K_M14 GB24 GB Mac15 GB24 GB Mac17 GB24 GB Mac
Q5_K_M16 GB24 GB Mac17 GB24 GB Mac19 GB32 GB Mac
Q6_K18 GB32 GB Mac19 GB32 GB Mac21 GB32 GB Mac
Q8_023 GB32 GB Mac24 GB48 GB Mac26 GB48 GB Mac
F1643 GB64 GB Mac44 GB64 GB Mac46 GB64 GB Mac

About the model

Parameters
20.91B
Type
Mixture of experts, 32 experts
Attention
sliding window plus full attention
KV cache, F16
0.2 GB at 8K, 3.2 GB at 128K
On Hugging Face
openai/gpt-oss-20b

Some layers only look at the last 128 tokens, so their part of the cache stops growing. The full-attention layers still grow with context. As a mixture-of-experts model it loads every expert into memory, so memory follows the total parameter count, while speed follows the smaller number of active parameters.

Questions

How much memory does gpt-oss 20B need?

About 14 GB at Q4_K_M with an 8K context: 13 GB of weights, 0.2 GB of KV cache and about 1 GB of buffers. At 32K context it needs about 15 GB.

Can gpt-oss 20B run on a Mac?

Yes. At Q4_K_M with an 8K context it fits on a Mac with 24 GB of unified memory or more, using the default GPU memory limit of about three quarters.

How big is the gpt-oss 20B KV cache?

About 0.2 GB at 8K tokens and 3.2 GB at 128K tokens with an F16 cache. Its attention design: sliding window plus full attention.

Other models

Data read from Hugging Face on 2026-11-09. These are estimates; benchmarks on this site report measured memory. How the estimate works. Compare all models in the model fit chart.

Get the next one

New benchmarks and agent runs by email, with the raw data. Or follow on RSS or X.

Free. You confirm by email, and every issue has a one-click unsubscribe. How I handle your email.

RSSX