You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] GGUF_CPP's documented 2e-2 activation-quantization bound is exceeded 2–4× with outlier channels, and the CPU path now always uses the lossy native matmul (incomplete fix of #4219) #4316
gguf_cpp.py:1122: _use_ggml_cpu_matmul now returns True whenever a vec_dot exists.
docs/gguf-cpp-activation-quantization.md.
Description
The bound was measured only on Gaussian activations. The fix says the Q8 activation loss "is bounded by" 2e-2, and stays within 1e-2 on CPU. ggml quantizes activations in 256-element blocks, so one large channel in a block, which is typical of LLM hidden states, wipes out the precision of the rest of the block.
The CPU path is now always lossy. Before 77930e3, the native path ran only when a timing check found it faster; now it is unconditional on CPU.
With outliers (16 of 4096 channels scaled ×100): rel 0.033, worst row 0.084.
Across a sweep (Q4_K/Q6_K × K 4096/11008 × fp32/bf16/fp16): 0.030–0.041 on CPU, and up to 0.0167 on CUDA fp32/bf16.
Even Gaussian Q6_K fp32 on CPU reaches 0.018, against the claimed 1e-2.
Expected:
Either the bound holds for realistic activation distributions, or the docs stop presenting it as a bound.
An exact CPU path can be selected through config or API, not only an env var.
Found during an AI-assisted review (Claude Code, round 11) of 842d666; repros were run at that commit on RTX 4090/5090 (CUDA 13) and/or Radeon AI PRO R9700 (ROCm) unless marked static/suspected.
Taking this. I'll investigate against current main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.
Fixed in #4341: GGUF_CPP CPU kernels now accept exact_matmul=True for the exact path, and the docs state the measured Gaussian vs outlier envelope (worst row 8.4e-2) instead of presenting 2e-2 as a bound.
Activity
Qubitium commentedon Nov 16, 2026
Taking this. I'll investigate against current
main, add a targeted regression test, and open a PR. Will report back here if the claim turns out to be invalid or already fixed.Qubitium commentedon Nov 16, 2026
Fixed in #4341: GGUF_CPP CPU kernels now accept
exact_matmul=Truefor the exact path, and the docs state the measured Gaussian vs outlier envelope (worst row 8.4e-2) instead of presenting 2e-2 as a bound.fix: make exact GGUF_CPP CPU matmul selectable and correct accuracy d…