Can an M4 16GB Mac run gpt-oss-20b?
M4 · 16 GB unified memory · 120 GB/s · MacBook Air 13" (M4), MacBook Air 15" (M4)
gpt-oss-20b needs about 13.7 GiB but an M4 16GB Mac has only ~13.0 GiB available for a model — you are 0.7 GiB short. macOS will swap to SSD and generation will crawl. There is a smaller quantisation that fits: see below.
Where the memory goes
Three things occupy memory when a model is loaded: the weights themselves, the KV cache that holds the conversation, and the runtime's own working buffers. Only the first is fixed — the KV cache grows with every token in your context.
| Quantisation | Weights | Total | Tok/s | Fits? |
|---|---|---|---|---|
| FP16 | 38.9 GiB | 42.1 GiB | 8 | No |
| Q8_0 | 20.7 GiB | 22.9 GiB | 16 | No |
| Q6_K | 16.1 GiB | 18.0 GiB | 20 | No |
| Q5_K_M | 13.9 GiB | 15.7 GiB | 23 | No |
| Q4_K_M | 11.9 GiB | 13.7 GiB | 27 | No |
| Q3_K_M | 9.5 GiB | 11.1 GiB | 34 | Yes, but tight |
| Q2_K | 7.3 GiB | 8.8 GiB | 44 | Yes, comfortably |
The default. Best quality-per-gigabyte for most people.
How long a context fits
The KV cache is often what breaks a setup that looked fine at load time. Quantising it to 8-bit roughly halves its footprint with little measurable quality cost.
| Context | KV cache | Total | FP16 KV | Q8 KV |
|---|---|---|---|---|
| 2K | 0.1 GiB | 13.2 GiB | No | No |
| 4K | 0.2 GiB | 13.4 GiB | No | No |
| 8K | 0.4 GiB | 13.7 GiB | No | No |
| 16K | 0.8 GiB | 14.4 GiB | No | No |
| 32K | 1.5 GiB | 15.7 GiB | No | No |
| 128K | 6.0 GiB | 23.8 GiB | No | No |
What to run instead on an M4 16GB Mac
These are the largest models that fit comfortably on this machine at Q4_K_M with an 8K context.
| Model | Size | Total | Tok/s | |
|---|---|---|---|---|
| Qwen3 14B | 14.8B | 10.9 GiB | 11 | Yes, comfortably |
| Gemma 2 9B | 9.24B | 9.0 GiB | 17 | Yes, comfortably |
| Qwen3 8B | 8.2B | 6.8 GiB | 19 | Yes, comfortably |
| Llama 3.1 8B | 8.03B | 6.6 GiB | 20 | Yes, comfortably |
| DeepSeek-R1-Distill-Qwen-7B | 7.62B | 5.8 GiB | 21 | Yes, comfortably |
| Qwen2.5 7B | 7.62B | 5.8 GiB | 21 | Yes, comfortably |
Macs that run gpt-oss-20b comfortably
The smallest configuration that handles it is the M2 24GB (MacBook Air 15" (M2)).
| Mac | Memory | Bandwidth | Tok/s |
|---|---|---|---|
| M2 24GB | 24 GB | 100 GB/s | 23 |
| M4 24GB | 24 GB | 120 GB/s | 27 |
| M4 Pro 24GB | 24 GB | 273 GB/s | 62 |
| M1 Max 32GB | 32 GB | 400 GB/s | 91 |
| M2 Max 32GB | 32 GB | 400 GB/s | 91 |
| M4 32GB | 32 GB | 120 GB/s | 27 |
| M3 Max 36GB | 36 GB | 300 GB/s | 68 |
| M4 Max 36GB | 36 GB | 410 GB/s | 93 |
| M4 Pro 48GB | 48 GB | 273 GB/s | 62 |
| M4 Max 48GB | 48 GB | 546 GB/s | 124 |
| M1 Max 64GB | 64 GB | 400 GB/s | 91 |
| M2 Ultra 64GB | 64 GB | 800 GB/s | 181 |
Common questions
- Can an M4 16GB Mac run gpt-oss-20b?
- No. At Q4_K_M it needs about 13.7 GiB, and an M4 16GB Mac has roughly 13.0 GiB available for a model after macOS takes its share.
- How fast is gpt-oss-20b on an Mac?
- Around 27 tokens per second. Token generation on Apple Silicon is limited by memory bandwidth, and this machine has 120 GB/s. Because this is a mixture-of-experts model only 3.6B of its 20.9B parameters are read per token, which is why it is faster than its size suggests.
- How much memory does gpt-oss-20b need?
- 11.9 GiB for the weights at Q4_K_M, plus 0.4 GiB for an 8K-token KV cache and about 1.4 GiB of runtime overhead — 13.7 GiB in total.