Skip to content

b10091: ~35% generation speed regression on 8GB VRAM — 3 root causes identified (fit+no-mmap incompatibility, GPU not boosting, CPU MoE regression) + 30+ tuning experiments #26025

Description

@Sensenkawa

b10091: ~36% generation speed regression on 8GB VRAM — GPU not boosting to max clock, fit abort limits offload

Environment

Field Value
GPU NVIDIA GeForce RTX 4060 Laptop 8GB (driver 610.62)
CPU Intel Core Ultra 5 125H (16 logical cores)
RAM 24 GB DDR5
OS Windows 11 24H2
llama.cpp b10091 (commit b4d6c7d8f), CUDA 13.3 build
Previous working b9536 (commit 308f61c31), CUDA 13.3 build
Model Ornith-1.0-35B-MTP-APEX-I-Quality.gguf (35B MoE, 21GB, IQ3_S, MTP-enabled)

Test configuration (identical on both versions)

llama-server.exe ^
  -m "models\Ornith-1.0-35B-MTP-APEX-I-Quality.gguf" ^
  -ngl 999 ^
  --n-cpu-moe 35 ^
  --flash-attn on ^
  --jinja ^
  -c 102400 ^
  -np 1 ^
  --no-warmup ^
  --no-mmap ^
  --fit on ^
  --fit-target 640 ^
  -t 14 ^
  --cpu-range 0-15 ^
  --cpu-strict 1 ^
  -tb 8 ^
  -b 512 ^
  -ub 512 ^
  --cache-type-k q8_0 ^
  --cache-type-v q8_0 ^
  --cache-type-k-draft q8_0 ^
  --cache-type-v-draft q8_0 ^
  --prio 2 ^
  --cache-ram 2048 ^
  --mlock ^
  --poll 50 ^
  --spec-type draft-mtp ^
  --spec-draft-n-max 4 ^
  --spec-draft-p-min 0.55 ^
  --temp 0.6 ^
  --top-k 20 ^
  --top-p 0.95 ^
  --presence-penalty 0.3 ^
  --frequency-penalty 0.3 ^
  --repeat-penalty 1.0 ^
  --port 8080

Speed comparison (V2 benchmark, Hot phase)

Metric b9536 🏆 b10091 ❌ Change
Hot Short gen 37.9 t/s 25.3 t/s -33%
Hot Long gen 29.3 t/s 22.4 t/s -24%
Hot Agent gen 34.9 t/s 10.2 t/s -71%
Hot RealSim gen 27.4 t/s 25.0 t/s -9%
Hot average 32.4 t/s 20.7 t/s -36%
MTP draft acceptance 69-93% 69-88% Similar

Note: The Agent test's 71% drop is likely due to the short multi-turn nature of the test amplifying the GPU clock issue. RealSim (longest, most sustained) is least affected at -9%.

GPU clock analysis

The GPU's maximum clock is 3105 MHz, but during inference on b10091 it only reaches 1200–1455 MHz — less than half of its potential. The GPU does enter P0 (the highest performance state), but the actual clock within P0 is far below the card's rated maximum.

Phase P-state Actual clock Max possible Power
Idle P8 210 MHz 3105 MHz 1.4 W
Cold Short P8→P4 210→465 MHz 3105 MHz 12 W
Cold Long P4 465→900 MHz 3105 MHz 12 W
Warmup P0 1200 MHz 3105 MHz 19 W
Hot Short P0 1200 MHz 3105 MHz 19 W
Hot RealSim P0 1455 MHz 3105 MHz 23 W

The GPU is in P0 but clocked at 1200-1455 MHz instead of the expected 2500-3105 MHz. This is the primary cause of the ~36% speed regression.

Fit abort analysis

b10091's --fit allocates less VRAM than b9536:

Metric b9536 b10091
VRAM used after fit ~7901 MiB 6581 MiB
Offload headroom ~180 MiB ~1500 MiB wasted

The --fit algorithm on b10091 aborts early, leaving ~1.5 GB of VRAM unused. This means fewer layers are offloaded to the GPU, and more computation runs on the CPU, compounding the GPU clock issue.

Summary

The ~36% regression is caused by two factors:

  1. GPU not reaching max boost clock: P0 is entered but clocks only reach 1200-1455 MHz instead of 2500-3105 MHz. This suggests a change in how b10091's CUDA kernel launch pattern interacts with the NVIDIA driver's boost algorithm.

  2. Fit abort leaves VRAM unused: --fit only allocates 6581 MiB vs 7901 MiB on b9536, wasting ~1.5 GB of VRAM and reducing GPU offload.

Both issues are absent in b9536 on the exact same hardware, configuration, and model.

Correction note

An earlier version of this report claimed 70-80% regression. That was a false alarm caused by missing cudart DLLs in the test environment — the server fell back to full CPU execution. After installing the correct CUDA runtime DLLs, the real regression is ~36% as documented above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions