mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #733] [CLOSED] Pipeline CPU expert work without a batch-wide phase barrier #2794
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#2794
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/733
Author: @moorwu
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:perf/cpu-expert-pipeline📝 Commits (10+)
749d957setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)5a30024calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)9f60d13serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)eb8da1d/metrics: each request's speculative draft counts, and their sums in the totals (#457)6a09387setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)d6a91e2docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)d8d4ad3Merge branch 'f-135-eng' into rel-0.1.357b600d5Merge branch 'f-135-small' into rel-0.1.35d9ab843Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it57bd713sycl: pipeline the expert cache's profile fill (model load 3-4x faster)📄 Description
Pipeline CPU expert work without a batch-wide phase barrier
Why this helps
CPU expert verification currently finishes Gate/Up for the whole batch, quantizes
intermediate activations, then starts Down. Experts that are ready early must
wait for the rest of the batch.
This opt-in change quantizes each expert as soon as its last Gate/Up tile finishes
and publishes that expert's Down work. All producer tiles are claimed before
dependent tiles, so dependent waits cannot strand unclaimed producers.
The existing row partitions and arithmetic kernels are retained.
Use
Set
STRATA_POOL_PIPELINE=1before constructing the expert pool.It is off by default and applies to the native multi-token path.
Validation environment
32,768 resident KV cells.
v0.1.38 plus reviewed architectds/Strata changes (best, 05c0f36).
This PR contains only our change, ported to official main (
99f3dbd).The historical timings are NOT a measured speedup of this pure-upstream port.
Historical benefit
This is a small scheduling improvement, not a large tokens/s claim:
The extra gain was about 1%. The natural-language outputs differed in length;
their wall-time difference must not be described as equal-work acceleration.
Both variants passed complete-answer and tool-call checks. Broader cache gains
are not attributed to this PR.
Validation
The historical real-model test passed 810/810 bitwise comparisons across
three layer formats, 1/4/17 workers, host participation on/off, 1/2/4 tokens,
1/2/7/18/97 jobs, and three repeats. An independent serial row reference
also passed. This is not a ThreadSanitizer or general model-quality result.
The included real-model test can be run as:
Without model arguments it exits 77 (CTest skip), not a false pass.
It reads the first three layers from the supplied shard; use the matching
Flash-Next pack and shard.
The independent pure-upstream port also passed the 810/810 real-model bitwise
comparisons on the stated Linux host. All known expert-pool header consumers
were recompiled, and the independent engine and parity test linked successfully.
The older upstream VNNI pool selftest was skipped because this CPU lacks the
required AVX-512 features; it was not counted as passing. No model server was
started or restarted, and no production settings were changed.
Related work and remaining work
PR #500 parallelizes intermediate quantization as a separate phase. This proposal
instead pipelines per-expert readiness across phases. They touch the same code
and should be coordinated rather than merged blindly.
Keep draft until the independent upstream port completes end-to-end performance
and concurrency validation. No ThreadSanitizer run has been performed.
Other CPU architectures are unvalidated.
0.1.39 follow-up
The branch now includes official 0.1.39 (
6f32ec0). Its refactored row andquantization helpers retain upstream
q2_native_kernels(...)ISA dispatchinstead of choosing kernels from the format number alone. The parity reference
uses the same dispatch. The test is registered on Windows and Unix, with Windows
environment-variable and 64-bit file-offset equivalents.
A contributor reported 810/810 comparisons passing on Ryzen 9 7940HS with
Windows/MSVC, but no convincing speedup: pipeline-on decode was 31.8 tokens/s
against off controls of 33.4 and 30.6. That was a combined build, not this exact
updated branch. The report is linked in PR #733; credit belongs to @midhatn.
Our combined custom 0.1.39 build passed a five-arm, 240-request HTTP suite. Its
whole-build gains cannot be attributed to this small scheduling change. Neither
that suite nor bitwise parity is a ThreadSanitizer result. Keep the PR draft
until isolated performance and concurrency validation is convincing.
The exact revised branch compiled and linked independently against official
0.1.39 on our Linux host. All known expert-pool header consumers were rebuilt.
Using the matching SC117 abliterated IQ3_S pack and shard, the updated parity
test passed 810/810 comparisons, including the independent serial reference,
1/4/17 workers, host participation on/off, repeated calls and 97-job batches.
We did not run the revised branch on Windows or launch a model server for this
check. The contributor's Windows result is separate evidence, not our own run.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.