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#3264
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/933
Author: @LaurentZuijdwijk
Created: 10/5/2026
Status: ❌ Closed
Base:
main← Head:feat/tq-cpu-simd📝 Commits (10+)
6e05aa9serve: the start narrator says what happens to the experts with --mmap-experts (#505)aa0e21bsetup: honour HF_ENDPOINT, and say where the model files go (#495)869ebadsetup: UD-Q4_K_XL across GPUs without the RAM budget when the RAM holds it; no budget on a --gpus start (#498)b9c2d5esetup: --vram-reserve-mib N, and INSTALL.md documents it (#493)4e308ebPCIe probe (#485): best of four timed bursts, a continuous share, the samples logged100ebe4docs: Windows AMD's free-VRAM figure within the WDDM budget (#380) and the host-timed PCIe probe (#377)97fc539Merge branch 'f-137-srv' into rel-0.1.37db4f91aEngine 0.1.37: a silent engine is restarted (#481), Windows AMD counts the desktop's VRAM (#380 #377 #497), a steadier PCIe probe (#485), fixes #496 #495 #498 #505 #493; setup requires it88c3acesycl: port open upstream PRs #385 #463 #453 #374 #363 #407 #413 onto 0.1.354ba35fdsycl: OpenAI logprobs on /v1/chat/completions (engine LP lines + server_intel)📊 Changes
1 file changed (+6 additions, -0 deletions)
View changed files
📝
docs/GYRO.md(+6 -0)📄 Description
Stacked on #928. This PR contains #928's commits plus 3 new ones (the last three in the list); please review it after #928.
On cards that can't hold every expert (16-24 GB), cache misses run on the CPU workers. For the trellis types (TQ2_T / TQK6 / TQK7) those misses went through ggml-cpu's
vec_dot, one token at a time. This PR adds Strata's own AVX2 and AVX-512 decode-and-dot kernels for those types, wired intonative_gu_rows/native_down_rows.What changes
src/kernels/cpu/tq_cpu.{hpp,cpp}: a state table, the scalar reference, activation unpacking and run-time ISA choice.tq_avx2.cpp(AVX2 + FMA) andtq_avx512.cpp(F/BW/VL/VNNI) hold the kernels.STRATA_NO_TQ_KERNELS=1goes back to the ggml path;STRATA_TQ_ISA=scalar|avx2|avx512caps the ISA;tq_cpu_parity(cteststq_cpu_parityandtq_cpu_parity_avx2), with a--benchmode;native_expert_parity's synthetic modes also check every ISA against scalar.docs/GYRO.mdhas a short note.Correctness
vec_dot: relative error ~1e-7, which is summation order.to_floatin double: relative error 1.1e-5, the int16 table rounding that ggml's kernel shares.native_hadamard_testpasses.Speed (core cycles per 128-weight block, Zen 5, one thread, weights from DRAM)
vec_dot, AVX2 buildvec_dot, AVX-512 buildThat is about 2.4x (AVX2 builds) or 1.35x (AVX-512 builds) faster for one token, and 2.8-5x per token in verify windows. Q2_0's simpler format stays cheaper per block on the CPU.
Measured end to end (2026-10-05)
RTX 3090 24 GB + AMD EPYC 7K62 (Zen 2, AVX2 only), one GPU,
--expert-cache auto, MTP spec 4, int8 KV, 128k context. Decode tok/s, mean of 6 reps over two rounds with the arm order flipped. Old =STRATA_NO_TQ_KERNELS=1(ggml-cpuvec_dot); new = this PR (AVX2 here).RTX 4090 + Ryzen 9 7950X (Zen 4, AVX-512), Gyro-S, 97% hit rate: old and new are equal within noise. At that hit rate the CPU does little of the expert work. On the same box Strata runs Gyro-S at 127.5 tok/s mean decode at 119k context (reasoning / bug fix / edit 113 / 128 / 142), with 4,177 tok/s cold prefill on 118.7k tokens.
🤖 Generated with Claude Code
https://claude.ai/code/session_013YKZhadEzjDiTwDc4tzi2g
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.