Best LLM for 24 GB unified memory · 2026

Best LLM for a 24 GB Mac: what fits, and what to run

Updated 8 Oct 2026 1 new this month

macOS lets the GPU wire down about 18.0 GB of a 24 GB Mac's unified memory; the rest stays with the system and your apps. At Q4_K_M with an 8K context, 45 of 80 models in the catalogue fit — 39 with headroom, 6 tightly. The pick for most people is Qwen3.8 27B: Best capability per gigabyte: a current-generation dense 27B with vision and 262K context. Speeds are estimated for an M4 Pro · 24 GB; the fit verdicts are the same for every machine in the class.

Which one should I run?

One pick per job, from the editorial shortlist, checked to fit at Q4_K_M and 8K. Each label links the full ranking for that job. How picks are chosen.

RecommendationModelWhyQuant · totalTok/s est.
Best overall Qwen3.8 27B
Alibaba · Apache 2.0
Best capability per gigabyte: a current-generation dense 27B with vision and 262K context. Q4_K_M · 16.7 GB 9.8 Tight fit
Best for coding Qwen3.8 27B
Alibaba · Apache 2.0
Terminal-Bench 73, DeepSWE 42 — a generation ahead of anything else that fits 24 GB. Q4_K_M · 16.7 GB 9.8 Tight fit
Best reasoning Qwen3.8 27B
Alibaba · Apache 2.0
Thinking mode plus the best agentic reasoning at 24 GB. Q4_K_M · 16.7 GB 9.8 Tight fit
Best for writing Mistral Small 3.2 24B
Mistral AI · Apache 2.0
Natural dialogue and a light hand with instructions. Q4_K_M · 15.1 GB 11 Runs great
Best vision Qwen3.8 27B
Alibaba · Apache 2.0
Image and video in, OSWorld 84 — the strongest local vision-language model at 24 GB. Q4_K_M · 16.7 GB 9.8 Tight fit
Best for agents Qwen3.8 27B
Alibaba · Apache 2.0
Computer use and tool calling are what 3.8 was trained for (OSWorld 84). Q4_K_M · 16.7 GB 9.8 Tight fit
Best translation Qwen3.8 27B
Alibaba · Apache 2.0
119 languages, and Qwen translations read as idiomatic rather than literal. Q4_K_M · 16.7 GB 9.8 Tight fit
Fastest good model Gemma 4 26B-A4B
Google · Apache 2.0
3.8B active and a small file — the quickest Gemma 4 with vision. Q4_K_M · 16.0 GB 33 Tight fit
Best long context Qwen3.5 9B
Alibaba · Apache 2.0
262K native in 8–12 GB. Q4_K_M · 10.0 GB
at 128K context
28 Runs great

The long-context row is judged at 128K: Qwen3.5 9B holds that window on a 24 GB Mac at Q4_K_M with 4.00 GB of KV cache — that is why it can differ from the best overall pick.

Everything that fits a 24 GB Mac

Largest first. "Max context" is the longest window the Mac holds at that quantisation with an f16 cache; a q8_0 cache roughly doubles it.

ModelParamsQuantWeights+KV 8KTotalHeadroomMax contextTok/s est.
Mistral Small 3.2 24B 23.6B Q4_K_M 13.3 GB 1.25 GB 15.1 GB 2.9 GB 26K 11 Runs great
gpt-oss 20B 20.9B MoE MXFP4 10.8 GB 0.19 GB 11.6 GB 6.4 GB 128K 38 Runs great
Qwen3 14B 14.8B Q4_K_M 8.3 GB 1.25 GB 10.2 GB 7.8 GB 58K 18 Runs great
DeepSeek-R1-Distill-Qwen 14B 14.8B Q4_K_M 8.3 GB 1.50 GB 10.4 GB 7.6 GB 48K 18 Runs great
Qwen2.5-Coder 14B 14.8B Q4_K_M 8.3 GB 1.50 GB 10.4 GB 7.6 GB 48K 18 Runs great
Phi-4 14B 14.7B Q4_K_M 8.3 GB 1.56 GB 10.4 GB 7.6 GB 16K 18 Runs great
Ministral 3 14B 13.9B Q4_K_M 7.8 GB 1.25 GB 9.7 GB 8.3 GB 61K 20 Runs great
Gemma 3 12B 12.2B Q4_K_M 6.9 GB 0.81 GB 8.3 GB 9.7 GB 128K 22 Runs great
Mistral NeMo 12B 12.2B Q4_K_M 6.9 GB 1.25 GB 8.7 GB 9.3 GB 67K 22 Runs great
Gemma 4 12B 12B Q4_K_M 6.7 GB 0.81 GB 8.2 GB 9.8 GB 165K 23 Runs great
Qwen3.5 9B 9.65B Q4_K_M 5.4 GB 0.25 GB 6.3 GB 11.7 GB 256K 28 Runs great
Ornith 1.5 9B 9.41B Q4_K_M 5.3 GB 0.25 GB 6.1 GB 11.9 GB 256K 29 Runs great
Ministral 3 8B 8.92B Q4_K_M 5.0 GB 1.06 GB 6.7 GB 11.3 GB 93K 30 Runs great
Granite 4.1 8B 8.79B Q4_K_M 4.9 GB 1.25 GB 6.8 GB 11.2 GB 79K 31 Runs great
LFM2.5 8B-A1B 8.47B MoE Q4_K_M 4.8 GB 0.09 GB 5.5 GB 12.5 GB 125K 84 Runs great
Fara 7B 8.29B Q4_K_M 4.7 GB 0.44 GB 5.7 GB 12.3 GB 125K 33 Runs great
Qwen3 8B 8.19B Q4_K_M 4.6 GB 1.13 GB 6.3 GB 11.7 GB 90K 33 Runs great
Llama 3.1 8B Instruct 8.03B Q4_K_M 4.5 GB 1.00 GB 6.1 GB 11.9 GB 103K 34 Runs great
Gemma 4 E4B 8.0B Q4_K_M 4.5 GB 0.14 GB 5.2 GB 12.8 GB 128K 34 Runs great
Ling 3.0 Tiny 7.9B-A1.3B 7.9B MoE Q4_K_M 4.4 GB 0.05 GB 5.1 GB 12.9 GB 128K 97 Runs great
DeepSeek-R1-Distill-Qwen 7B 7.62B Q4_K_M 4.3 GB 0.44 GB 5.3 GB 12.7 GB 128K 36 Runs great
Qwen2.5-Coder 7B 7.62B Q4_K_M 4.3 GB 0.44 GB 5.3 GB 12.7 GB 128K 36 Runs great
Olmo 3 7B Instruct 7.3B Q4_K_M 4.1 GB 2.50 GB 7.2 GB 10.8 GB 64K 37 Runs great
Mistral 7B Instruct v0.3 7.25B Q4_K_M 4.1 GB 1.00 GB 5.7 GB 12.3 GB 32K 37 Runs great
Gemma 4 E2B 5.1B Q4_K_M 2.9 GB 0.07 GB 3.5 GB 14.5 GB 128K 53 Runs great
Qwen3.5 4B 4.66B Q4_K_M 2.6 GB 0.25 GB 3.5 GB 14.5 GB 256K 58 Runs great
Gemma 3 4B 4.3B Q4_K_M 2.4 GB 0.30 GB 3.3 GB 14.7 GB 128K 63 Runs great
Qwen3 4B 4.02B Q4_K_M 2.3 GB 1.13 GB 4.0 GB 14.0 GB 32K 67 Runs great
Ministral 3 3B 3.85B Q4_K_M 2.2 GB 0.81 GB 3.6 GB 14.4 GB 150K 70 Runs great
Phi-4-mini 3.8B 3.84B Q4_K_M 2.2 GB 1.00 GB 3.8 GB 14.2 GB 121K 71 Runs great
Granite 4.1 3B 3.4B Q4_K_M 1.9 GB 0.63 GB 3.1 GB 14.9 GB 128K 80 Runs great
Llama 3.2 3B Instruct 3.21B Q4_K_M 1.8 GB 0.88 GB 3.3 GB 14.7 GB 128K 85 Runs great
LFM2.5 2.6B 2.7B Q4_K_M 1.5 GB 0.13 GB 2.2 GB 15.8 GB 128K 100 Runs great
Qwen3.5 2B 2.27B Q4_K_M 1.3 GB 0.09 GB 2.0 GB 16.0 GB 256K 120 Runs great
Qwen3 1.7B 1.72B Q4_K_M 1.0 GB 0.88 GB 2.4 GB 15.6 GB 32K 158 Runs great
Llama 3.2 1B Instruct 1.24B Q4_K_M 0.7 GB 0.25 GB 1.5 GB 16.5 GB 128K 219 Runs great
Gemma 3 1B 1.0B Q4_K_M 0.6 GB 0.04 GB 1.2 GB 16.8 GB 32K 271 Runs great
Qwen3.5 0.8B 0.87B Q4_K_M 0.5 GB 0.09 GB 1.2 GB 16.8 GB 256K 312 Runs great
Qwen3 0.6B 0.6B Q4_K_M 0.3 GB 0.88 GB 1.8 GB 16.2 GB 32K 452 Runs great
Muse Glimmer 30B 29.8B Q4_K_M 16.8 GB 0.18 GB 17.5 GB 0.5 GB 44K 9.1 Tight
Qwen3.8 27B 27.8B Q4_K_M 15.6 GB 0.50 GB 16.7 GB 1.3 GB 28K 9.8 Tight
Qwen3.6 27B 27.8B Q4_K_M 15.6 GB 0.50 GB 16.7 GB 1.3 GB 28K 9.8 Tight
Gemma 3 27B 27.4B Q4_K_M 15.4 GB 1.03 GB 17.0 GB 1.0 GB 20K 9.9 Tight
Gemma 4 26B-A4B 26.5B MoE Q4_K_M 14.9 GB 0.51 GB 16.0 GB 2.0 GB 58K 33 Tight
Devstral Small 2 24B 24B Q4_K_M 13.5 GB 1.25 GB 15.3 GB 2.7 GB 24K 11 Tight

Just out of reach

The smallest models that do not fit. Unified memory has no slower pool to spill into, so there is no offload fallback: each needs a bigger machine, or a lower quantisation.

ModelParamsTotal @ Q4_K_MOver budgetNeeds
Nemotron 3.5 Lightning 30B-A3B 31.6B MoE 18.4 GB +0.4 GB 32 GB Mac
Qwen3 30B-A3B 30.5B MoE 18.5 GB +0.5 GB 32 GB Mac
Qwen3 Coder 30B-A3B 30.5B MoE 18.5 GB +0.5 GB 32 GB Mac
GLM-4.7-Flash 30B-A3B 31.2B MoE 18.6 GB +0.6 GB 32 GB Mac
Granite 4.1 30B 28.9B 18.9 GB +0.9 GB 32 GB Mac
Olmo 3.1 32B Instruct 32.2B 20.0 GB +2.0 GB 32 GB Mac

Running it on a Mac

The GPU's share can be raised. The cap macOS puts on wired GPU memory is a setting, not a hardware limit: sudo sysctl iogpu.wired_limit_mb=… lifts it until the next reboot. Leave several gigabytes for macOS itself — every number on this page assumes the default share, so it under-promises rather than over.

MLX or GGUF. On Apple Silicon, MLX (via mlx-lm or LM Studio) is usually faster than llama.cpp's GGUF on the same model, and the community converts most popular releases within days. GGUF through Ollama or llama.cpp has the widest coverage and usually supports a new architecture first. The memory arithmetic is the same either way.

Speed is bandwidth. Every machine in this class holds the same models; what separates them is memory bandwidth (M4 Pro 273 GB/s, M2 100 GB/s, M3 100 GB/s), and tokens per second scales with it.


← 16 GB Mac All memory classes 32 GB Mac → Adjust context, quant or cache →

Every total is quantised weights + f16 KV cache at 8K + 0.6 GB runtime overhead, against 18.0 GB usable. Tokens per second are estimated from memory bandwidth and never measured. The method.