MadWeightsOpen weights research. The Raw Uncut.
TESTING ·

llama.cpp 1.0 tuning flags on three V100s: a larger batch cuts long-prompt reading by a third

A larger physical batch cut the cold read of a 24,340-token prompt from 88.2 s to 59.8 s on llama.cpp 1.0.0, with no change to the output. Turning memory-mapped loading off cut start-up from 490 s to 129 s but barely moved reading speed. An 8-bit KV cache saved 0.85 GiB of VRAM and changed the output distribution.

Setup

  • Model: Qwen3.8-Flash-Next, Unsloth UD-Q4_K_XL, 5.0 bpw, 111 GB file, 177 billion parameters.
  • Engine: llama.cpp v1.0.0 (commit b1b770d), no draft model.
  • Server: Dell R740, 2 × Xeon Gold 6132 (28 cores), 3 × Tesla V100 32 GB (96 GB of VRAM), PCIe 3.0, 144 GB of RAM.
  • All layers sit on the GPUs.

Method

Each run changed one setting against the launch flags of our earlier llama.cpp 1.0 and Strata comparison:

  • Load mode none and load mode mlock (default auto).
  • Physical batch of 2048 and of 4096 (-b/-ub; defaults 2048 and 512).
  • An 8-bit KV cache (-ctk q8_0 -ctv q8_0).

Each run had one cold start and one pass of the test battery. For output fidelity, each run was compared with the baseline on 45 prompts using the top-20 first-token probabilities, restricted to tokens both runs list and renormalised.

Results

RunStart to readyCold read, 7,501 tokensCold read, 24,340 tokensOne request, six workloadsFour at once, totalProcess RAM when readySame first token as baseline
Baseline490 s287 tok/s (26.1 s)276 tok/s (88.2 s)45.6 to 46.6 tok/s89.346.0 GiBreference
Load mode none129 s285 tok/s (26.3 s)297 tok/s (81.8 s)44.1 to 45.987.21.7 GiB45 of 45, KL 0.0000
Load mode mlock129 s287 tok/s (26.1 s)299 tok/s (81.4 s)45.4 to 47.189.01.7 GiB45 of 45, KL 0.0000
Batch 2048144 s384 tok/s (19.5 s)370 tok/s (65.7 s)44.4 to 46.884.72.6 GiB45 of 45, KL 0.0000
Batch 4096144 s393 tok/s (19.1 s)407 tok/s (59.8 s)45.1 to 46.886.42.1 GiB45 of 45, KL 0.0000
q8 KV420 snot runnot run43.8 to 46.586.846.0 GiB42 of 45, mean KL 0.033, median 0.011

Batch size

The 24,340-token cold read fell from 88.2 s to 65.7 s at batch 2048 and to 59.8 s at batch 4096. Single-request speed stayed at or above 44 tok/s in all six workloads, and the first-token check matched the baseline on all 45 prompts.

Adding about 2,200 tokens to an 8,000-token conversation took 8.6 s at baseline, 6.7 s at batch 2048 and 6.3 s at batch 4096. Small additions stayed at 1,030 to 1,092 ms median in every run.

The larger batch has two costs:

  • The four-request total dropped from 89.3 to 84.7 (batch 2048) and 86.4 (batch 4096).
  • VRAM use rose. At batch 4096 the three cards held 31556, 30244 and 28782 MiB against 29450, 28212 and 26748 at baseline, and the first card reached 32082 MiB after the battery. Batch 4096 also logged a failed 5,009 MiB compute-buffer allocation on the first card at start, retried without pipeline parallelism, and then ran.

Load mode

NetworkCoder's video "llama.cpp 1.0 Is Finally Out... And It Just Got Twice as Fast" reported reading speed nearly doubling with a pinned load. That did not appear on this server. The 24,340-token cold read moved from 88.2 s to 81.8 s (none) and 81.4 s (mlock), and mlock matched none on every measure.

The video's machine kept experts in system RAM beside a 12 GB card. Here every layer is on a GPU, so there are no host-side experts for the load mode to speed up.

Start-up did improve: start to ready fell from 490 s to 129 s, and process RAM when ready fell from 46.0 GiB to 1.7 GiB.

8-bit KV cache

The q8 cache saved about 284 MiB per card, about 0.85 GiB in total, with no speed change. Its first-token check came in at 42 of 45 with mean KL 0.033 and median 0.011, against a noise floor of mean KL 0.005 set before the test. That is a measurable change to the output, so we do not recommend it without a quality evaluation. The FP8 cache was not attempted.

What did not change

Generation with 24,000 tokens of context ran at 40 to 43 tok/s in every run. The expert cache was not tested, because with all layers on the GPUs it has nothing to hold.

Against Strata

The best llama.cpp read here, 59.8 s for 24,340 tokens, is still well behind Strata's published 16 to 26 s for a 24,000-token read on the same server.

Limits

  • The baseline here (88.2 s at 24,340 tokens) is faster than the 99 to 106 s in our earlier comparison. The server gained 64 GB of RAM between the two, and the page cache was not dropped between runs. Compare the rows of this table with each other, not with the earlier figures.
  • Start-up times after the baseline benefit from the file already being in the page cache.
  • Each run had one cold start and one battery pass, so there is no run-to-run spread.
  • The process memory cap was 46 GB on the baseline and q8 runs and 72 GB on the others. No run came near 72 GB.

Open questions

  • Upload and CPU-read rates for experts held in system RAM on this server, which need a run with some layers off the GPUs.
  • Whether the q8 KV cache changes task accuracy, not only first-token probabilities.

Source video: "llama.cpp 1.0 Is Finally Out... And It Just Got Twice as Fast", NetworkCoder.