mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3523
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/1544
Author: @stuchapin909
Created: 10/8/2026
Status: ❌ Closed
Base:
main← Head:pr/iq2s-singleton📝 Commits (2)
1ba010ecpu: add bit-exact AVX2 singleton expert rows9d0614fcpu: IQ2_S in the bit-exact singleton rows; the singleton path only below the #152 rule📊 Changes
7 files changed (+203 additions, -5 deletions)
View changed files
➕
bench/results/2026-10-07-cpu-singleton/README.md(+49 -0)📝
include/strata/kernels/cpu/iq_avx2.hpp(+5 -0)📝
src/kernels/cpu/iq_avx2.cpp(+34 -0)📝
src/kernels/cpu/iq_avx2_parity.cpp(+25 -0)📝
src/kernels/cpu/iq_avx2_rows.inl(+57 -5)📝
src/kernels/cpu/native_expert.cpp(+14 -0)📝
src/kernels/native_expert_parity.cpp(+19 -0)📄 Description
Summary
Stacked on #1415 (InB4DevOps), one commit on top of
1ba010e. Two changes, both behind #1415's opt-inSTRATA_CPU_IQ_ALL_EXACT1=1; with the switch unset nothing changes.ggml_vec_dot_iq2_s_q8_Ksums the same int32 lanes asrow_dot_ggml_one(one scale per 16 values, even and odd 32-value groups in two accumulators, one FMA per block) and ends with0.125f * hsum_float_8, so the existing routine gives its bits once 22/122 take the 0.125 return. IQ2_S is the gate/up format of 34 of 48 layers in Swift IQ2_XS and 20 of 48 in the GSQ-RCO IQ3_S pack, the largest share in both.nt < native_gu_mt_min). In #1415 the gate comes before the #152 rule, so withSTRATA_IQ_MT_MIN=1a lone token took ggml's rounding while a group kept the multi-token kernel's, andnative_expert_parity --syntheticfailed its width-invariance check with the switch on (reported in #1415). With this,STRATA_IQ_MT_MIN=1behaves as without the switch.What changed
src/kernels/cpu/iq_avx2_rows.inl:row_dot_ggml_onereturns0.125f * ggml_hsum8for 22 / 122 too.src/kernels/cpu/iq_avx2.cpp:iq256_gu_rows_exact_onedispatches 22 (122 with the gathered decode), plain and AVX-VNNI.src/kernels/cpu/native_expert.cpp: type 22 in the gate, andnt < native_gu_mt_min(f.gu_type).src/kernels/cpu/iq_avx2_parity.cpp,src/kernels/native_expert_parity.cpp: IQ2_S in the bit-for-bit checks.Measured
i9-9920X (Skylake-X, 12 cores;
cpu_avx512_ok()false, so the AVX-2 kernels, scalar decode, no AVX-VNNI), 96 GB DDR4, Windows 11, one RTX 3090. Built withSTRATA_PORTABLE=ON(ggml-cpu/arch:AVX2, as the release).Parity:
iq_avx2_parity: exact singleton vs ggml 0 of 5,120 for IQ2_XXS, IQ2_XS, IQ2_S, IQ3_XXS and IQ3_S; IQ2_S also 0 of 5,120 withSTRATA_IQ256_GATHER=1. 0 failures.native_expert_parity --syntheticforiq3_s/iq4_nl,iq2_s/q2_0,iq3_xxs/iq4_nl,iq2_xs/iq4_nl,q4_K/q5_1, each withSTRATA_CPU_IQ_ALL_EXACT10 and 1: exit 0, width invariance 0 rows differ, exact singleton 0 of 1,920 (with #1415 alone the=1runs of the three i-quant pairs exited 1, gate/up 1,028 rows).Decode: Swift IQ2_XS, expert cache sized like a 12 GB card (
--vram-reserve-mib 12300),--spec 4 --spec-min-p 0.5 --kv k8v4 --kv-resident 32768 --max-context 262144 --pcie-frac 0.25, one prompt ("Explain how to compute 1719 + 2329 by hand, then give the integer."), greedy, 256 tokens,strata generate --tokens-file, a fresh process per run.#1415= the PR head;+ this= this commit; both with the switch set:The pool's gate/up time falls ~2 ms a window (-8.5%) against #1415; tok/s +3-4%. The same tokens in all six runs. The last row's third run is with the
nt < mt_minchange, the first two without it.Extra Notes
!cpu_avx512_ok()exclusion from #1415 is kept as it is.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.