mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #731] [CLOSED] Avoid duplicate expert slots across helper and primary GPUs #2793
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#2793
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/731
Author: @moorwu
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:perf/disjoint-expert-cache📝 Commits (2)
73cf0c4Avoid duplicate expert slots across helper and primary GPUs9a90888Merge v0.1.39 and preserve dynamic helper ownership📊 Changes
5 files changed (+131 additions, -2 deletions)
View changed files
📝
CMakeLists.txt(+3 -0)➕
docs/DISJOINT_EXPERT_CACHE.md(+76 -0)➕
include/strata/program/helper_residency.hpp(+13 -0)📝
src/program/generate.cpp(+19 -2)➕
src/program/helper_residency_test.cpp(+20 -0)📄 Description
Avoid duplicate expert slots across helper and primary GPUs
Why this helps
On a PC with two small GPUs, helper experts start out separate from the primary
cache. Later, the adaptive primary cache can promote an expert that the helper
already holds. Both cards then spend memory on the same expert.
We observed about 1,900-2,000 duplicate slots during sustained requests.
This opt-in change keeps helper-owned experts out of primary promotion candidates,
in both the server and command-line generation paths.
Use
Set
STRATA_DISJOINT_ADAPT=1before starting the engine. It is off by default.It leaves the existing peer-tier check and expert arithmetic unchanged.
The reservation mask is copied after successful static helper loading. When the
upstream dynamic helper optimizer is enabled, the initial mask is not frozen:
the live ownership query decides whether the helper still holds an expert.
The server keeps upstream's live ownership check, and the opt-in CLI guard uses
that check instead of stale initial reservations.
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
Same binary and helper capacity, six complete JSON tasks per arm:
Generation improved by 15.5%; request time fell by 12.2%.
The tasks returned complete 100-record arrays and correct source facts.
All 18 checks passed across the original, guarded, and larger-cache arms.
The larger-helper arm is not included in the comparison above.
These repetitive tasks do not represent all agent workloads.
Validation and remaining work
owned, and out-of-range entries, plus candidate filtering.
99f3dbd) passed. No enginewas started and no production settings were changed.
checks still need to be run. Keep this PR as a draft until then.
substitute for validating this independent port.
0.1.39 follow-up
The branch now includes official 0.1.39 (
6f32ec0) and preserves the dynamichelper optimizer. A combined custom build passed a five-arm, 240-request HTTP
suite using SC117 abliterated IQ3_S and unchanged 250/280W power limits.
Its recommended serial configuration decoded a 110K cached prompt at 130.1
tokens/s versus 107.5 for official 0.1.39. This is a WHOLE-BUILD result including
other optimizations, not a new speed claim for this ownership guard alone.
No independent dynamic-optimizer GPU regression or isolated speed measurement
is claimed here. The PR remains opt-in and draft.
The exact revised branch compiled and linked independently against official
0.1.39 on the Linux host above. The standalone ownership/candidate-filter test
passed. No model server was launched for this branch-specific check.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.