M4 Max vs RTX 5090 for local LLMs: same Qwen 3.8, measured
These are two published deployments of the Qwen3.8-27B family on my M4 Max and RTX 5090. Their prompt-processing, decode and memory limits differ, but the weights, runtimes and workloads are not fully matched.

People often ask me whether to buy a Mac with large unified memory or a GPU box for local AI.
This compares two real deployments I have already published in full: my RTX 5090 measurements and my M4 Max measurements. It is not a controlled benchmark, and both notes were written to stop field numbers being passed off as controlled benchmarks. So the table of what does and does not line up comes first.
What is matched, and what is not
| Dimension | RTX 5090 | M4 Max | Comparable? |
|---|---|---|---|
| Target model | Qwen3.8-27B · stock | Qwen3.8-27B · community 4-bit derivatives | Family yes · weights no |
| Weight precision | NVFP4 (4-bit) | MLX affine 4-bit | Roughly |
| Drafter | DFlash 2 (SGLang lane) | DFlash 2 (MLX lane) | Same family |
| Runtime | vLLM / SGLang | oMLX | No |
| KV cache | FP8 | Runtime default | No |
| Bench context | 32,768 configured | 131,072 configured · ~2,150-token prompt | No |
| Concurrency | 1 | 1 | Yes |
| Decode metric | Matched-run throughput | completion ÷ (wall − TTFT), 3-run means | Approximately |
The Mac runs community derivatives of the weights, and my speculative decoding note measured that the fine-tuning itself lowers drafter acceptance. The Mac numbers therefore carry a handicap that the 5090’s stock checkpoint does not. The acceptance metrics also differ by runtime. SGLang reports mean accepted length (2.95 tokens per cycle at best) and oMLX reports an acceptance rate (66–82%). Both describe the same mechanism, but they cannot share one column.
Decode: about 5× without speculation and 4× in the displayed DFlash lanes
| Lane | RTX 5090 tok/s | M4 Max tok/s | Interpretation |
|---|---|---|---|
| No speculation, external-drafter target | 84.5 | 16.7 | Ratio 5.1× across these deployments |
| Native MTP | 84.5 → 100.8 (+19%) | 18.5 → 22.9 (+24%) | The Mac MTP target has its own baseline |
| DFlash 2, displayed greedy/card lanes | 84.5 → 139.7 (+65%) | 16.7 → 35.5 (+113%) | Ratio 3.9× across these deployments |
| Mac sampled-thinking lane | Not compared here | 47.2 (+183% against 16.7) | Different generation mode; no cross-machine ratio |
What the table shows:
- Native MTP increased decode by about 19% on the tested GPU configuration and 24% on its separately measured Mac target. Two setups do not establish a model-wide ceiling.
- DFlash 2 increased the displayed GPU lane to 139.7 tok/s and the Mac greedy lane to 35.5, a ratio of about 3.9 across these deployments. The runtimes report different acceptance statistics, so those values cannot establish an equal acceptance share.
- The Mac’s 47.2 tok/s result uses sampled thinking. The GPU write-up also reports faster thinking-token rates, but those do not measure time to a finished answer that passes the task. Keep these modes separate and compare completed-task latency as well as decode.
Prefill: where the two machines differ most
The published GPU prefill rate was 9,081 tok/s; the Mac log gives roughly 196 tok/s, a quotient of about 46. The prompts and runtime settings differed, so this is an observation across deployments, not an isolated hardware speedup.
- A ~2,150-token prompt costs the Mac ~11 s before the first output token. The 5090 reads an 88,000-token prompt in 16.3 s and a 178,000-token prompt in 53.4 s (implied ~5,400 and ~3,300 tok/s at those depths).
- These measurements led me to route large uncached inputs to the GPU. The Mac’s configured 131K limit alone does not establish successful completion at that depth with an output reserve.
- Reusing each setup’s cached prefix reduced its own measured TTFT by about 90%: 2.891 → 0.283 seconds on the GPU’s roughly 16K prefix, and 12.34 → 1.23 seconds in the Mac test. The prompts differed and the remaining latencies were not equal. These runs support reusing a stable prefix; they do not establish warm-cache hardware parity.
Memory: which machine runs out first
- The 5090 has compute to spare; its limit is memory. At 32K context the serving stacks used 25.9–29.8 GiB (26,494–30,503 MiB) of the 32 GB card. The hardest lessons in that write-up were about memory. The physical KV pool sets the real ceiling, whatever context is advertised, and one config change (a bigger prefill chunk) shrank that pool by 25,000 tokens without any warning.
- The M4 Max has memory to spare; its limit is compute. Both 27B builds sit resident together in 32.6 GB of 128 GB. The KV cache pages in lazily at ~0.25 MB per token, and 131k context is configured with room to spare. The short-prompt speed tests do not establish completion at the full configured window; that needs a separate prompt-plus-output test.
The relevant choice is which constraint the intended job reaches first. The GPU measurements here have a smaller device-memory budget and faster reported prompt processing. The Mac is an M4 Max MacBook Pro; I have not measured a Mac Studio, M4 Pro or laptop RTX 5090 in this comparison.
The same split decides how a much larger model runs on each machine. Qwen3.8-Flash-Next system requirements applies it to a 180B model.
What runs where, in practice
| Job shape | Machine | Why |
|---|---|---|
| Long inputs: repos, document sets, agent transcripts | RTX 5090 | Faster reported prefill in these different deployments |
| Sustained agent duty behind an endpoint | RTX 5090 | Always-on, tunnelled, tested at depth in the 250K tool-calling test |
| Private second opinions on short material | M4 Max | 35.5 tok/s in the greedy lane; sampled thinking is a separate 47.2 result |
| Offline, travel, and outage fallback | M4 Max | The whole stack lives on the laptop |
| Stable-context chat that grows by appending | Either | Both prefix caches refund ~90% of the read |
| Very large windows held in memory for cheap re-reads | M4 Max | 128 GB holds what the 32 GB card must page around |
Read this table with four limits in mind. Every number is at concurrency 1, and the weight builds differ, as the first table shows. Power, thermals, noise and cost per token remain unmeasured on both sides; they are still owed from the lab plan. Each machine’s figures come from its own runtime’s best tuned configuration, so this compares two well-tuned deployments, not two chips.
Comparison record
Field comparison · sources · 26 Aug 2026
- Machine A
- RTX 5090 32 GB · Qwen3.8-27B NVFP4 · vLLM / SGLang · measured in the remote RTX 5090 setup note
- Machine B
- M4 Max 128 GB · Qwen3.8-27B 4-bit derivatives · oMLX · measured in the speculative decoding note
- Shared
- Same target family · same DFlash 2 drafter family · concurrency 1 · 4-bit weights
- Headline gaps
- Prefill quotient ~46× · baseline decode 5.1× · displayed DFlash lanes 3.9× · warm-cache hardware ratio unmeasured
- Not compared
- Thinking versus non-thinking lanes · acceptance metrics with different definitions · matched warm-cache hardware latency · power and noise
- Decision
- Keep both and route each job by its inference phase
Sources
- Remote RTX 5090 setup: Codex, Qwen3.8-27B and Tailscale: the full RTX 5090 measurement set (engines, KV limits, recall, tunnel)
- Speculative decoding on an M4 Max: MTP vs DFlash 2, measured: the full M4 Max measurement set (MTP, DFlash 2, the metric trap)
- Qwen: the official Qwen3.8-27B model card both deployments serve ↗︎
- Inco AI: the DFlash 2 drafter running on both machines ↗︎
- GitHub: the serving configs and benchmark scripts for both machines ↗︎
Use this
Check if a model fits →← Previous: SGLang vs vLLM on an RTX 5090: speed, memory and context
Want this inside your team’s workflow? The Verified AI Operations Sprint tests one workflow in ten working days. See the sprint →
