llama.cpp and Ollama settings that fail silently: 12 cases
On one RTX 5090 desktop in September 2026, twelve settings in llama.cpp, our start scripts and one Ollama default cost speed or correctness, mostly with no error. A micro-batch setting of 128 (how many prompt tokens are read at a time) made MiniMax M2.7 and Laguna S 2.1 read prompts 17.5 and 19.9 times slower than they could, worked out from the measured rates in item 05.
Check the micro-batch (-ub). With the model's expert weights held in system RAM and a 131,072-token window, a leftover -ub 128 made MiniMax M2.7 read one 3,658-token prompt at 32.3 tokens a second; -ub 4096 read it at 564.0. Test a bigger value at every window size you use. Item 05, item 04
On the CPU, set Ollama's thread count yourself (num_thread). With the vision model Qwen3-VL 30B-A3B, one run each, a 4K picture took 273.17 seconds at the default of 4 of 24 threads and 111.01 at 16. Item 13
Eight checks cover ten of the twelve items; items 11 and 12 need a test load instead. Run them in order: before the start, after it, then on the first requests. Log wording can differ by build.
Every list the launch line uses is filled in.grep -n -E '\[@\]|=\(' start_server.sh (item 09)
What the script sees, not what you exported.FOO_PORT=8199 bash -c '. settings.env; echo $FOO_PORT' (item 10)
Read the arguments the server really got.tr '\0' ' ' < /proc/PID/cmdline (item 05)
Read the window it serves (n_ctx). curl -s http://127.0.0.1:PORT/props (items 02, 03)
Spare card memory, at load and at the peak of a long read. nvidia-smi --query-gpu=memory.used,memory.total --format=csv (items 03, 04, 07)
The thread count Ollama chose, then set num_thread. On a standard Linux install: journalctl -u ollama | grep n_threads (item 13)
Time the second long request as well as the first. (item 06)
02
What we found: the twelve items
Item 02 · The window you pass is not the window you serve
Symptom
A start script serves the window you pass it (the context window: how much text the server holds at once); with nothing passed, its installed default, which can differ. The log shows only the window served, and a speed measured with the window passed says nothing about the default.
Check
Start once with nothing passed; run checks 4 and 5.
What it cost
Our 15 September list of endpoints put all 22 at 128K. By 26 September ten rows of the roster served more than 131,072 by default, each shown by a start that passed no window. That evening, 21:06 to 21:13, four installed scripts started with nothing passed served 262,144, 262,144, 196,608 and 262,144 (measured 2026-09-26). September roster, section 05 (the 15 September list and the ten rows) and section 03 (each row's window cell).
Item 03 · A window past the file's training length is capped, and the card still pays for it
Symptom
Ask for 524,288 on a file trained to 262,144 without the rope-scaling flags (settings that stretch a model's position encoding past its trained length). The server logs that it is capping, but the card holds the memory of the window asked for.
Check
Checks 4 to 6, against a plain load at the capped window.
What it cost
Qwen3.8-Flash-Next, 20 September: asked for 524,288 with no rope flags, it served 262,144 and peaked at 23,816 MiB, the same as a genuine 524,288 window with the flags (23,814) and 8,422 MiB more than a plain 262,144 load (15,394; the difference is arithmetic, worked out from measured figures). The capped server was up in 2 seconds; the plain 262,144 load's probe logged a 600-second timeout (measured 2026-09-20). September field notes, section 09.
Item 04 · A micro-batch that loads at one window fails at another
Symptom
-ub 4096 loads and reads fast at 131,072. At the model's full window the same script dies at load (a refused CUDA buffer) or peaks within a few hundred MiB of the card's total.
Check
Load at every window the script offers; read the compute buffer at load and the peak card use in one long read.
What it cost
MiniMax M2.7 read 43,909 tokens at -ub 4096 at 131,072; at its 196,608 window 4096 was refused (a 2,916.16 MiB buffer), 2048 failed too, and only 1024 loaded, at 31,560 MiB. GLM-5.3-Flash at 262,144: its 131,072 setting, -b 4096 -ub 4096, was refused (a 13,281.37 MiB compute buffer); 2048 loaded and read 230,039 tokens but peaked at 31,951 MiB, 656 below the card's total, and the script ships 1024 there. Four other scripts used llama.cpp's default above 131,072, unmeasured; on 26 September two were measured at 262,144: Ornith-1.5-35B's now sets -b 2048 -ub 2048, Qwen3.5-122B's keeps 512 for the card's sake; the Qwen3.5-397B and Mistral Small 4 scripts still do (measured 2026-09-19 to 2026-09-26). Batch-size study, section 04.
Item 05 · An inherited micro-batch
Symptom
A prompt reads many times slower than the same model can: 17.5 times on a 3,658-token read and 19.9 times on a 24,071-token read (arithmetic on the rates below). At the log level our scripts use, the logs we kept do not print the batch sizes at load.
Check
tr '\0' ' ' < /proc/PID/cmdline | grep -o -E -- '(-ub|--ubatch-size) [0-9]+'. No match means the build's default, 512 on the builds we ran. A value copied from another script is worth one long read at 2048 and at 4096.
What it cost
Laguna S 2.1 ran --batch-size 512 --ubatch-size 128 from July to 21 September, for no recorded reason. At its 32,768 window a 24,071-token read took 333.2 seconds at 72.2 tokens (word pieces) a second (t/s), and 16.8 seconds at 1,434.0 t/s with -b 8192 -ub 8192, the code correct at both; writing speed on the 12-token answer fell from 18.40 to 16.50 t/s. MiniMax M2.7 was first judged at -cmoe -ub 128, flags from the MiniMax M3 start script: with -b 4096, every expert layer in RAM (-cmoe) and a 131,072 window, one 3,658-token prompt read at 32.3 t/s at -ub 128 and 564.0 at -ub 4096. Its 96,000-token check, scored “l128 recall 0/3” when the turn ended at 1,800.4 seconds, had timed out against that flag (measured 2026-09-19 and 2026-09-21). Batch-size study, sections 03, 06 and 13; September field notes, section 03 (the 1,800.4 seconds and the -ub 128 cause) and section 15 (the score string).
Item 06 · The first read after a start pages the file in
Symptom
The first long request after a start reads at a fraction of the model's rate; the second reads at the full rate. Nothing says the file was still coming off the disk.
Check
Time the second request too, or check how much of the file is in memory (the page cache) first: fincore from util-linux, or vmtouch.
What it cost
Qwen3.8-Flash-Next, 26 September, one start with none of its 90 GB file in memory and 43.5 GB there after the load: the first request, 3,035 tokens, read at 87.7 t/s while the file's share grew to 57.7 GB; the next 3,019 tokens read at 517.6. A server started with 60.05 GB already in memory read its first request at 253.7 and its second at 255.7 (measured 2026-09-26). It is the only cold start recorded: what it did, not a rule. Batch-size study and 256K study, section 04 of each.
Item 07 · Every expert in system memory leaves the card idle
Symptom
A mixture-of-experts model (only some parts, called experts, run for each token) served with -cmoe, every expert layer in system RAM, leaves the card room to spare, silently.
Check
After load (check 6), step --n-cpu-moe (how many layers keep their experts in RAM) down a few values with one prompt, reading card use and writing speed at each step. On this model the first step bought nothing and the third did, so one step is not a test.
What it cost
MiniMax M2.7 (table below): with every expert layer in RAM the card had 8,311 MiB spare; 60 layers gained 0.23 t/s. At the 196,608 window it now serves by default it forces every expert into RAM with -ub 1024, the one shape that loads there; a start with no window passed on 26 September held 31,512 MiB at load.
Experts in RAM
Card after load, MiB
Spare of 32,607
Prompt speed, t/s
Writing, first request
Writing, repeat
all 62 layers (-cmoe)
24,296
8,311
640.2
9.04
8.95
61 of 62
25,884
6,723
636.2
8.97
9.08
60 of 62
27,483
5,124
644.9
9.27
9.48
59 of 62 (the script's 131,072 default)
29,094
3,513
656.5
9.83
9.77
58 of 62
30,695
1,912
666.1
10.02
9.68
2026-09-19, one run per row: Unsloth's UD-IQ4_XS file, build 10919, a 131,072 window, an 8-bit cache, -ub 4096; one 43,909-token prompt, a 32-token answer, then the same prompt again (a cache hit). Card memory is read after load, not at the peak of a long read; the spare is arithmetic. Writing speed on 32 tokens is not prose speed; the whole gain is under one token a second, and the repeat moved by up to 0.34 t/s (58 layers: 10.02, then 9.68), more than the 0.19 step from 59 to 58.
Item 08 · Sparse attention that runs dense
Symptom
MiniMax M3's sparse attention (MSA: each token attends to a selected part of the context) runs dense unless flash attention is on and the cache has one sequence per stream: one slot (one request at a time), or a cache that is not unified (each request keeps its own). The source warns output may be degraded; the only sign is the load line running DENSE attention (check 5). Keep --flash-attn on and --parallel 1.
What it cost
No number was lost to this: our M3 test script searches its log for those lines first, and the start script sets both flags. A related trap did: the first M3 file here predated llama.cpp's support for this attention, with zero indexer tensors (the parts that choose what sparse attention reads) among its 948, so every M3 number we had before the correct file arrived on 20 September was a dense fallback (measured 2026-09-19). Source lines: src/models/minimax-m3.cpp at commit d3146f2b5 (build 10919), lines 228 to 244, checked against upstream on 26 September; September field notes, section 04.
Item 09 · A cache the script promised and never set
Symptom
A comment promises the 262,144 window an 8-bit cache (the memory holding the conversation so far) “for you below”. The launch line expands a bash array, KVARGS, that nothing assigns; under bash 5.2 with set -u it expands to nothing, the shell check exits 0, and the server starts with the default 16-bit cache.
Check
grep -n KVARGS start_server.sh: every array the launch line expands needs an assignment. Or read the cache type from the server log, not the comment.
What it cost
For nine days by the file times, 17 September 16:10 to 26 September, the Qwen3.6-27B script offered a 262,144 window its launch line could not serve. The assignment was added on 26 September; the copy dated 2026-09-26 22:28 says the setting had “started with an f16 cache that cannot fit”. No run through the script at that window in those nine days is in the records we read.
Item 10 · A settings file wins over your environment
Symptom
You export a test port and run the start script. It binds its usual port without a word.
Check
Check 2. Of the 26 start scripts here, nineteen source their settings file before any ${VAR:-default} read; the twentieth, MiniMax M2.7, reads only the file's location first and sources it on the next lines; six have none. In all twenty a NAME=value line in the file wins, by design.
What it cost
A 17 September session note records two verification runs misread as failures for this reason; the runs' logs were not kept, so it is a dated note, not a measurement.
Item 11 · A header that said the draft head did not work
Symptom
The GLM-4.7 Full script's header said the draft head (--spec-type draft-mtp, a small part that guesses tokens for the model to check) “DOES NOT WORK on this model here”, blaming the source. The library it loads has the head: graph_mtp appears 252 times in its strings, and its source tree's 444-line glm4-moe.cpp has it; the note described a 284-line older tree with a TODO there.
Check
Test the flag on the binary you run, at a small window, and read the log; when a note blames a build, search the tree the binary was built from: grep -c graph_mtp src/models/<arch>.cpp.
What it cost
From 12 to 17 September GLM-4.7 Full served at 131,072 without its draft head: the September roster's row 13 prints 5.51 t/s writing paragraph replies, the better of two, on 2026-09-12, with a 5-bit cache and llama.cpp's default batch, at the script's setting 131072/92/q5_1 (experts of 92 layers in RAM). The script's dated note records 7.02 t/s for 131072/93/q5_1 with the head, every expert in RAM (at 92 it died with “failed to create MTP context”); 7.41 at 65,536 with --n-cpu-moe 92 and the head on; and one matched pair at 32,768 and --n-cpu-moe 92, 5.23 without the head and 6.54 with it, three runs each. No kept log compares the head on and off at the same window and placement.
Item 12 · A flag in --help the build cannot load
Symptom
llama-server --help lists draft-dspark. Loading DeepSeek V4 Flash's DSpark draft file on that build dies with key not found in model: dflash.attention.sliding_window_pattern.
Check
A name in --help comes from a parser table (common/speculative.cpp). Whether the loader can read the file is answered by one load.
What it cost
A 17 September note records the failure on the older build (commit 5f55650); the log was not kept. The files show that the draft's header carries dflash.attention.sliding_window = 128 and no sliding_window_pattern key; that build's loader requires the pattern key whenever a window is set (src/models/dflash.cpp, lines 25 to 27); the newer build (commit d3146f2b5) reads the draft through its own branch that does not. The builds are not interchangeable for this draft, and the older one's help text does not say so.
Item 13 · Ollama's default thread count on the CPU
Symptom
A vision model on the CPU takes minutes on its first picture. With no thread count set, Ollama picks one and logs it only at load.
Check
Read the load line, system_info: n_threads = ... (check 7); then pass num_thread, cap the picture's long side, and compare processing time on one picture.
What it cost
Qwen3-VL 30B-A3B through Ollama on the CPU, 20 September, the same 4K picture first each time, cold, model load included, the card all but empty (1,040 MiB in use). With no thread count set, the log reported n_threads = 4 (n_threads_batch = 4) / 24, and the picture took 273.17 seconds of wall time, its 4,154 image-and-prompt tokens processed in 242.93 seconds; 157.31 at 8 threads (123.53 processing); 111.01 at 16 (87.77); 107.88 at 24 (76.57). At 16 threads with the picture capped at 1,536 pixels: 1,370 tokens in 18.17 seconds, 38.52 of wall time (measured 2026-09-20). Answers ran from 174 to 303 tokens, so wall times include unequal output.
03
Limits
One machine. Settings caught on one desktop, each an interaction of a default, a file and a script, mostly our mistakes; how common any is elsewhere is unknown. Output quality was checked only by codes and strings hidden in prompts for the model to find.
Notes and source. Items 10, 11 and 12 rest on dated notes whose run logs were not kept; what the files show for 11 and 12 is verified. Item 08's fallback was read from source; no log here shows the warning.
Single runs. The M2.7 rows (item 07) are one run each, 61 layers was slower than all 62, and run-to-run variation is untested; the card-memory figures, read after load, are the point. The Ollama rows (item 13) are one picture, one run each.
Builds move. A later llama.cpp commit can change any source line here, including whether a log prints a batch size; if you read this long after September 2026, treat build-specific items as unverified since then.
04
Corrections and updates
Update, 25 October 2026: five more
This page stays the September list of twelve. Five more turned up between 29 September and 25 October 2026; the pages that measured them hold the records: threads spread over every core instead of pinned (cores 0 to 7 with taskset, 8 threads and an OpenMP spin setting) (the October roster, section 02); a reasoning word the chat template does not know, so GLM-5.3-Flash ran at maximum effort when asked for none (the October field notes, entry 06); no cap on reasoning, so a thinking model spent its whole reply budget thinking and wrote no answer (field notes, entry 06); an 8-bit or 4-bit cache that is slower deep in a conversation (field notes, entry 08); and knowledge-base vectors of the wrong length, which make meaning search fail with no error (field notes, entry 02).
Already corrected on earlier pages:
Item 02, the served windows: September roster, section 05.
Item 05, the inherited micro-batches: batch-size study, section 13; the timed-out check: September field notes, sections 03 and 15.
Item 08, the M3 file without its index: September field notes, section 04.
Corrected here first:
Item 07: an idle card a first placement step did not fix.
Item 09: a script that promised a cache it could not set for nine days.
Item 10: a settings order that misled two verification runs.
Item 11: a header that blamed a build for a head the binary carried.
Item 12: a note that took a name in --help for a capability.
05
How this was measured
Machine
One desktop, 12 to 26 September 2026: an RTX 5090 with 32,607 MiB as nvidia-smi reports it, 188 GiB of RAM and a 24-core Core Ultra 9 285K.
Servers
llama.cpp's llama-server at the builds each record names, started by our own scripts; Ollama 0.30.10 for item 13, as its server logged on 19 September.
06
Data and sources
This page's package: data/README.md maps every file and its redactions; data/NUMBERS.md maps every figure to its file or page.
Independent measurements; no affiliation with the
llama.cpp project, ggml-org, Ollama, MiniMax, Z.ai, DeepSeek, Alibaba
Group, Poolside, Unsloth, NVIDIA, Intel, or the makers of the other
models the package's tables name (Google, Mistral AI, Moonshot AI,
Thinking Machines Lab, inclusionAI, Meta, Ornith AI).