mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #876] [CLOSED] Asynchronous adaptive expert tier for the resident RAM mode (--adapt-async 1, opt-in) #2888
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#2888
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/876
Author: @Hardin22
Created: 10/5/2026
Status: ❌ Closed
Base:
main← Head:pr/async-tier📝 Commits (1)
7d188aaAsynchronous adaptive expert tier (--adapt-async 1, opt-in)📊 Changes
4 files changed (+371 additions, -2 deletions)
View changed files
📝
docs/DETAILS.md(+4 -0)📝
include/strata/core/expert_source.hpp(+8 -0)📝
src/core/expert_source.cpp(+34 -0)📝
src/program/generate.cpp(+325 -2)📄 Description
In the resident RAM mode (
--resident-experts), an adaptive round runs on a thread that the decode loop joins after the draft:With ~90 swaps that cost us about 24 ms every 4th window.
--adapt-async 1(opt-in, default off) splits a round into four steps that advance between windows on a helper thread, so no window waits for one:adapt()'s rule, on snapshots of the counts and the residency) and copy the evicted slots back (D2H), each from the cache of the card that owns its layer.Invariants:
apply_pendingdoes, because the zero-doorbell graph reads them.It's off by default because it is not bit-exact from run to run: which window first computes a swapped-in expert on the GPU depends on when its copy lands. It falls back to the blocking tier, saying so once at startup, outside
--serve, without the resident RAM copy, and with--batchslots,--peer-deviceor--remote-expert-opt. On a layer split, each swap's copies run on the owning card's refill stream; the homes are looked up as in #848'sresident_stage_swaps.Measured
Swift 1.5 IQ3_XXS at 160K (q4_0 KV), i9-14900KF, 32 GB of RAM, Windows 11, greedy decode, tok/s. Blocking tier →
--adapt-async 1:--trim-stage-weights, stock draft layer, 5 prompts × 2 rounds, two interleaved pairs--spec-min-p 0.65, 4 prompts × 3 rounds--resident-expertsChecks
STRATA_IQ_MT_MIN=1 --pcie-frac 0 --adapt-every 0).Notes
--pipeline-windows): the two need fences between the async steps and the windows in flight. If both land as they are,--pipeline-windowshas to go on this PR's off-list (adapt_async_off, one line); otherwise the pipelined loop's own fenced tier would run beside the async one. I have the proper combination working on a branch. I'll open it after this and #859, since it touches both.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.