FitLLM

What LLMs can I run on a M5 Max 128GB (128GB)?

✅ Biggest comfortable fit: gpt-oss-120b (117B) at ~4-bit — up to ~131K context

Computed with the open FitLLM engine — accurate per-layer KV-cache modeling, not a naive estimate. Updated 2026-07-10.

Every row is computed by the open FitLLM engine from the model's official config.json — sorted so models that fit come first, biggest first. ~4-bit ≈ Q4_K_M (GGUF) / 4-bit (MLX) · ~8-bit ≈ Q8_0 / 8-bit · KV cache F16 at 8K context. Lower quants free memory at some output-quality cost.

Every tracked model on the M5 Max 128GB, ranked

ModelParams~4-bit~8-bit
gpt-oss-120b117B 5.1B act✅ up to 131K❌ won't fit
Qwen 3.6 35B-A3B35B 3B act✅ up to 262K✅ up to 262K
Qwen-AgentWorld-35B-A3B34.7B 3B act✅ up to 262K✅ up to 262K
Gemma 4 31b30.7B✅ up to 262K✅ up to 262K
GLM-4.7-Flash30B 3B act✅ up to 203K✅ up to 203K
Qwen 3.6 27B27.2B✅ up to 262K✅ up to 262K
Gemma 4 26b A4B25.5B 4B act✅ up to 262K✅ up to 262K
gpt-oss-20b21B 3.6B act✅ up to 131K✅ up to 131K
Gemma 4 12b11.95B✅ up to 262K✅ up to 262K
Llama-3.1-8B-Instruct8B✅ up to 131K✅ up to 131K
Llama-3.2-3B-Instruct3.2B✅ up to 131K✅ up to 131K
GLM-5.2753B 40B act❌ won't fit❌ won't fit

"Up to NK" = max context that fits at that quant. Click a model for its full memory breakdown on this hardware.

▶ Open the calculator with gpt-oss-120b on the M5 Max 128GB

Why this list is different

Most "what can I run" guides use a naive formula that ignores sliding-window attention, hybrid/linear layers and MLA compressed KV — so they over- or under-estimate modern models by multiples. Every number above models the real per-layer architecture. See the methodology with reproducible receipts.

All numbers are computed by the open-source fitllm-engine (MIT) from official model config.json values — reproduce or audit them yourself. Estimates; real usage varies with runtime (llama.cpp / MLX / Ollama), driver and display. Found a mismatch? Report it. · FitLLM home