Files
leleka/crates/cpu-kernels/tests
Pavlo RatushnyiandClaude Sonnet 5.5 68fcd8de1c perf: use the pre-converted activation layout and 4-accumulator kernels for the MXFP4 experts (STRA-214)
The expert products (62 percent of a decoded token) now read the activation as f32
scales plus contiguous int8 quants, summed with four accumulators per iteration.
Adds the portable reference and the AVX-VNNI kernel for that layout; the AVX2 and
AVX-VNNI kernels are tested bit-identical to each other, and every level is within
the stated tolerance of the ggml-derived f64 reference. The decoder keeps both the
Q8_0 blocks (for the Q8_0 attention and output head) and the converted layout.

Measured on the real model with pre-touched pages, 10 threads, 40 tokens, alternating
old and new binaries (5 repeats; indicative, one burst-state outlier excluded): paired
old/new ratios 1.09, 1.14, 1.08, 1.06, i.e. about 8 percent less time per token (118 to
111 ms median), expert gate+up 41.6 to 37.6 ms. Greedy tokens are identical to
llama.cpp for the first 16 and to the previous build for the first 18; they diverge at
position 18 where the top-two logit gap is 0.009 (a numerical tie).

Also adds a per-step top-two logit margin print to the real-model runner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:03:33 +02:00
..