mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5158] [CLOSED] [Engine] split: retain a window in every expert pool #5327
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#5327
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/5158
Author: @midhatn
Created: 11/3/2026
Status: ❌ Closed
Base:
main← Head:fix/split-expert-pool-floor-20261104📝 Commits (1)
60cf456[Engine] split: retain a window in every expert pool📊 Changes
4 files changed (+136 additions, -16 deletions)
View changed files
📝
src/split/CMakeLists.txt(+1 -1)➕
src/split/src/expert_residency.hpp(+60 -0)📝
src/split/src/model.cpp(+8 -15)➕
src/split/tools/expert_residency_test.cpp(+67 -0)📄 Description
Problem and result
Mixed-quant models can fail to load in the split engine after cold-expert offload. The global residency ranking can leave one size pool below the
2 * MAXT * TOPKslots required byUp::expert_cache(), even while other pools can still give up experts.Reproduced on Ubuntu 26.04.1, NVIDIA 580.196.07, two V100-SXM2-16GB GPUs at 200 W, with Qwen3.8-Flash-Next Unsloth UD-Q4_K_XL, 131072 context, four lanes,
FNX_ARENA=1, andFNX_EXPERT_RAM_GIB=59. The unmodified #5119 engine stopped during load:With this fix on the same baseline and configuration, model placement and warm-up completed, the API became ready, and short, concurrent 32K, and single 128K requests completed. The engine reported a load time of 82.4 seconds. This establishes the observed loading fix; full answer-quality qualification remains incomplete.
Related discussion
Focused port of the planner in johnfink8/sfnx#12. V100 validation combines this fix with #5119, which provides the experimental launcher/build support. No matching Strata fix was found in the issue/PR search.
Approach
Group experts by both gate/up and down byte strides. Continue the existing cold-first ranking, but skip eviction from a pool once it reaches the required window floor. Count only actual extra evictions under VRAM pressure and report impossible placement before uploading the model.
The regression test covers rare pools, equal-total-size/different-stride pools, byte targets plus extra eviction, impossible requests, a 48-layer/512-expert case including explicit 59 GiB offload, and 1,000 comparisons with the original ordering when the floor does not constrain placement. Kernel arithmetic and numerical-test tolerances are unchanged.
Validation
Public fix:
60cf456c, based on mainffa80d73. GPU validation:5b46abb7, a clean cherry-pick onto #51196ffae2d4. CUDA 12.9, GCC 14, sm70. Paths below are relative to the checkout; model and MTP paths are represented by shell variables.Passed:
g++-14 -std=c++17 -O2 -Wall -Wextra -Werror src/split/tools/expert_residency_test.cpp -o /tmp/expert_residency_test, then the executable:expert_residency_test: PASS. (The retained test executable used an equivalent private output path.)git diff --check.STRATA_SPLIT_ARCH=70,CMAKE_CUDA_ARCHITECTURES=70,STRATA_NATIVE_EXPERTS=ON,STRATA_EXPERIMENTAL_SM60=ON, GCC 14 as C++/CUDA host compiler, and llama.cpp headers at3cf03257. Builtstrata-split-2,split_moe_tile_test,split_fnx_run, and the nine split host-test targets.ctest --test-dir build-ws1-sm70 --output-on-failure --no-tests=error -R '^split_(expert_residency_test|batch_plan_test|pf_ring_plan_test|card_check_test|rope_test|sfnx_input_test|peer_policy_test|rccl_policy_test|selftest_policy_test)$': 9/9 passed.python -m pytest tests/split tests/terminal/test_split_engine_flag.py tests/terminal/test_split_parallel.py -q: 92 passed, 5 subtests passed.serve/server.py, which launched this engine command with the same environment as the failed control:Failed:
Not run / incomplete:
Limits
This is an allocation fix, not a throughput claim. V100 integration uses the existing experimental host-exchange split path; this PR adds no peer transport or architecture support. Keep this PR as a draft until required backend validation is resolved.
Prepared with AI assistance; claims were checked against source, retained test output, and the real before/after load result.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.