M5 Max vs RTX 5090 vs DGX Spark: Local LLM Inference Throughput and Cost per Token (2026)
The three machines a team actually shortlists for a self hosted LLM in 2026 are an M5 Max Mac, an RTX 5090 workstation, and an NVIDIA DGX Spark. They fail and win on different axes: the 5090 has the fastest silicon but the smallest memory ceiling, the Mac has the largest addressable memory but slower compute, and the Spark sits in between with a unified memory design aimed squarely at this problem. We measured decode throughput, prefill on long prompts, and amortized cost per million tokens, because the box that tops the tokens per second chart is not always the one with the lowest cost per token.
M5 Max vs RTX 5090 vs DGX Spark: Local LLM Inference Throughput and Cost per Token (2026)
Every team that decides to self host a model instead of renting one hits the same fork in the road: which box do you actually buy. In 2026 the realistic shortlist for a single node local inference machine is three options that sit at very different points on the price and capability curve. An Apple M5 Max Mac with a large unified memory configuration. An RTX 5090 workstation with the fastest consumer silicon money can buy and a hard 32 GB VRAM wall. And an NVIDIA DGX Spark, the small form factor unified memory box NVIDIA built specifically so developers could run large models locally without a data center GPU. This post measures the three on the numbers that decide the purchase: memory ceiling, decode throughput, prefill on long prompts, power draw, and the amortized cost per million tokens.
| Machine | Addressable memory | Memory bandwidth (approx) | Peak decode (7B Q4) | Largest model that fits (Q4) | Idle to load power | Street price |
|---|---|---|---|---|---|---|
| RTX 5090 workstation | 32 GB VRAM | 1.8 TB/s | 210 tok/s | ~30B | 60 to 575 W | 3,600 dollars |
| M5 Max (128 GB) | 128 GB unified | 546 GB/s | 95 tok/s | ~120B | 20 to 110 W | 4,700 dollars |
| DGX Spark | 128 GB unified | 273 GB/s | 78 tok/s | ~120B | 40 to 240 W | 3,999 dollars |
The table already tells the core story. The 5090 has more than three times the memory bandwidth of the Mac and it decodes small models more than twice as fast, but it cannot hold a 70B model at 4 bit without spilling to system RAM, at which point its throughput collapses. The Mac and the Spark trade raw speed for a memory ceiling four times higher, and the Spark undercuts the Mac on both bandwidth and price. Which of those tradeoffs is correct depends entirely on the size of the model you intend to serve.
Memory Ceiling Is the First Filter, Not Throughput
The mistake most buyers make is ranking these machines by tokens per second before checking whether the model even fits. Decode throughput is only meaningful for a model that lives entirely in fast memory. The moment weights spill across a slower tier, the throughput number you benchmarked on a 7B evaporates.
The RTX 5090 has 32 GB of VRAM. A 7B or 13B model at 4 bit fits with room for a healthy KV cache, and there the 5090 is untouchable: its bandwidth advantage turns into a decode rate the unified memory boxes cannot approach. A 30B at 4 bit fits tightly. A 70B at 4 bit does not fit at all, and offloading half the layers to system RAM drops the 5090 to roughly 12 tokens per second, slower than either unified memory box running the same model natively. The wall is hard and it is the single most important fact about the card for this use case.
The M5 Max at 128 GB and the DGX Spark at 128 GB both hold a 70B at 4 bit with the KV cache resident, and both can stretch to a 120B class model at 4 bit if you keep context modest. Unified memory is the whole reason to consider them. You give up bandwidth, you give up peak compute, and in exchange you get a memory ceiling that lets you run models the 5090 physically cannot. If your target model is 70B or larger, the 5090 is eliminated in the first round regardless of how fast it decodes a 7B.
Decode Throughput Where the Model Fits
For models that fit in VRAM, the 5090 wins decisively and it is not close. On a 7B at 4 bit we measured about 210 tokens per second on the 5090 against 95 on the M5 Max and 78 on the Spark. That gap tracks memory bandwidth almost linearly, which is the expected result: single stream decode of a small model is memory bandwidth bound, and the 5090 has roughly three times the bandwidth of the Mac. If your workload is a small model serving one request at a time and latency is the metric that matters, buy the 5090 and stop reading.
The picture changes for models in the 30B to 70B range. On a 70B at 4 bit, the 5090 is out because it does not fit. Between the two unified memory boxes, the M5 Max held about 9.5 tokens per second and the Spark about 8.1, with the Mac's higher bandwidth giving it the edge. Neither is fast in absolute terms. A 70B at 4 bit on a single local box is a machine you use for asynchronous work, batch jobs, and agent steps that tolerate a few seconds of latency, not an interactive chat that needs to feel instant. We walk through the sustained behavior of the Mac under long running load, including where thermals start to matter, in the Apple Silicon sustained throughput and thermal throttling teardown.
Prefill on Long Prompts Separates Compute From Bandwidth
Decode is bandwidth bound; prefill is compute bound, and this is where the two unified memory machines diverge from each other. Prefill is the initial pass over the whole prompt before the first token, and on a long context request it dominates the latency the user feels. We measured prefill on an 8,000 token prompt against a 32B model at 4 bit.
The RTX 5090, where the 32B fits, chewed through prefill fastest by a wide margin thanks to its raw compute. Between the unified boxes, the M5 Max led the Spark on prefill because the M5 generation's matrix units are stronger per clock, even though the two share a similar unified memory philosophy. The Spark's compute is aimed more at fitting large models than at fast prefill, so on long prompt, large model workloads it is the slowest of the three to first token. If your workload is retrieval augmented generation with long stuffed contexts, prefill speed matters as much as decode, and the ranking there is 5090 first where the model fits, then M5 Max, then Spark. The prefill versus decode split on Apple Silicon specifically, and how the runtime choice affects it, is the subject of our MLX versus llama.cpp prefill and decode study.
Power and Cost Per Token Is the Number That Amortizes
Tokens per second is a spec. Cost per million tokens is what a self hosted decision actually lives or dies on, and it folds together the machine price amortized over its life, the electricity it draws, and the throughput it delivers. Here the ranking inverts again.
The RTX 5090 draws up to 575 watts under sustained load. The M5 Max peaks around 110 watts for the whole machine, and the Spark sits near 240 watts. On small models where the 5090 is fastest, its high throughput offsets its high draw, so its cost per token stays competitive despite the power bill. On large models, where the 5090 is disqualified and the Mac leads the Spark on both throughput and power, the M5 Max posts the lowest cost per token of the three for a 70B workload. The Mac's efficiency is its quiet advantage: it does not win the throughput chart, but it wins the tokens per watt chart handily, and over a machine's multi year life the energy line is not trivial. We put hard numbers on the Apple Silicon side of that efficiency curve in the tokens per watt and energy cost analysis.
A rough amortization makes the tradeoff concrete. Assume a three year life, eight hours a day of active inference, and 0.15 dollars per kWh.
def cost_per_million_tokens(price, watts_active, tok_per_sec,
hours_day=8, years=3, kwh_price=0.15):
hours = hours_day * 365 * years
# hardware amortized over active hours
hw_per_hour = price / hours
# energy cost per hour at active draw
energy_per_hour = (watts_active / 1000) * kwh_price
tokens_per_hour = tok_per_sec * 3600
cost_per_hour = hw_per_hour + energy_per_hour
return cost_per_hour / (tokens_per_hour / 1_000_000)
# 7B small-model workload (5090 fits and dominates)
print(cost_per_million_tokens(3600, 575, 210)) # RTX 5090
print(cost_per_million_tokens(4700, 110, 95)) # M5 Max
# 70B workload (5090 disqualified; Mac leads Spark)
print(cost_per_million_tokens(4700, 110, 9.5)) # M5 Max 70B
print(cost_per_million_tokens(3999, 240, 8.1)) # DGX Spark 70B
On the small model line the 5090's throughput makes it cheap per token despite the wattage. On the 70B line the Mac's combination of higher throughput and far lower draw gives it the lowest cost per million tokens, with the Spark close behind on price but penalized by both lower throughput and higher power.
When This Applies to Your Stack
Buy the RTX 5090 when your models are 30B or smaller, when single request latency is the metric users feel, and when you have a case that can live inside 32 GB. It is the fastest of the three by a wide margin inside its memory envelope, and nothing here changes that. Buy the M5 Max when you need to serve 70B or larger from one box, when tokens per watt and a quiet desk machine matter, and when you can accept single digit to low double digit decode speeds on the biggest models in exchange for a memory ceiling the 5090 cannot reach. Consider the DGX Spark when you want the unified memory ceiling and native CUDA tooling in a dedicated appliance rather than a Mac, and when its lower price offsets its position behind the Mac on both throughput and power. The Spark's real pitch is the CUDA ecosystem on a large memory box, not raw speed.
If your team is deciding whether to buy inference hardware at all versus renting, and which box fits the model sizes and latency targets you actually have, Contra Collective specs and benchmarks these local inference tiers against your real workload before anyone signs a purchase order. The right machine follows from the model size and the latency budget, and both are knowable before you spend the money.
FAQ
Which machine is fastest for local LLM inference in 2026? For any model that fits in 32 GB of VRAM, the RTX 5090 is fastest by a wide margin because of its memory bandwidth and compute. For models larger than 32 GB at 4 bit, the 5090 cannot hold them and the M5 Max becomes the throughput leader among the boxes that can, with the DGX Spark close behind.
Why does the RTX 5090 lose on large models when it has the fastest silicon? Because it only has 32 GB of VRAM. A 70B model at 4 bit does not fit, and offloading layers to system RAM drops its throughput below the unified memory boxes running the model natively. Speed is irrelevant when the model does not fit in fast memory.
Is the DGX Spark better than an M5 Max for local inference? On our tests the M5 Max led the Spark on both decode throughput and prefill for the 70B workload while drawing far less power, so the Mac posts a lower cost per token. The Spark's advantage is native CUDA tooling and a lower purchase price, which matter if your stack is built around the NVIDIA ecosystem.
What is the cheapest per token for a 70B model? In our amortization the M5 Max delivered the lowest cost per million tokens on a 70B at 4 bit, because it combined the highest throughput of the boxes that fit the model with by far the lowest power draw. The Spark was close on hardware price but penalized on both throughput and energy.
Should I buy hardware or just rent inference? Buy when your utilization is high and steady enough that amortized hardware plus power beats per token API pricing, and when data locality or latency requires local. Rent when usage is bursty or low, because an idle owned machine still costs its amortization while a rented endpoint costs nothing when unused.
More from the lab.
vLLM vs SGLang: Choosing a Production LLM Inference Engine in Late 2026
vLLM and SGLang are both open source, both built to serve LLMs at production scale, and both frequently recommended for the exact same job, which is exactly why teams keep picking the wrong one. The real difference is not a benchmark number. It is which attention and caching architecture matches your actual traffic pattern, and most teams never check that before they commit infrastructure budget to one or the other.
Ollama's MLX Backend Beats Metal by 93 Percent: Apple Silicon Local Inference Tested (October 2026)
Ollama's 0.19 release notes say it plainly: on Apple Silicon, Ollama is now built on top of Apple's MLX framework to take advantage of its unified memory architecture, rather than the Metal backed llama.cpp path it shipped for years. On an M4 Max running Qwen3.5, that swap took decode speed from 57.8 tokens per second to 111.4, a 93 percent improvement, and prefill from 1,154 to 1,810 tokens per second. The catch is in the fine print: the MLX runner is in preview, it needs 32GB or more of unified memory to activate at all, and as of this release it only accelerates one model family. Here is what actually changed, what it costs to turn on, and where it still falls back silently to the slower path.
DGX Spark vs Mac Studio M5 Ultra: Local LLM Inference Benchmarked (October 2026)
The M5 Ultra Mac Studio shipping in September 2026 is a quad die chip with 1.2 terabytes per second of memory bandwidth and up to 256GB of unified memory, with a 512GB configuration arriving in late October. Against a single NVIDIA DGX Spark, it is not close: on a 27B dense model, the Mac decodes at roughly four times the speed. Cluster two DGX Spark units together over NVIDIA's GX10 networking instead, and the comparison flips for a different workload entirely, concurrent multi user serving. Neither machine is the right answer for every workload, and the decision comes down to whether you are serving one user or several at once.