More
Submit build

How to run Qwen4 35B-A3B on a Mac or MacBook

Quick answer

Which quant should I use on a MacBook?
For oMLX on 48 GB or more, mlx-community/Qwen4-35B-A3B-oQ4e-mtp (35.2 GB) is the one Jun Kim benchmarks. On a 36 GB Mac use it with the SSD N-gram Offload setting (22.4 GB resident). The default-limit estimate still lists oQ4e as not fitting a 32 GB Mac (21.3 GB GPU limit), but a confirmed MacBook Pro M1 Max 32 GB ran oQ4e-mtp in real use at 46.5 tok/s session average and about 21.30 GB observed (close to the 22.4 GB resident figure with the n-gram table offloaded; the dashboard does not name that setting). For 24 GB, the estimate still points to oQ3e-mtp with offload or a smaller GGUF; Unsloth suggests UD-IQ4_XS on 24 GB, which is above the default limit (no measurement yet).

Last updated:

Qwen4 35B-A3B is a mixture-of-experts model with 3B active parameters, so it decodes fast on Apple Silicon. On 2026-12-04 oMLX 0.8.5 added support and Jun Kim (creator of oMLX) published numbers on an M5 Ultra 256 GB: 277.6 tok/s decode for one request with MTP and 10,000+ tok/s prefill up to 64K tokens.

Quick path: install oMLX 0.8.5 → download mlx-community/Qwen4-35B-A3B-oQ4e-mtp → turn on Trust Remote Code for it → optionally turn on SSD N-gram Offload → use MTP for single requests. Which Mac? memory table (estimate) · all Mac builds.

What you need

Which Macs fit it (estimate)

Unified memoryDefault GPU limitoMLX quant, all in memory (largest that fits)oMLX quant with SSD n-gram offloadUnsloth GGUF (llama.cpp, n-gram table on SSD)Measured on RigBase (Qwen4 35B-A3B)
16 GB10.7 GB (2/3)none fitsnone fitsnone fitsnone yet
24 GB16.0 GB (2/3)none fitsnone fitsUD-IQ2_XXS (11.9 GB + 11.5 GB table on SSD)1 build, best 4.4 tok/s ⚡ (M3)
32 GB21.3 GB (2/3)none fitsoQ3e-mtp (18.1 GB)UD-IQ3_XXS (17.2 GB + 11.5 GB table on SSD)3 builds, best 46.5 tok/s ⚡ (M1 Max)
36 GB27.0 GB (3/4)none fitsoQ4e-mtp (22.4 GB)UD-IQ4_XS (20.5 GB + 11.5 GB table on SSD)3 builds, best 127.0 tok/s ⚡ (M5 Max)
48 GB36.0 GB (3/4)oQ3e-mtp (30.9 GB)oQ6e-mtp (30.8 GB)UD-Q6_K_XL (30.4 GB + 21.8 GB table on SSD)3 builds, best 85.5 tok/s ⚡ (M5 Pro)
64 GB48.0 GB (3/4)oQ4e-mtp (35.2 GB)oQ6e-mtp (30.8 GB)UD-Q8_K_XL (40.5 GB + 21.8 GB table on SSD)7 builds, best 166.8 tok/s ⚡ (M5 Max)
96 GB72.0 GB (3/4)oQ6e-mtp (48.7 GB)oQ6e-mtp (30.8 GB)UD-Q8_K_XL (40.5 GB + 21.8 GB table on SSD)1 build, best 151.7 tok/s ⚡ (M5 Ultra)
128 GB96.0 GB (3/4)oQ6e-mtp (48.7 GB)oQ6e-mtp (30.8 GB)UD-Q8_K_XL (40.5 GB + 21.8 GB table on SSD)5 builds, best 152.9 tok/s ⚡ (M5 Max)
192 GB144.0 GB (3/4)oQ6e-mtp (48.7 GB)oQ6e-mtp (30.8 GB)UD-Q8_K_XL (40.5 GB + 21.8 GB table on SSD)1 build, best 112.3 tok/s ⚡ (M2 Ultra)
256 GB192.0 GB (3/4)oQ6e-mtp (48.7 GB)oQ6e-mtp (30.8 GB)UD-Q8_K_XL (40.5 GB + 21.8 GB table on SSD)3 builds, best 277.6 tok/s ⚡ (M5 Ultra)
512 GB384.0 GB (3/4)oQ6e-mtp (48.7 GB)oQ6e-mtp (30.8 GB)UD-Q8_K_XL (40.5 GB + 21.8 GB table on SSD)2 builds, best 195.4 tok/s ⚡ (M5 Ultra)

This is an estimate (arithmetic), not a measurement. Rule: a quant is listed if its resident weights + 3 GB for KV cache and runtime (about 16K context) fit in the default GPU memory limit. That limit is about 2/3 of unified memory on Macs up to 32 GB and about 3/4 from 36 GB up (modelvram.com (limits logged by llama.cpp) and Peddals blog). File sizes are the real files on Hugging Face (API listing, 2026-12-04). oMLX's SSD N-gram Offload keeps the 12.8 GB (17.9 GB for oQ6e) n-gram table on SSD, which lowers resident weights to the figures in the third column; RigBase has no measurement of what that costs in speed. A 128K context adds roughly 8 GB (oMLX oQ4e session on an M5 Max 128 GB: 35.0 GB peak at 16K, 43.0 GB at 128K). The limit can be raised with an advanced sudo sysctl iogpu.wired_limit_mb setting that resets on reboot. Unsloth's own guide suggests UD-IQ4_XS for a 24 GB Mac, which is above the default limit in this table, so on 24 GB it relies on raising the limit or on paging; RigBase has no measurement for that case. A confirmed MacBook Pro M1 Max 32 GB ran oQ4e-mtp in real use (oMLX 0.8.5 dashboard, 2026-12-04): about 21.30 GB observed vs 34.44 GB estimated, with the memory bar at 23.1 GB used / 24.3 GB soft / 26.2 GB hard. That observed footprint is close to the 22.4 GB resident figure with SSD n-gram offload; the dashboard does not name the offload setting. The table still lists oQ4e as not fitting the 21.3 GB default 2/3 limit on 32 GB — this is real-use evidence that it can run, not a change to the estimate rule. The estimate is conservative: oMLX uploads that had SSD n-gram offload on report a peak MLX memory of 22.0 to 23.8 GB for oQ4e at 1K to 16K (M5 Pro 64 GB session), and oQ4e uploads exist for 36 and 48 GB Macs, so read ‘none fits’ as ‘tight’, not ‘impossible’.

The table is still an estimate. Real-use evidence on a confirmed MacBook Pro M1 Max 32 GB: oQ4e-mtp (35.2 GB file) ran at about 21.30 GB observed vs 34.44 GB estimated, with the memory bar at 23.1 GB used / 24.3 GB soft / 26.2 GB hard. Session average 46.5 tok/s generation (40–46 tok/s across the 5-minute and today figures; one live request at 28.9 tok/s at 6.3k tokens). That observed footprint is consistent with the n-gram table not sitting fully in memory; the dashboard does not name SSD N-gram Offload. These are dashboard averages, not a controlled benchmark.

oMLX 0.8.5 dashboard on a MacBook Pro M1 Max 32 GB running Qwen4-35B-A3B-oQ4e-mtp, 2026-12-04. Server address redacted.
RigBase contributor (own MacBook Pro, oMLX dashboard, 2026-12-04). Server address redacted. · build page

Measured: M5 Ultra 256 GB, oMLX 0.8.5 (Jun Kim)

PromptPrefill tok/sFirst tokenDecode after prefill (tok/s)
4K10,9130.37 s207–222
16K11,0711.48 s214–224
32K10,8093.03 s198–224
64K10,6406.15 s189–203
Concurrent requestsDecode tok/s
1 (MTP on, no-think)277.6
1 (MTP on, thinking)247.4
2 (MTP off)330.7
4 (MTP off)480.7
8 (MTP off)658.2

Median of 3 runs, 8 Python coding prompts, 512 output tokens. Rows with 2 or more requests are totals across requests. Source: Jun Kim's post ↗ and its chart images, read by RigBase; the post text gives 6.2 s for the 64K first token, the chart 6.15 s. Full build page.

Measured on other Macs (oMLX community uploads and Unsloth)

ChipMemory (GB)QuantDecode tok/s (1K prompt; other lengths shown)Prefill tok/sSource
M5 Max128oQ4e-mtp152.9 ⚡ 1K3,136 @4K · est. TTFT @8k ≈2.6 s*omlx.ai ↗
M5 Max64oQ4e-mtp166.8 ⚡ 1K6,001 @4K · est. TTFT @8k ≈1.4 s*omlx.ai ↗
M5 Max36oQ4e-mtp127.0 ⚡ 1K3,138 @4K · est. TTFT @8k ≈2.6 s*omlx.ai ↗
M5 Pro64oQ4e-mtp80.2 ⚡ 1K1,724 @4K · est. TTFT @8k ≈4.8 s*omlx.ai ↗
M5 Pro48oQ4e-mtp85.5 ⚡ 1K1,382 @4K · est. TTFT @8k ≈5.9 s*omlx.ai ↗
M4 Max64oQ4e-mtp104.7 1K1,343 @4K · est. TTFT @8k ≈6.1 s*omlx.ai ↗
M4 Pro64oQ4e-mtp73.9 ⚡ 1K734 @4K · est. TTFT @8k ≈11.2 s*omlx.ai ↗
M4 Pro48oQ3e-mtp70.2 ⚡ 1K694 @4K · est. TTFT @8k ≈11.8 s*omlx.ai ↗
M3 Max128oQ4e-mtp93.9 1K1,556 @4K · est. TTFT @8k ≈5.3 s*omlx.ai ↗
M3 Max36oQ4e-mtp77.5 ⚡ 1K378 @1K · est. TTFT @8k ≈21.7 s*omlx.ai ↗
M1 Max64oQ4e-mtp78.3 ⚡ 1K853 @4K · est. TTFT @8k ≈9.6 s*omlx.ai ↗
M432MLX 3-bit44.4 1K360 @4K · est. TTFT @8k ≈22.7 s*omlx.ai ↗
M3 Pro36MLX 3-bit49.8 1K419 @4K · est. TTFT @8k ≈19.6 s*omlx.ai ↗
M324oQ3e-mtp4.4 ⚡ 4K only177 @4K · est. TTFT @8k ≈46.3 s*omlx.ai ↗
M5 Max (MacBook Pro)128Unsloth MLX 4-bit, text only75 (69 at 4,096-token prompt)2,711 @512unsloth.ai ↗
M5 Max128Unsloth UD-Q4_K_XL, llama.cpp91.2 plain; 118.5 with MTP on code–unsloth.ai ↗

The M1 Max 32 GB row is a confirmed MacBook Pro and uses real-use oMLX dashboard averages, not a controlled run. Other oMLX rows are single public runs and the chassis is not recorded. Decode can vary a lot between context lengths in one session (for example 60.7 tok/s at 4K and 103.2 at 1K for the same MLX 4-bit upload on an M5 Max); read them as ballpark, not as medians. Every row links its page; full list.

Using llama.cpp instead

Qwen4 is in mainline llama.cpp. Unsloth's guide runs llama-server -hf unsloth/Qwen4-35B-A3B-GGUF:UD-Q4_K_XL --load-mode mmap --lazy-mode on -ot per_layer_token_embd=CPU to read the n-gram table from SSD on demand, and measures an M5 Max 128 GB at 91.2 tok/s without a draft and 118.5 with MTP on code (Unsloth ↗). Their MLX alternative, unsloth/Qwen4-35B-A3B-MLX-4bit, is text only with no MTP head.

Caveats

Model page: Best home rig for Qwen4 35B-A3B · Mac and MacBook hub · Can it run?. Credit: Qwen team (Alibaba Cloud), Jun Kim and the oMLX project, Unsloth, and a RigBase contributor (MacBook Pro M1 Max 32 GB, oMLX dashboard).

FAQ

Which quant should I use on a MacBook?

For oMLX on 48 GB or more, mlx-community/Qwen4-35B-A3B-oQ4e-mtp (35.2 GB) is the one Jun Kim benchmarks. On a 36 GB Mac use it with the SSD N-gram Offload setting (22.4 GB resident). The default-limit estimate still lists oQ4e as not fitting a 32 GB Mac (21.3 GB GPU limit), but a confirmed MacBook Pro M1 Max 32 GB ran oQ4e-mtp in real use at 46.5 tok/s session average and about 21.30 GB observed (close to the 22.4 GB resident figure with the n-gram table offloaded; the dashboard does not name that setting). For 24 GB, the estimate still points to oQ3e-mtp with offload or a smaller GGUF; Unsloth suggests UD-IQ4_XS on 24 GB, which is above the default limit (no measurement yet).

What does MTP do here?

MTP (multi-token prediction) uses the model's built-in 2B head to guess several tokens ahead and verify them, which speeds up decode, most on predictable text such as code. oMLX's chart: 277.6 tok/s with MTP on for one request on an M5 Ultra. With two or more concurrent requests Jun Kim's chart used MTP off because it was faster.

Is Qwen4 35B-A3B free to use?

The model and the oQ4e-mtp MLX quant are both Apache-2.0 on Hugging Face.

Are these numbers independent?

Most come from public community uploads to omlx.ai and from the posts of Jun Kim (oMLX's creator) and Unsloth. RigBase read each page and linked it; it did not re-run them. Treat the M5 Ultra chart as the oMLX project's own measurement.