The similarity scan found ggml / llama.cpp derived text in strata-quant-common.h (through its generator), dot_avx2.cpp, dot_neon.cpp,
arm_act.inc, act_avx512.cpp, kq_avx2.cpp, split/iqdot_hip.cuh, sycl/iq2xs_host_tables.inc and strata_gguf.py, with no provenance wording
(dot_avx2, dot_neon and arm_act carried only our own copyright line). Each now says which parts are derived (MIT, Copyright (c) 2023-2026
The ggml authors, pin 3cf03257f; gguf-py's own licence line for strata_gguf.py) and that the rest is ours. Comments only: no code changes,
the generated header is regenerated from the changed generator (check passes).
The nine are `derived:` entries of tools/no_ggml_allowlist.txt, which is also rewritten for the files that now carry the wording.
tools/ggml_similarity.py reports the derived line numbers per file, which is how the parts were found. The tenth file of the scan,
strata_reader_layout_golden.inc, is a false positive (rows of 0x00) and gets no notice.
0.2.21 made the dot_x4 kernels of the native CPU expert path opt-in
(STRATA_DOT_X4=1) because a single-thread cold bench showed them slower on a
DRAM-bound row. #7075 measured the other side (2x RTX 5090, PCIe-streamed
NVFP4, 4 slots): without them warm batched decode lost ~15% and short prompt
reads ~8% against 0.1.66, and STRATA_DOT_X4=1 recovered both, while solo
decode (one token per expert) was better with them off.
The default now follows the call, as the reporter suggested and the reply on
the issue promised: on from kDotX4MinTokens = 2 tokens that share the expert in
one call, off for one token. STRATA_DOT_X4=1 forces them on for every call,
STRATA_DOT_X4=0 off for every call (exactly the 0.2.21 / 0.2.22 default),
STRATA_NO_DOT_X4 (any value) still wins. The two forms give the same bits:
dot_x4_test, and cpu_dispatch_dump hashes of every nt 1..8, whole and off-vector
row ranges, both arithmetics, identical for off / default / on / NO_DOT_X4
(zz_x4_proof.sh); pool_determinism passes in all three modes.
dot_x4_policy.hpp: dot_x4_mode() (read once) and dot_x4_enabled(mode, nt);
dot_x4_policy_test covers every case.
4414c2988 (0.2.20) put the dot_x4 kernels in front of the 1-row dots in native_gu_rows /
native_down_rows (Q4_K, Q5_K, Q6_K, Q8_0, IQ4_XS, IQ3_XXS ...), on by default. They give the
same bits (dot_x4_test) and share the activation loads, which pays with the weights in cache.
A cold expert is read from DRAM, and there the 4-row form is slower. New dot_x4_bench (one
thread, 512 MiB of rows, n = 2560), x4 speed against four 1-row calls:
Ryzen 7 255 (Zen 4, AVX-512 VNNI) Q4_0 0.77 Q8_0 0.42 Q4_K 0.26 Q5_K 0.33 Q6_K 0.24 IQ4_XS 0.27 IQ3_XXS 0.52
Ryzen 5 5600X (Zen 3, AVX2) Q8_0 0.85 Q4_K 0.29 IQ4_XS 0.32
i9-13900K (AVX-VNNI) Q8_0 1.20 Q4_K 0.86 IQ4_XS 0.80
(cache-resident: 0.8 - 1.3 everywhere)
This is the #6552 reporter's Ryzen 7 7700 (STRATA_NO_DOT_X4=1 brought the old speed back).
dot_x4_enabled() (strata/quant/dot_x4_policy.hpp): STRATA_DOT_X4=1 turns the kernels on,
STRATA_NO_DOT_X4 (any value) still turns them off and wins. The answers are the same bits either
way. dot_x4_policy_test covers the rule; dot_x4_bench is registered as an executable only.
The q / k / v / o / gate projections of the CPU backend (matmul_f32) were `parallel for` over the activation rows with `if (M * N >= 4096)`: a one-token decode step
ran most of them on ONE thread, and a prompt read every weight row M times from memory. They are parallel over the weight rows now (threshold on M * N * K), each row is
read once and reused for all M activation rows from L1; every y[m][n] is the same dot call as before, so the result does not depend on the thread count.
The dot itself (CPU backend, attention scores, inkling2_loop.cpp's helpers) is strata::quant::sk::dot_f32, one more function of the run-time tiers: 4 accumulators of the
tier's vector width (AVX-512 / AVX2 with FMA / NEON), plain 4-accumulator C++ in the base tier (bit-identical to the sum it replaces: sk_tier_test checks it). The vector
tiers sum in lane order, so a CPU-only run differs from 0.2.20 by float rounding (SQ-10 teacher-forced KL(old||new) 4e-4, repeatable run to run).
Measured, CPU backend, SQ-10 prefill 128 / decode 8, alternating pairs: Apple M5 Max prefill 3.2 -> 7.7 ppts, decode 1.6 -> 2.5 tok/s (spread under 1 %);
Zen 4 16 threads, UD-Q2_K_XL: prefill 11.1 -> 13.0, decode 2.7 -> 4.3.
Made by tools/layout/move_0216.py (the commit before this one) on db8e0be9c, the final code head of 0.2.16:
- 75 git mv (renames, so `git log --follow` and blame keep working; packaging/acceptance_matrix.md shows as delete + add because its links
changed too) and 3 removals: SETUP.bat, UPDATE.bat and update.sh (setup.py --update pulls the code now);
- 1,425 path edits in 307 files: root-relative paths in CI, Docker, .gitignore and the release scripts; Markdown links; Python and
Node joins from a root that moved with its folder; explicit edits for code that computes a root or names a moved path; tables of
repository paths inside tests.
engine/ holds what CMake builds (src, include, cmake, metal, sycl, spark, third_party, the C++ tests and benches). app/ is the desktop
app and its host (was apps/). terminal/ is the Terminal in the layout of the installed one (strata.py, setup.py, strata_cli,
strata_control, serve, bin, data, ref, crates, the Python tools and tests). docs/ has the documentation, docs/lang/ the translated
READMEs, docs/history and docs/bench-results. tools/ has the repository's own checks, packaging, docker, research and nix.
tests/core/test_tqp_ref.py is a pytest file and stays with the Python tests (terminal/tests/core/).
AGENTS.md, README.md, LICENSE, setup.sh and START-HERE.bat stay at the root.
No behaviour change: the same command lines, the same sources. For this head a replay of the script gave the same numbers and the path
scan (tools/layout/checks/path_scan.py) reports no hit; the suites and the builds run on this commit next.