macuda RTX 5090 · Apple Silicon
Disaggregated inference · 19–20 September 2026

CUDA prefill.
Metal generation.

Process the prompt on an RTX 5090, then generate the response on the Mac. Split inference lets models larger than the card’s 32 GB of memory benefit from CUDA prompt processing.

3.86×
prefill speedup at ~48k tokens · 20 September
27.2 s
RTX 5090 prefill at ~48k tokens
104.9 s
Metal prefill on the same prompt
49.6 GB
Qwen3-Coder-Next 80B-A3B model file

One model, two processing stages

During prefill, experts stream from host memory over Thunderbolt to the RTX 5090. The conversation state then transfers to a Metal server for token generation. The model’s experts do not all need to fit in the card’s memory.

  1. CUDA prefill

    The RTX 5090 processes the prompt, streaming experts once per microbatch.

  2. State handoff

    The conversation state is saved and restored into the Metal server.

  3. Metal generation

    The Mac’s GPU generates the response using the transferred state.

The experiments below measure prefill only. State-transfer time and subsequent generation are excluded from the reported speedups.

Measured prefill gains

Qwen3-Coder-Next benefits from CUDA at longer context in both runs. The size of that benefit varies, particularly in the Metal measurements.

Latest measurement

On 20 September, prefill speedup increased from 2.77× near 24k tokens to 3.86× near 48k. The earlier run recorded 2.35× and 5.55×. The long-context result has not replicated at the original magnitude; use the more recent 3.86× figure when citing this experiment.

Scroll the table to view all columns

Qwen3-Coder-Next prefill measurements on 19 and 20 September 2026
PromptRTX 5090MetalMetal ratePrefill speedup
23,691 tokens19 Sep, first run15.0 s35.2 s673 tok/s2.35×
26,156 tokens19 Sep, first run22.0 s64.6 s405 tok/s2.94×
48,667 tokens19 Sep, first run28.9 s160.3 s304 tok/s5.55×
23,999 tokens20 Sep, re-measured13.5 s37.5 s641 tok/s2.77×
25,999 tokens20 Sep, re-measured20.4 s42.7 s610 tok/s2.09×
47,999 tokens20 Sep, re-measured27.2 s104.9 s458 tok/s3.86×

Qwen3-Coder-Next 80B-A3B, approximately 46.2 GiB (49.6 GB), with all experts in host memory. Both backends use the same model file and matching prompts within each run. The first measurements were recorded on 19 September, 21:20–21:34; the repeat comes from the 20 September cross-model study.

The long-context difference is on the Metal side

RTX 5090 timings at the short and long endpoints agree within 10% across the two runs: 15.0 versus 13.5 seconds, and 28.9 versus 27.2 seconds. Metal is also close near 24k, at 35.2 versus 37.5 seconds. Near 48k, however, Metal elapsed time falls from 160.3 to 104.9 seconds, accounting for most of the change in the reported speedup.

Unresolved discrepancy

Storage and page-cache pressure are the leading hypothesis. The first run read the 49.6 GB model from a full external SSD measured at 41 MB/s. For the repeat, the model had moved to a drive measured at 398 MB/s. A longer prefill could incur more disk reads if the page cache comes under pressure.

A separate A/B test found no disk effect for a model resident entirely in card memory, but that test does not resolve the host-resident case. The storage explanation remains untested.

The constant-throughput assumption needs revision

The initial cost model assumed Metal prefill stayed at 660 tok/s, based on a measurement near 24k tokens. Both runs show lower throughput near 48k. A constant rate therefore understates the measured long-context benefit.

An earlier prediction put speedup at 4.2× at 24k and 3.2× at 192k, assuming KV-cache growth would displace resident experts. The tested range shows the opposite direction. It does not establish behaviour at 192k, and this all-experts-on-host configuration does not directly test expert displacement.

The cost of a second microbatch

llama.cpp processes long prompts in microbatches, called ubatches. In this configuration, each holds up to 24,576 tokens and requires another transfer of host-resident experts. The original six-point fit covered only single-microbatch prompts, so it could not measure the repeated transfer cost.

Measured across the boundary

A 23,691-token prompt takes 15.0 seconds; a 26,156-token prompt takes 22.0 seconds. Each was repeated twice with matching timings. The fitted compute rate accounts for approximately 0.8 seconds of the increase; the remaining 6.2 seconds is consistent with another expert transfer.

Scroll the table to view all columns

Measured prefill times compared with per-prompt and per-microbatch transfer assumptions
PromptMicrobatchesPer-prompt modelPer-microbatch modelMeasured
23,691 tokens115.0 s13.5 s15.0 s
26,156 tokens216.2 s22.0 s22.0 s

An earlier test used four evenly spaced prompts that could fit either a step or a smooth slope. Sampling immediately on both sides of the boundary distinguished those explanations.

Revised RTX 5090 cost model

Four prefill measurements fit the expression below with a root-mean-square residual of 0.10 seconds. The transfer term is paid once per microbatch.

time = ⌈tokens ÷ 24,576⌉ × 6.21 s + tokens ÷ 3,300 + 1.65 s
Expert transfer6.21 s per microbatch
Previously estimated at 8.00 s
Implied transfer rate7.0 GiB/s
Previously estimated at 5.46 GiB/s
Marginal prefill rate3,300 tok/s
Previously estimated at 5,150 tok/s

These are fitted parameters for Qwen3-Coder-Next in this configuration, not general hardware limits. The cross-model study explains why the same fitting approach was unsuitable for its sweep, which included cold-start measurements.

Choosing a model: compute and memory

Two properties matter: the computation required per token and the amount of model data that must cross Thunderbolt.

Active parameters

A mixture-of-experts model uses only a subset of its experts for each token. Total parameter count therefore gives an incomplete picture of the work involved. The working hypothesis is that more active parameters increase the benefit of CUDA prefill. The six-model study tests this relationship beyond Qwen3-Coder-Next.

Memory requirements

Weights, the key-value (KV) cache and working buffers all consume memory. A model that fits entirely on the RTX 5090 can use the direct CUDA path. Split inference targets larger MoE models whose experts can stream during prefill and whose generation stage fits in the Mac’s available memory. File size alone does not establish either fit.

Design consideration

Expert reuse differs between prefill and generation. A cache policy that helps token-by-token generation may be less effective for a long prompt. This configuration transfers every expert per microbatch and does not assume a particular routing distribution.

Screening a model before downloading it

tools/disagg-screen.py reads the GGUF header to estimate transfer volume, relative prefill time and a crossover prompt length. It reads only a few megabytes, without mapping model weights or opening the card. Dense models larger than the GPU are excluded because this workflow depends on expert streaming.

Corrections to the screening estimates

Two issues were corrected on 20 September. Rankings produced before that date may overstate the benefit:

The tool still assumes constant Metal throughput. Its long-context projections remain provisional until that part of the model is revised.

What this is for

Some work cannot leave the building. Court transcripts, patient records, case files, documents under legal hold, an unreleased codebase — the material that most needs careful reading is often exactly the material you are not permitted to send to an API. For that work the choice is not cloud or local. It is local or not at all.

That constraint has a second edge. When accuracy is what matters, you want the largest model you can run, not the fastest one — and the models worth running for that are 50–100 GB, which an Apple Silicon Mac can hold but cannot process quickly. This is the intersection this path exists for: work that must stay on the machine, against a model chosen for accuracy, on hardware that makes it impractical.

What impractical means, measured

Mixtral 8x22B processing a 48,000-token prompt on the Mac's GPU takes 615 seconds — ten and a quarter minutes before the first token of the answer. The same prompt on the RTX 5090 takes 59 seconds. Nobody waits out the first figure document after document; that is the difference between a workflow and a demonstration.

Measured on a real task

Eighteen source files from the VLC codebase, audited for a genuine question — does this file write outside the application folder — with the same model, the same prompts and the same token limits on both halves. Long input, short structured answer, nothing cached between files.

InputMetal onlySplitGain
23,278 tokens33.8 s12.6 s2.67×
19,461 tokens26.9 s9.5 s2.83×
11,367 tokens14.8 s7.3 s2.03×
all eighteen files251 s146 s1.72×

Qwen3-Coder-Next 80B-A3B, 20 September 2026. End-to-end wall time per request, including the state transfer between the two GPUs — not prefill in isolation. Both halves produced identical findings on all eighteen files, including the real one: VLC's media library writes ml.db into the user data directory.

Projected, not measured

Extending the same arithmetic to a 67,000-token document — the median book in a 1,401-volume scanned corpus — gives roughly 3.4× for extraction or flagging, where the answer is short, and 2.5× for a written summary, where a couple of thousand generated tokens dilute it. Generation runs on the same GPU in both arrangements, so the advantage survives only while the input dominates the output; it disappears somewhere past 7,000 generated tokens. No legal or medical corpus has been run through this path. The document figures are arithmetic from measured rates, and the VLC row above is the only end-to-end measurement of a real task.

One practical note that cost a night to learn: the state handed between the two GPUs is hundreds of megabytes per request, and where it is written is on the critical path. Writing it to a full, slow disk reduced the gain above from 1.72× to 1.03× — the entire benefit, erased by a default path.