mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1122] [CLOSED] Pipelined windows + async adaptive tier together (--pipeline-windows 2 --adapt-async 1) #3042
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#3042
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/1122
Author: @Hardin22
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:pr41/pipe-async📝 Commits (1)
ad4eaaaPipelined verify windows: the asynchronous adaptive tier beside them📊 Changes
4 files changed (+254 additions, -67 deletions)
View changed files
📝
docs/DETAILS.md(+5 -1)📝
docs/MULTI_GPU.md(+7 -2)📝
src/core/verify.cpp(+7 -0)📝
src/program/generate.cpp(+235 -64)📄 Description
This replaces #905, which GitHub closed when
mainwas force-pushed. #859 and #876 are in 0.1.40, so it is now one commit on the newmain(0.1.40.1).0.1.40 turns
--adapt-asyncoff when--pipeline-windows 2is set. This commit lets them run together. On a 4060 Ti + 5080 split that is +18% over the pipeline alone and +11% over the async tier alone.How
With
--pipeline-windows 2there is always a window in flight when the tier ticks (window K+1 on stage 0 while stage 1 verifies or commits K). Each window waits on the loop's thread at every layer and plans each layer from the residency table as it is when that layer is served. Two rules keep the tier out of its way:RamFencestate) wait for a gap after step 3 on every card whose layers exchanged, since a window planned before may still pull an incoming expert over PCIe from the RAM place its evicted one takes. WithSTRATA_EXCHANGE_ROTATE, the flip that hands that place over comes after them too.The tier's steps advance at every verdict, after the drafter's chain is launched, and every 0.5 ms between verdicts while a round is in flight. The device copies of the residency table are uploaded once, when the loop has drained (the pipelined verifiers publish every row anyway). At the loop's end, whatever still waits for a gap is queued and the round in flight finishes at the next request's drain.
--pipeline-windows 1and exchange buffers that are not page-locked still turn the async tier off.STRATA_PIPELINE_ADAPT_ASYNC=0(read underSTRATA_PIPELINE_DEBUG=1, like the other pipeline test variables) keeps the blocking tier beside the windows. The serial loop's async tier is unchanged.Also, as
run()already does: on a timeout the pipelinedVerifier::serviceprints the verifier's diag before it releases the GPU waits, and the trace after it withSTRATA_VERIFY_TRACE=1.Measured
0.1.40, RTX 4060 Ti 16 GB (layers 0-19) + RTX 5080 16 GB (20-47), i9-14900KF, 32 GB of RAM, Windows 11. Resident RAM mode with the whole complement in RAM, Swift 1.5 IQ3_XXS at 160K (q4_0 KV), stock draft layer,
--trim-stage-weights. Greedy, five prompts × two rounds, a fresh server per run, decode tok/s:--pipeline-windows 2(0.1.40: blocking tier)--adapt-async 1, serial loop (0.1.40)Checks
STRATA_PIPELINE_FORCE_MISS=2 STRATA_PIPELINE_THETA=0(every second guess wrong, every window speculated): 12 sequential 1500-token coding requests at temperature 0.6, with annvidia-smiquery after each, as in the stall report on #905. No timeout and no degenerate answer. The tier ran 1552 rounds and swapped in 105,435 experts at about 40 ms per round. (That stall was later traced to #904's graph branches plus NVML queries on Linux;STRATA_DF_BRANCHis opt-in there now.)--spec 4vs--spec 2: 2 of 4 prompts identical), so pipelined vs serial can't be compared bit for bit either.The bounded attention merge and the pipelined PLE switches (#910) are stacked on this and will follow as their own PR.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.