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.

A brushed aluminium block beside a black finned heat sink on a marble slab
Illustration: a brushed aluminium block beside a black finned heat sink on a marble slab.

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

What is matched between the two deployments, and what is not.
DimensionRTX 5090M4 MaxComparable?
Target modelQwen3.8-27B · stockQwen3.8-27B · community 4-bit derivativesFamily yes · weights no
Weight precisionNVFP4 (4-bit)MLX affine 4-bitRoughly
DrafterDFlash 2 (SGLang lane)DFlash 2 (MLX lane)Same family
RuntimevLLM / SGLangoMLXNo
KV cacheFP8Runtime defaultNo
Bench context32,768 configured131,072 configured · ~2,150-token promptNo
Concurrency11Yes
Decode metricMatched-run throughputcompletion ÷ (wall − TTFT), 3-run meansApproximately

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

Decode by lane on an RTX 5090 and an M4 MaxSix bars in three pairs, RTX 5090 first: no speculation 84.5 and 16.7 tokens per second; native MTP 100.8 and 22.9; DFlash 2 139.7 and 35.5.Decode (tok/s)RTX 5090 · no speculation84.5M4 Max · no speculation16.7RTX 5090 · native MTP100.8M4 Max · native MTP22.9RTX 5090 · DFlash 2139.7M4 Max · DFlash 235.50150
Decode at concurrency 1, compared on 26 August 2026. The displayed deployments differ by 5.1× without speculation and 3.9× with DFlash 2. The Mac MTP result uses a separate target with an 18.5 tok/s baseline; its sampled-thinking 47.2 tok/s lane is excluded from the chart.
Decode by configuration, with each target’s own baseline.
LaneRTX 5090 tok/sM4 Max tok/sInterpretation
No speculation, external-drafter target84.516.7Ratio 5.1× across these deployments
Native MTP84.5 → 100.8 (+19%)18.5 → 22.9 (+24%)The Mac MTP target has its own baseline
DFlash 2, displayed greedy/card lanes84.5 → 139.7 (+65%)16.7 → 35.5 (+113%)Ratio 3.9× across these deployments
Mac sampled-thinking laneNot compared here47.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

Which jobs run on which machine, and why.
Job shapeMachineWhy
Long inputs: repos, document sets, agent transcriptsRTX 5090Faster reported prefill in these different deployments
Sustained agent duty behind an endpointRTX 5090Always-on, tunnelled, tested at depth in the 250K tool-calling test
Private second opinions on short materialM4 Max35.5 tok/s in the greedy lane; sampled thinking is a separate 47.2 result
Offline, travel, and outage fallbackM4 MaxThe whole stack lives on the laptop
Stable-context chat that grows by appendingEitherBoth prefix caches refund ~90% of the read
Very large windows held in memory for cheap re-readsM4 Max128 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

Suhail Mohebi · published 26 August 2026 · the cover is a generated illustration

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 →

What is matched, and what is not
  1. What is matched, and what is not
  2. Decode: about 5× without speculation and 4× in the displayed DFlash lanes
  3. Prefill: where the two machines differ most
  4. Memory: which machine runs out first
  5. What runs where, in practice