Best Local LLM for a Mac, by Unified Memory Size

Chat, coding and vision picks for Apple Silicon Macs with 8, 16, 24, 32, 48-64 GB or more of unified memory, with exact MLX file sizes and the catch for each.

A Mac has no separate graphics memory: the model, its context, macOS and every open app share one pool of unified memory. Pick by that installed figure, keep the model file well under it, and leave the rest for the system and the conversation.

The answer

Sizes are the safetensors weights of the mlx-community MLX builds on Hugging Face, 4-bit unless noted, in decimal GB as the Hugging Face file tree reports them. “Left” is installed memory minus the weights, in GiB, before macOS, apps and context take their share.

Mac memoryChat pickCoding pickFile size (chat / coding)The catch
8 GBQwen3.5-4BQwen2.5-Coder-7B-Instruct3.03 GB / 4.28 GBThe coder leaves 4.01 GiB for macOS, apps and context; load one model at a time
16 GBQwen3.5-9BQwen2.5-Coder-14B-Instruct5.95 GB / 8.31 GBQwen2.5-Coder lists a 32K context window on Ollama
24 GBgpt-oss-20b (MXFP4-Q8 build)Qwen2.5-Coder-14B-Instruct12.08 GB / 8.31 GBgpt-oss-20b takes text only; Devstral Small 2 is a squeeze here
32 GBQwen3.8-27BDevstral Small 2 (24B)16.05 GB / 15.10 GBTwo 14-15 GiB models together do not leave room for much else
48 GBQwen3.6-35B-A3BQwen3-Coder-30B-A3B-Instruct (8-bit)20.40 GB / 32.44 GBThe 8-bit coder leaves 17.79 GiB
64 GBQwen3.6-35B-A3B (8-bit)Qwen3-Coder-Next37.72 GB / 44.84 GBOllama’s Coder-Next tag is larger, at 52 GB
96 GB and upgpt-oss-120b (MXFP4-Q8 build)Qwen3-Coder-Next (8-bit, 128 GB)63.39 GB / 84.66 GBThe 8-bit coder is 78.84 GiB; on 96 GB that leaves 17.16 GiB

Every pick above is Apache 2.0 on its Hugging Face card, and none is gated. The picks follow the site’s chat, coding and vision guides, shifted where a Mac’s shared memory changes the arithmetic.

Unified memory is not VRAM

On a PC, a 16 GB graphics card has 16 GB for the model and the operating system lives elsewhere. On a Mac the same bytes serve both. The MLX README describes the design: “Arrays in MLX live in shared memory.”

How much of that pool the GPU may use is not a published fraction. Apple’s Metal documentation exposes a per-device value, recommendedMaxWorkingSetSize, described as “An approximation of how much memory, in bytes, this GPU device can allocate without affecting its runtime performance.” Apple does not state that value as a percentage of installed memory, and neither do the MLX, Ollama or LM Studio docs read for this page. The site’s Apple Silicon deep dive covers the community-measured figures and where they come from.

The practical rule follows from that: treat the “Left” column as the budget for macOS, open apps and the model’s context cache together, not as free space. The context cache grows with the length of the conversation, so a model that loads with a short prompt can run out of room on a long one.

The mlx-lm README documents one knob. For models “large relative to the total RAM available”, it suggests raising the wired memory limit with sudo sysctl iogpu.wired_limit_mb=N, where N “should be larger than the size of the model in megabytes but smaller than the memory size of the machine.” That is a system setting, so it affects every app.

MLX or GGUF

MLX is, in its own README’s words, “an array framework for machine learning on Apple silicon, brought to you by Apple machine learning research.” Its LLM package, mlx-lm, points to the MLX Community organisation on Hugging Face, where “Many supported models are available in various quantization formats.” Every size in the table comes from that organisation’s file trees. GGUF is the llama.cpp format that most other local guides on this site use; the quantisation explainer compares the two.

The choice matters less than it did. Ollama added MLX “in preview” in v0.19.0 (released 2026-03-27), and its v0.40.0 notes (2026-09-25) say “on Apple Silicon devices, model architectures supported by the MLX runtime will automatically run on MLX.” The current stable release on the access date is v0.40.16 (2026-11-09). The Ollama library now lists MLX tags beside the GGUF ones: qwen3.6:27b-mlx is 19GB, the same as the default qwen3.6:27b range of 18GB - 19GB.

LM Studio shipped an MLX engine in version 0.3.4, announced 2024-10-08; the announcement says users can “mix and match llama.cpp and MLX models”. Its system requirements page says “16GB+ RAM recommended” for macOS, and that 8GB Mac owners should “stick to smaller models and modest context sizes.”

Picks by memory size

8 GB. Qwen3.5-4B: the MLX 4-bit build is 3,034,300,695 bytes (3.03 GB, 2.83 GiB); Ollama’s qwen3.5:4b is 3.3GB - 4.0GB with a 256K context window. The Qwen card lists 262,144 tokens natively, but a context that long will not fit beside macOS in 8 GB. For code, Qwen2.5-Coder-7B-Instruct 4-bit is 4,284,346,255 bytes (4.28 GB, 3.99 GiB); Ollama’s qwen2.5-coder:7b is 4.7GB. For images, Qwen3-VL-4B-Instruct 4-bit is 3.09 GB (2.88 GiB). The catch at this tier is everything else you have open.

16 GB. Qwen3.5-9B 4-bit is 5,950,221,072 bytes (5.95 GB, 5.54 GiB), leaving 10.46 GiB. Its card describes a “Causal Language Model with Vision Encoder”, and Ollama lists text and image input on qwen3.5:9b (6.6GB - 7.6GB). For code, Qwen2.5-Coder-14B-Instruct 4-bit is 8,309,494,233 bytes (8.31 GB, 7.74 GiB). For dedicated vision, Qwen3-VL-8B-Instruct 4-bit is 5.76 GB (5.37 GiB); its card lists “Native 256K context, expandable to 1M”. OpenAI’s card says gpt-oss-20b runs “within 16GB of memory”, but on a 16 GB Mac that memory is also macOS’s, so it moves up a tier here.

24 GB. gpt-oss-20b, 21B parameters with 3.6B active per its card, has an MLX build of 12,076,207,568 bytes (12.08 GB, 11.25 GiB); Ollama’s gpt-oss:20b is 14GB with a 128K context window. It takes text input only on Ollama. Coding stays on Qwen2.5-Coder-14B, which now has 16.26 GiB of headroom. Devstral Small 2 at 15.10 GB fits on paper, but Mistral’s own card names “a Mac with 32GB RAM”. For vision, the 8-bit Qwen3-VL-8B is 9.86 GB (9.18 GiB).

32 GB. Qwen3.8-27B, a dense 27B that takes image and video input and the site’s chat pick for a 24 GB graphics card, is 16,054,541,349 bytes (16.05 GB, 14.95 GiB) at 4-bit, leaving 17.05 GiB; Ollama’s qwen3.8:27b-q4_K_M tag is 18GB. It replaces Qwen3.6-27B, which is the same size at 4-bit; on Qwen’s own text-benchmark table, Qwen3.8-27B is ahead on every row. Devstral Small 2, the coding pick, is 15,102,831,624 bytes (15.10 GB, 14.07 GiB) at 4-bit; Mistral describes it as light enough for “a single RTX 4090 or a Mac with 32GB RAM” and lists a 256k context window and image input. Qwen3-Coder-30B-A3B-Instruct (30.5B total, 3.3B active) at 4-bit is 17.18 GB (16.00 GiB) if you prefer the Qwen family. Qwen3-VL-32B-Instruct 4-bit is 19.62 GB (18.27 GiB) and is the tightest pick on this page at 32 GB.

48 GB. Qwen3.6-35B-A3B (35B total, 3B active) at 4-bit is 20,402,204,271 bytes (20.40 GB, 19.00 GiB). Ollama’s MLX launch post asked for “a Mac with more than 32GB of unified memory” for the similar-sized Qwen3.5-35B-A3B, which is why it sits here and not at 32 GB. The 8-bit Qwen3-Coder-30B-A3B is 32.44 GB (30.21 GiB). Qwen3-VL-32B 4-bit now leaves 29.73 GiB.

64 GB. The 8-bit Qwen3.6-35B-A3B is 37.72 GB (35.13 GiB). Qwen3-Coder-Next, 80B total and 3B active per its card with 262,144 tokens of native context, is 44,844,286,500 bytes (44.84 GB, 41.76 GiB) at 4-bit, leaving 22.24 GiB. Ollama’s qwen3-coder-next is 52GB, so the MLX build is the one to prefer at this tier. Qwen3-VL-32B at 8-bit is 36.00 GB (33.53 GiB).

96 GB and up. gpt-oss-120b’s MLX build is 63,386,948,506 bytes (63.39 GB, 59.03 GiB); Ollama’s tag is 65GB. With 128 GB, the 8-bit Qwen3-Coder-Next (84.66 GB, 78.84 GiB) leaves 49.16 GiB.

When memory runs out

Apple’s Activity Monitor guide says memory pressure “is determined by the amount of free memory, swap rate, wired memory, and file cached memory”, and that “When your computer approaches its maximum memory capacity, inactive apps in memory are compressed.” Swap is “space being used on your startup disk to swap unused files to and from RAM.” A yellow graph means the Mac “might eventually need more RAM”; red means it “needs more RAM.”

On the model side, the mlx-lm README warns that models “large relative to the total RAM available on the machine can be slow”, and prints a warning beginning “[WARNING] Generating with a model that requires” when that is likely. Neither source puts a number on the slowdown, so this page does not either. Watch the Memory tab while a model answers a long prompt: if pressure leaves green, step down a size or a quantisation.

What does not fit

Some open-weight flagships are out of reach at every tier on this page. Qwen3-VL-235B-A22B-Instruct at 4-bit is 133.39 GB (124.23 GiB), which leaves 3.77 GiB on a 128 GB machine before macOS; Ollama’s qwen3-vl:235b is 143GB. Qwen3.5-397B-A17B at 4-bit is 223.86 GB (208.49 GiB). Ollama’s qwen3-coder:480b is 290GB. Running any of these locally means more memory than 128 GB or more than one machine.

Bottom line

On 8-16 GB, stay with the Qwen3.5 4B and 9B builds and a Qwen2.5-Coder of matching size. At 24 GB, gpt-oss-20b is the step up for chat. At 32 GB, Qwen3.8-27B is the first pick that matches what the site recommends for a 24 GB graphics card, for chat, agentic coding and images, and Devstral Small 2 is the site’s 16 GB graphics-card coding pick. From 48 GB the mixture-of-experts models (Qwen3.6-35B-A3B, Qwen3-Coder-30B-A3B, then Qwen3-Coder-Next at 64 GB) become practical. In every tier, read the “Left” figure as the budget for macOS, apps and context together, and compare the MLX and GGUF file sizes before downloading: for Qwen3-Coder-Next the MLX 4-bit build is 44.84 GB against Ollama’s 52GB tag.

Other GPUs and tasks: Local AI by VRAM · RSS