mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3871] [CLOSED] [Benchmark] kq_cpu_bench: i-quant pairs no longer crash (IQ3_S), Q2_0 timed on the CPU pool's path #4810
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4810
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3871
Author: @Licenser
Created: 10/23/2026
Status: ❌ Closed
Base:
main← Head:kq-cpu-bench-formats📝 Commits (1)
b5dadcekq_cpu_bench: i-quant test blobs from ggml_quantize_chunk (IQ3_S crashed), and Q2_0 rows on the pool's own path📊 Changes
1 file changed (+50 additions, -10 deletions)
View changed files
📝
src/kernels/cpu/kq_cpu_bench.cpp(+50 -10)📄 Description
Problem and result
kq_cpu_benchhad two problems with expert formats the engine uses:make_blobquantized its random test rows with ggml-cpu's type traits'from_float,which the i-quants do not have, so an IQ3_S pair called a null pointer: an access violation on Windows, SIGSEGV
(exit 139) on Linux, before the first timing.
The CPU pool runs Q2_0 experts on Strata's own rows instead (
pool.cpp, drain modes 5 and 6), so the benchreported a Q2_0 cost about 2.7x higher than the pool's.
After this change all pairs run, and a Q2_0 matrix is timed the way the pool runs it. Threadripper 3960X, one
thread,
--threads 1 --nt 1 --reps 3:7ddc17a3)iq3_s/q2_0q2_0/q2_0Related discussion
None. The change only touches the bench tool (
src/kernels/cpu/kq_cpu_bench.cpp); the engine is unchanged.Approach
make_blobquantizes withggml_quantize_chunk, with a flat importance matrix where the type requires one(
ggml_quantize_requires_imatrix). The blobs keep valid scales and the real sizes, as before.ActQ(act_quant_any), Strata's Q2_0rows (
q2_rows_any), SwiGLU in between. The pair's header line says when that path is taken("Q2_0 down on Strata's rows (the pool's path)"). Other formats keep ggml-cpu's dot, as before.
Validation
Passed:
7ddc17a3), CPU-only build (-DCMAKE_BUILD_TYPE=Release), Linux, GCC 15.2, Threadripper3960X:
kq_cpu_bench --pairs iq3_s/q2_0,iq2_xs/q2_0,q2_0/q2_0 --threads 1 --nt 1 --reps 3runs all three pairs,exit 0 (0.573, 0.349 and 0.294 ms per expert per thread).
--pairs q2_0/q2_0alone: 0.272 ms.7ddc17a3on the same machine:--pairs iq3_s/q2_0ends with SIGSEGV (exit 139);--pairs q2_0/q2_0: 0.742 ms per expert per thread.477ac13c, CUDA sm_75 build):--pairs iq3_s/iq4_nl,iq2_xs/q2_0ran, 0.661 and0.391 ms per expert per thread.
Failed:
Not run:
Limits
pool.cpp's current drain modes 5 and 6; if the pool's Q2_0 path changes, the bench has tofollow it.
Used Claude.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.