Advisor / Can it run? / gpt-oss 20B on MacBook Air M5 32GB

Can MacBook Air M5 32GB run gpt-oss 20B?

Estimated speed and memory fit for gpt-oss 20B (20.91B MoE, 3.6B active) on MacBook Air M5 32GB. We have no measured run for this pair yet, so the speed is an estimate; submit yours.

37generation tok/s (Q8_0, estimated from 153 GB/s memory bandwidth)
12.5 GBQ8_0 + 16k f16 KV, fits fully
22 GBusable on this hardware

Short answer

Yes. gpt-oss 20B Q8_0 fits fully on MacBook Air M5 32GB at 16k context, using 12.5 of 21.9 GB usable, and generates about ~37 tokens/s (estimated, not measured).

Measured generation speed by quantization

No measured rows for gpt-oss 20B on MacBook Air M5 32GB yet. The ~37 tok/s above is a bandwidth estimate (153 GB/s × 0.64 efficiency). Have this machine? Submit a llama-bench result and this page will switch to measured data.

Generation = tg128 (128 generated tokens, short context). Public rows are medians of community llama.cpp results (sources); our own runs use llama-bench on a rented GPU.

Alternatives

Less memory that still fits gpt-oss 20B

Smaller memory usually means a cheaper card or Mac (we do not list prices).

Faster for gpt-oss 20B

Other models on MacBook Air M5 32GB, similar size

Memory and context limits

Q8_0 weights are 12.1 GB; the 16k f16 KV cache adds 0.41 GB. Largest context that fits in 21.9 GB usable:

KV cache typeMax context
f16128k
q8_0128k
q4_0128k

Native limit 128k. Full KV cache table for gpt-oss 20B.

Copy-paste commands

The advisor's pick for this hardware: Q8_0, 16k context.

llama.cpp
llama-server -hf unsloth/gpt-oss-20b-GGUF:Q8_0 -c 16384 -fa on --jinja -ngl 99
ollama
OLLAMA_CONTEXT_LENGTH=16384 ollama serve
ollama run hf.co/unsloth/gpt-oss-20b-GGUF:Q8_0
MLX · mlx-lm · MXFP4-Q8, 12.1 GB
pip install -U mlx-lm
mlx_lm.generate --model mlx-community/gpt-oss-20b-MXFP4-Q8 --prompt "Hello" --max-tokens 256
mlx_lm.server --model mlx-community/gpt-oss-20b-MXFP4-Q8 --port 8080

MLX runs on Apple Silicon only. Repo: mlx-community/gpt-oss-20b-MXFP4-Q8 (converted with mlx-lm, per its model card). These commands use MLX's default context handling; there is no MLX speed on this site yet.

MLX on this Mac

MLX is Apple's machine-learning framework for Apple Silicon. Where an mlx-community conversion exists, the commands above include an MLX block next to llama.cpp and ollama.

Repos are checked against the Hugging Face API (how).

FAQ

How fast is gpt-oss 20B on MacBook Air M5 32GB?

About 37.3 tokens/s for generation (Q8_0, estimated from 153 GB/s memory bandwidth). Speed drops as the context fills; see the depth table on this hardware's other pages.

How much memory does gpt-oss 20B need on MacBook Air M5 32GB?

The advisor's pick, Q8_0, is 12.1 GB of weights plus 0.41 GB of KV cache at 16k context (12.5 GB), against 21.9 GB usable.

Is the gpt-oss 20B speed on MacBook Air M5 32GB measured or estimated?

Estimated. No measured llama.cpp run for this pair is on file yet, so the figure comes from memory bandwidth and our calibration against measured hardware.

What can I use instead of MacBook Air M5 32GB for gpt-oss 20B?

With less memory, RTX 5080 16GB (~239 tok/s), RTX 5070 Ti 16GB (~224 tok/s), RTX 5060 Ti 16GB (~125 tok/s) also fit it fully. Faster: 16GB VRAM class (RTX 4060 Ti 16GB, 32GB RAM) (~94 tok/s), RTX 4090 24GB (~258 tok/s), AMD RX 7900 XTX 24GB (~221 tok/s).

What is the maximum context for gpt-oss 20B on MacBook Air M5 32GB?

With an f16 KV cache about 128k tokens, 128k with q8_0 and 128k with q4_0, bounded by the model's own limit.

Related

All models on MacBook Air M5 32GB · gpt-oss 20B on all hardware · VRAM tier · all measured pages · leaderboard