Best pick for each Mac
For each configuration we take the strongest coding model (by its vendor's own claims) that runs at 15+ tokens per second, or the strongest that fits if none does.
| Mac | Best pick | Size | Expected speed |
|---|---|---|---|
| Mac mini M6 16GB | MiMo-V2.6 9B (Q4_K_M) | 6.6 GB | ~17.4 tok/s |
| Mac mini M6 32GB | GLM-4.7-Flash 30B-A3B (Q4_K_M) | 19 GB | ~40.3 tok/s |
| Mac mini M5 Pro 48GB | Devstral Small 2 24B (Q4_K_M) | 15 GB | ~15.3 tok/s |
| Mac mini M5 Pro 64GB | Qwen3-Coder-Next 80B-A3B (Q4_K_M) | 52 GB | ~70.8 tok/s |
| Mac Studio M5 Max 128GB | Qwen3-Coder-Next 80B-A3B (Q4_K_M) | 52 GB | ~142 tok/s |
| Mac Studio M5 Ultra 256GB | Qwen3-Coder-Next 80B-A3B (Q4_K_M) | 52 GB | ~277 tok/s |
| Mac Studio M5 Ultra 512GB | Qwen3-Coder 480B-A35B (Q4_K_M) | 290 GB | ~25.5 tok/s |
Speeds marked ~ are bandwidth-based estimates; we replace them with measurements as machines come online.
The models, and what their makers claim
| Model | Params (active) | Size (4-bit) | License | SWE-bench Verified |
|---|---|---|---|---|
| Qwen3-Coder 480B-A35B (Q4_K_M) | 480B (35B) | 290 GB | Apache-2.0 | not on card |
| Devstral 2 123B (Q4_K_M) | 123B | 75 GB | Modified MIT | 72.2% |
| Qwen3-Coder-Next 80B-A3B (Q4_K_M) | 80B (3B) | 52 GB | Apache-2.0 | 70.6% (SWE-Agent) |
| Devstral Small 2 24B (Q4_K_M) | 24B | 15 GB | Apache-2.0 | 68.0% |
| Qwen3.8 27B (Q4_K_M) | 27B | 18 GB | Apache-2.0 | not on card |
| GLM-4.7-Flash 30B-A3B (Q4_K_M) | 30B (3B) | 19 GB | MIT | 59.2 |
| Qwen3 Coder 30B-A3B (Q4_K_M) | 30.5B (3.3B) | 19 GB | Apache-2.0 | not on card |
| gpt-oss 20B (MXFP4) | 21B (3.6B) | 14 GB | Apache-2.0 | not on card |
| MiMo-V2.6 9B (Q4_K_M) | 9.4B | 6.6 GB | MIT | 61.1 (avg@3) |
- Qwen3-Coder-Next: described on its card as designed for coding agents and local development; mixture-of-experts, so it's far faster than its size suggests.
- Devstral 2 / Devstral Small 2 (Mistral): agentic models for software-engineering tasks. Small 2's card says it's light enough for a Mac with 32 GB. Devstral 2 123B is dense, so it's slow on any Mac.
- GLM-4.7-Flash (Z.ai): a 30B-class mixture-of-experts model, quick on mid-size Macs.
- Qwen3.8 27B: a general model whose card highlights coding and agentic gains; dense, so slower than the MoE options.
- gpt-oss 20B (OpenAI): built for low latency and local use; fast, a good all-rounder that also codes.
- MiMo-V2.6 9B (Xiaomi): small enough for 16 GB Macs.
Speed on four Macs
For autocomplete and chat you want 15+ tokens per second; for long agent runs, faster is better because the model writes a lot of tokens per task.
| Model | Mac mini M6 32GB | Mac mini M5 Pro 64GB | Mac Studio M5 Max 128GB | Mac Studio M5 Ultra 512GB |
|---|---|---|---|---|
| MiMo-V2.6 9B (Q4_K_M) 6.6 GB | ||||
| gpt-oss 20B (MXFP4) 14 GB | ||||
| Devstral Small 2 24B (Q4_K_M) 15 GB | ||||
| GLM-4.7-Flash 30B-A3B (Q4_K_M) 19 GB | ||||
| Qwen3 Coder 30B-A3B (Q4_K_M) 19 GB | ||||
| Qwen3.8 27B (Q4_K_M) 18 GB | ||||
| Qwen3-Coder-Next 80B-A3B (Q4_K_M) 52 GB | NoDoesn't fit | |||
| Devstral 2 123B (Q4_K_M) 75 GB | NoDoesn't fit | |||
| Qwen3-Coder 480B-A35B (Q4_K_M) 290 GB | NoDoesn't fit | NoDoesn't fit | NoDoesn't fit |
The mixture-of-experts models (Qwen3-Coder-Next, GLM-4.7-Flash, Qwen3-Coder 30B-A3B, gpt-oss) read only a few billion parameters per token, so they stay fast. The dense ones (Devstral 2 123B, Qwen3.8 27B) slow down in proportion to their size.
Coding agents need memory for context
Coding agents read whole files and long tool outputs, so they run with large contexts. That context needs memory on top of the model: roughly 27 GB for a 24B model and 46 GB for an 80B model at 128K tokens (estimate, 16-bit cache). If your model only just fits, use a shorter context or a smaller model.
Check your setup with the memory calculator. macOS keeps about 4 GB for itself.
Running them
All of these are in the Ollama library, and most are available in LM Studio. Both expose a local OpenAI-compatible API that editor extensions and coding agents can connect to. See LM Studio vs Ollama for which to use.
FAQ
What is the best local LLM for coding?
What's the best coding model for a 32 GB Mac?
Can a Mac mini run a good coding model?
Are local coding models as good as cloud models?
See any model on the exact Mac you're considering.
- Hugging Face: mistralai/Devstral-2-123B-Instruct-2512
- Hugging Face: Qwen/Qwen3-Coder-Next
- Hugging Face: mistralai/Devstral-Small-2-24B-Instruct-2512
- Hugging Face: XiaomiMiMo/MiMo-V2.6-Distill-Qwen-9B
- Hugging Face: zai-org/GLM-4.7-Flash
- Qwen3.8-27B model card
- Qwen3-Coder 30B-A3B model card
- Qwen3-Coder 480B-A35B model card
- gpt-oss-20b model card
- Ollama model library
Speeds come from published measurements (with source links) or labeled estimates. How we measure