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.
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
- oMLX 0.8.5 (released 2026-12-04): adds Qwen4 support, Lightning MTP and image input for it. Download the macOS 26/27 or macOS 15 DMG from the release page. It also adds an experimental Transformers engine for models without an MLX port.
- The quant: mlx-community/Qwen4-35B-A3B-oQ4e-mtp, Apache-2.0, a mixed-precision MLX checkpoint built with oQ (4.958 bits per weight over the whole checkpoint) that includes the vision encoder, the n-gram table and the MTP head. 35.2 GB in memory by default, 22.4 GB with SSD N-gram Offload on (the 12.8 GB n-gram table stays on SSD and only the rows each token needs are read). KV cache and runtime buffers come on top.
- Trust Remote Code: the tokenizer and chat rendering run Python shipped in the repo, so oMLX needs that setting on for this model (the model card and release notes both say so).
Which Macs fit it (estimate)
| Unified memory | Default GPU limit | oMLX quant, all in memory (largest that fits) | oMLX quant with SSD n-gram offload | Unsloth GGUF (llama.cpp, n-gram table on SSD) | Measured on RigBase (Qwen4 35B-A3B) |
|---|---|---|---|---|---|
| 16 GB | 10.7 GB (2/3) | none fits | none fits | none fits | none yet |
| 24 GB | 16.0 GB (2/3) | none fits | none fits | UD-IQ2_XXS (11.9 GB + 11.5 GB table on SSD) | 1 build, best 4.4 tok/s ⚡ (M3) |
| 32 GB | 21.3 GB (2/3) | none fits | oQ3e-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 GB | 27.0 GB (3/4) | none fits | oQ4e-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 GB | 36.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 GB | 48.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 GB | 72.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 GB | 96.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 GB | 144.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 GB | 192.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 GB | 384.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.

Measured: M5 Ultra 256 GB, oMLX 0.8.5 (Jun Kim)
| Prompt | Prefill tok/s | First token | Decode after prefill (tok/s) |
|---|---|---|---|
| 4K | 10,913 | 0.37 s | 207–222 |
| 16K | 11,071 | 1.48 s | 214–224 |
| 32K | 10,809 | 3.03 s | 198–224 |
| 64K | 10,640 | 6.15 s | 189–203 |
| Concurrent requests | Decode 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)
| Chip | Memory (GB) | Quant | Decode tok/s (1K prompt; other lengths shown) | Prefill tok/s | Source |
|---|---|---|---|---|---|
| M5 Max | 128 | oQ4e-mtp | 152.9 ⚡ 1K | 3,136 @4K · est. TTFT @8k ≈2.6 s* | omlx.ai ↗ |
| M5 Max | 64 | oQ4e-mtp | 166.8 ⚡ 1K | 6,001 @4K · est. TTFT @8k ≈1.4 s* | omlx.ai ↗ |
| M5 Max | 36 | oQ4e-mtp | 127.0 ⚡ 1K | 3,138 @4K · est. TTFT @8k ≈2.6 s* | omlx.ai ↗ |
| M5 Pro | 64 | oQ4e-mtp | 80.2 ⚡ 1K | 1,724 @4K · est. TTFT @8k ≈4.8 s* | omlx.ai ↗ |
| M5 Pro | 48 | oQ4e-mtp | 85.5 ⚡ 1K | 1,382 @4K · est. TTFT @8k ≈5.9 s* | omlx.ai ↗ |
| M4 Max | 64 | oQ4e-mtp | 104.7 1K | 1,343 @4K · est. TTFT @8k ≈6.1 s* | omlx.ai ↗ |
| M4 Pro | 64 | oQ4e-mtp | 73.9 ⚡ 1K | 734 @4K · est. TTFT @8k ≈11.2 s* | omlx.ai ↗ |
| M4 Pro | 48 | oQ3e-mtp | 70.2 ⚡ 1K | 694 @4K · est. TTFT @8k ≈11.8 s* | omlx.ai ↗ |
| M3 Max | 128 | oQ4e-mtp | 93.9 1K | 1,556 @4K · est. TTFT @8k ≈5.3 s* | omlx.ai ↗ |
| M3 Max | 36 | oQ4e-mtp | 77.5 ⚡ 1K | 378 @1K · est. TTFT @8k ≈21.7 s* | omlx.ai ↗ |
| M1 Max | 64 | oQ4e-mtp | 78.3 ⚡ 1K | 853 @4K · est. TTFT @8k ≈9.6 s* | omlx.ai ↗ |
| M4 | 32 | MLX 3-bit | 44.4 1K | 360 @4K · est. TTFT @8k ≈22.7 s* | omlx.ai ↗ |
| M3 Pro | 36 | MLX 3-bit | 49.8 1K | 419 @4K · est. TTFT @8k ≈19.6 s* | omlx.ai ↗ |
| M3 | 24 | oQ3e-mtp | 4.4 ⚡ 4K only | 177 @4K · est. TTFT @8k ≈46.3 s* | omlx.ai ↗ |
| M5 Max (MacBook Pro) | 128 | Unsloth MLX 4-bit, text only | 75 (69 at 4,096-token prompt) | 2,711 @512 | unsloth.ai ↗ |
| M5 Max | 128 | Unsloth UD-Q4_K_XL, llama.cpp | 91.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
- MTP and other speculative methods speed up predictable text more than random text, so ⚡ numbers are not comparable with plain decode.
- Numbers come from different prompts, quants and oMLX settings (TurboQuant KV, thinking on or off); only compare within a row's own source.
- The memory table is arithmetic, not a measurement. A 32 GB MacBook Pro ran oQ4e-mtp at about 21.30 GB observed; that is evidence, not a rewrite of the estimate rule.
- The MacBook Pro M1 Max 32 GB figures are real-use dashboard averages (session / today / five-minute / one live request), not a controlled benchmark.
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.