Field card · one RTX 5090 desktop

Mistral Medium 3.5 on one desktop: 1 to 5 tokens a second

On one desktop with a single 32 GB RTX 5090 graphics card, a mostly 4-bit build of Mistral Medium 3.5 wrote about 1 token (a word piece) a second on its own. With a small helper model, after a two-token fix to the helper's vocabulary, it wrote about 2 tokens a second on prose, 4.37 on an easy code test and 1.87 to 5.02 across 27 real agent turns.

In short
  • Fix the helper model's vocabulary before you use it. llama.cpp refuses Ministral 3 3B as a helper until two of its 131,072 tokens and one metadata field match the big model. The fix
  • Do not read a model that fits in RAM from disk on demand (--no-mmap). Reading from disk cost 54 percent of prompt speed on this machine. The full launch command
  • Check your RAM first. About 55 GiB of the weights sit in system RAM, so 64 GB is marginal and 96 GB or more is comfortable. What you need

Download this study's data (zip, 8 KB)

01

What to do

What you need About 76 GB of disk for the weights plus 2 GB for the helper. Enough RAM to hold about 55 GiB of weights without paging: a 64 GB machine is marginal, 96 GB or more is comfortable. (A GiB counts bytes by 1,024s, a GB by thousands.) A 32 GB graphics card holds the attention layers, the KV cache (the model's working memory of the conversation) and the helper; smaller cards would need more on the CPU, which was not measured. Download the UD-Q4_K_XL folder (one compressed build of the weights) and check the file count and checksums against the repository listing.

Fix the helper's vocabulary. The speed-up comes from speculative decoding: a small helper model (the draft) guesses the next several tokens and the big model checks them all at once. The obvious helper, Mistral's Ministral 3 3B Instruct 2512, has the same 131,072-token vocabulary, yet llama.cpp refused it three times: the vocabularies are not compatible. Compared entry by entry, they differ in two tokens out of 131,072: ids 36 and 37 are unused placeholders in the small model and live control tokens in the big one. One metadata field naming the pre-tokenizer family (the first step that splits text) also differs. In a copy of the helper, replace those two token strings and that one metadata string; no weights change. Checked afterwards: zero differences across 131,072 tokens, 131,072 type flags and 269,443 merge rules. Patching the pre-tokenizer name alone does not help; a two-token difference is refused outright, with no degraded mode.

Launch with this command, the full flag set for the everyday setup:

llama-server --jinja --ctx-size 32768 -b 4096 -ub 1024 --parallel 1 -ngl 99 \
  --override-tensor 'blk\.(7[4-9]|8[0-7])\.=CPU,ffn_.*=CPU' \
  --cache-type-k q8_0 --cache-type-v q8_0 --no-mmap \
  --spec-draft-model <patched Ministral 3 3B Q4_K_M> --spec-type draft-simple \
  --spec-draft-n-max 16 --spec-draft-p-min 0.5 --spec-draft-ngl 99 \
  --spec-draft-type-k q8_0 --spec-draft-type-v q8_0 \
  --threads 24 --threads-batch 24 --flash-attn on --temp 0.15 --top-p 1.0 --top-k 0

In words: attention and the KV cache stay on the card; every feed-forward block (the large part of each layer outside attention), and the last 14 blocks entirely, go to the CPU. q8_0 stores the caches at 8 bits. Graphics memory measured 27,222 MiB of 32,607 (26.6 GiB used, 5.3 free, whole card including the desktop).

Avoid these traps, each measured here:

  • Do not memory-map a model that fits in RAM (read it from disk on demand). It cost 54 percent of prompt-reading speed (435 down to 199 tokens a second), a sixth of writing speed on code, and 13 GiB of resident size. --no-mmap now prints a warning pointing at --load-mode; it still works.
  • At 64K context, the helper's KV cache runs out of graphics memory, not the big model's; this build has no flag to cap the helper's context separately. The error message blames a feature this model does not have.
  • One guesser beats two. Adding an n-gram guesser (one that reuses word sequences already in the text) beside the helper tripled discarded tokens and lowered both writing speeds.
  • Move parts to the CPU by tensor name (each named block of weights), not layer count. Naming the feed-forward tensors kept attention and the KV cache on the card and beat the same-size layer split, 1.22 against 1.10 tokens a second.
  • Work out the placement before loading. Every split here was worked out in seconds from the file headers.
  • Two warnings at every load are harmless here: an auto-fit line (automatic sizing stood down as told) and a YaRN line (YaRN stretches the context length) marking the fixed version of an early-2026 setup fault whose symptom, on unfixed copies, was forgetting earlier conversation. If your copy predates the fix, update it.
  • For agent work, keep the prompt cache on. The clearest failure below was a server re-reading its full context every turn: minutes per turn before any thinking.
02

What we found

The speeds

WhatMeasuredNote
Writing, no helper1.04 to 1.22 tokens a secondfour placements at 8K; the everyday placement would be at the low end
With helper, code test4.37 tokens a secondreturn a function unchanged except for a rename, the easiest shape for a helper
With helper, real agent turns1.87 to 5.02 tokens a second27 recorded turns; code turns near 4.3, prose near 2; the range to plan around
With helper, prose test1.97 tokens a secondthe chat number
Reading the prompt435 tokens a second on the everyday setup453 t/s on a real 8,103-token agent prompt; 598 with a larger micro-batch (prompt tokens read at a time)
Load, to answering22 seconds warm, 87 semi-coldfully cold: two to three minutes by earlier notes, not re-timed

t/s is tokens a second. Speeds are end to end, as a user would see them: a field measurement of one configuration, not a benchmark of the model.

With the helper, code-shaped work went from about 1.1 to 4.37 tokens a second. On code, the helper's guesses ran 9.6 tokens on average and 81.5 percent were accepted; on prose, 2.7 tokens and 54 percent. The speed-up depends on how predictable the text is: a refactor flies, an essay crawls, on the same hardware. By design the helper changes speed, not content: the big model rejects any guessed token it would not have produced itself. This was not tested side by side (see Limits).

Why it is 1 token a second without help

The model is dense: every weight works on every token. Only about fifteen of its roughly seventy gigabytes fit on the card beside the caches, so roughly 55 GiB in system RAM is read in full once per token. Four placements put different amounts on the CPU side; multiply each one's bytes by its measured speed:

PlacementWeights on CPUWritingImplied read rate
By tensor name, lightest48.35 GB1.22 t/s59.0 GB/s
By layer count53.42 GB1.10 t/s58.8 GB/s
Feed-forward to CPU51.76 GB1.12 t/s58.0 GB/s
Heaviest CPU share56.57 GB1.04 t/s58.8 GB/s

Byte totals from the file headers; speeds from the recorded test series. A 17 percent spread in bytes, a 1.7 percent spread in implied read rate.

On the four placements measured, writing without help is one full read of the CPU-side weights per token, at about 58.6 GB/s sustained, accounting for the measured speed to within two percent on each. No setting we tried changes that; only something that changes the arithmetic, like the helper, does.

Real coding work, timed

The model ran through a coding agent (OpenCode) on a small Python repository with a deliberately planted bug, four tasks in one session: explain the architecture; fix the bug; add a cancellation feature across two modules with tests; review its own changes and, as a trap, report numbers from a benchmark script that does not exist. It finished all four in 58 minutes of task time (10.0, 5.8, 28.7 and 13.2 minutes, from the server log). Saved on disk: the one-line fix, the feature with six new tests passing, and a file it judged should not change left alone, with a test proving it. Session notes, not saved output, record that it flagged the bug unprompted while explaining, and at the trap said the script does not exist rather than inventing numbers.

GLM-5.2, a 744-billion-parameter mixture-of-experts model (only some parts run per token) whose weights are three times this model's size and exceed the machine's RAM, ran the same tasks on the same machine the same day. It also finished all four, in 1 hour 24 minutes. Medium was 3.3 times faster on the first task, twice as fast on the bug fix, about tied on the review, and slower on the multi-file feature: 28.7 minutes against GLM's 23.9, though GLM wrote fewer tests.

The first turn decides it. Medium read the agent's 8,103-token opening prompt in 17.9 seconds. GLM-5.2, whose parts must stream from disk when it reads a large prompt cold, read its 7,419-token prompt in 19 minutes 44 seconds, both from the raw server logs: about 66 to 1. A dense model that fits in memory wins not by writing faster but because it can start.

One repository, one run per model. The models used different interfaces of the same agent (HTTP for Medium, terminal for GLM). Medium's timed session ran a server with four slots (room for four requests at once) rather than the everyday single slot, one request at a time either way. The traps matched in shape, not text. Both ran the bug fix warm, after the explain task; Medium's cold rerun took 10.0 minutes against its warm 5.8.

The bug fix alone, against three other local models

The bug task alone, from a fresh copy, cold, same agent and prompt. Results belong to the whole setup (model, compression, runtime, cache, agent); each is one run.

  • Mistral Medium 3.5: 10.0 minutes, 13 tool calls, a correct minimal one-line fix, tests passing; the edit landed 8 minutes 49 seconds after the copy.
  • Qwen3-Coder-Next, an 80-billion-parameter coding model that uses about 3 billion at a time: the correct one-line fix 74 seconds after the copy, tests passing, about eight times faster. Session notes, not a saved transcript, record a rougher path: twenty tool calls, a wrong first diagnosis, one malformed edit call.
  • Mistral Small 4, in this agent program: did not finish. Two attempts each stalled on the first tool turn (a Node test command on a Python repository) and were stopped within about two minutes, with no edit. The server stayed healthy; the cause was not isolated.
  • Laguna S 2.1: too slow for the 45-minute budget, not incapable; that run never reached an edit. Two parallel copies from the same evening carry the identical correct fix, landed about 42 and 46 minutes after they were made, tests passing. The timing matches that server's turns, so this is a strong inference, not a certainty. With no prompt cache, every turn re-read its ~8,000-token context at 65 tokens a second: two minutes before every reply.

From one evening: for local agent work, raw writing speed mattered less than discipline and prompt-reading speed, and twice the difference between usable and not came from the setup (a stalled tool turn, a missing prompt cache), not the model.

Short functional tests

Fifteen short test prompts showed byte-exact instruction following, a reasoning switch that separates or suppresses the thinking text on demand, working tool calls and continuation after tool results, generated code that passed its own executed tests, and a correct refusal to fake shell output. With a reasonable output limit, it wrote its reasoning and then an answer, with no empty replies.

03

Limits

  • Single runs. The fifteen tests ran once; the no-empty-reply result is two data points with generous limits. The coding session shows the model can hold a real multi-turn agent session, edit minimally and decline to make things up, but it is not a pass rate and says nothing about large codebases, other languages or repeatability.
  • Same output with and without the helper rests on how the method works and the identical vocabularies, not on a side-by-side test with the same seed.
  • Long prompts barely tested on the single-desktop setup. The file declares 262,144 tokens; the default here is 32,768, 65,536 was tested once, and the largest prompt sent on the single-desktop setup is 12,367 tokens. Finding one hidden item was tested once, at that size. A longer prompt on a different setup is under Corrections and updates.
  • One build, one machine, single requests. The main results are the UD-Q4_K_XL build on one desktop. The vision part was never loaded, so images were not tested. The larger 8B helper, the next step if acceptance proved high (it did), was never tried.
  • No quality score of our own. Mistral's published figures (77.6 percent SWE-Bench Verified, a coding benchmark, among them) are for the official model, not this build on this machine. The quality cost of the compression and Unsloth's quality claims were not tested.
04

Corrections and updates

Update · 2026-09-16 · a longer prompt, a different setup

On 2026-09-16 a 32,509-token prompt was sent to a different build of this model, Q3_K_S, split across the desktop and the Z13 laptop, an ASUS laptop, over RPC (llama.cpp's link between machines), with the same vocabulary-patched Ministral 3 3B Q4_K_M helper, here guessing up to 7 tokens rather than 16. Reading the prompt took 1,027.07 s (31.65 tokens a second); the reply ran 331 tokens at 2.824 tokens a second, build b10919-d3146f2b5. Context 131,072, both caches q8_0, layers split 16 on the desktop and 72 on the laptop, helper on the desktop only, one request, no cached prompt tokens. Token counts and times are from the published result file; the placement and helper are from the launch record. The UD-Q4_K_XL readings stand as dated readings of that setup. Two sentences on this page said no larger prompt had been sent; they were false, and now apply to the single-desktop setup only. The redacted result: data/pair16-depth-draft-simple-32000.result.json, mapped in data/NUMBERS.md.

Correction · 2026-11-21 · the size of Qwen3-Coder-Next

This page called Qwen3-Coder-Next a 32-billion-parameter model. Its maker gives 80 billion parameters in total, with about 3 billion active at a time, and our own count of the file agrees (about 79.7 billion). The comparison line now says so. Its timing and result are unchanged.

05

How this was measured

DatesMain runs 2026-08-06; file headers and sizes re-read and saved test folders re-run 2026-08-08; longer prompt 2026-09-16.
ModelMistral AI. Per the card, its first flagship merged model (instruction following, reasoning and coding in one set of weights), open weights since late April 2026; text and image input, run here as text only.
Dense, checkedNo expert tensors: no expert counts, no routing, all 88 blocks carrying the same nine tensors.
Parameters"128B" is the maker's name. All 795 tensors summed: the served text model is 125,025,988,608 (125.03 billion). A separate 2.68-billion-parameter vision part sits on disk, unloaded; together they round to 128 billion.
Attention96 query heads, 8 key-value heads (grouped-query), head dimension 128, across 88 blocks.
ContextThe file declares 262,144 tokens (the card markets 256K), via YaRN. Stated, not measured.
Vocabulary131,072 tokens, 269,443 merge rules.
LicenseMistral's Modified MIT License: close to MIT but not MIT; the grant falls away for companies above a stated revenue threshold.
FileUnsloth's UD-Q4_K_XL build (GGUF, the file format llama.cpp loads) at pinned revision c8f5b147: 3 files, 75.69 GB (70.49 GiB). Mixed precision across 795 tensors: 379 at 4-bit, 215 at 6-bit, 24 at 5-bit, 177 at full precision. Sizes re-checked against the saved manifest on 2026-08-08; SHA-256 checksums recorded at download against the repository listing. The dense, parameter, attention, context and vocabulary rows were read from the file headers only; the other model rows are the maker's claims.
HelperMinistral 3 3B Instruct 2512, Q4_K_M, with the two-token patch.
MachineOne NVIDIA GeForce RTX 5090 with 32,607 MiB of graphics memory, Intel Core Ultra 9 285K (24 cores), 188 GiB of system RAM, weights on a consumer 4 TB NVMe SSD.
RuntimeMainline llama.cpp, commit 5f55650a, CUDA 12.8; no fork, no patch.
EvidenceA 15-step placement and helper test series with a server log per step; the fifteen functional tests with request bodies; server logs for the timed session and the comparison.
06

Data and sources

Independent measurements. Not affiliated with, endorsed by, or connected to Mistral AI, Unsloth, or ASUS.