mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #587] tools/make_profile.py --base cannot reorder a complete base (shipped profile reports 0 from the traces) #276
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#276
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?
Originally created by @yannickloth on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/587
tools/make_profile.pyis documented to rank "the base profile's ranking, then the pairs your routing traces used, most frequent first" so a--dump-routingtrace of your workload seeds the cache with the experts it actually routes. But the base is only ever appended to, and the shippeddata/expert-profile.binalready ranks all 24,576(layer, expert)pairs — so with it the trace cannot change anything:/tmp/prof.binis byte-identical todata/expert-profile.bin. The only way to let a trace order the top is--no-base, which throws the shipped ranking away entirely.In
rank_profile/main,take(read_profile(base))fills all 24,576 slots before the trace pairs are considered, andtake()skips anything already seen. This matters because--expert-cache autofills the VRAM tier from the profile in order; a workload-specific profile therefore never gets to put its most-routed experts in the slots that fit. (Measured on an RTX A3000 12 GB / Swift 1.5 IQ3_XXS: the shipped base is 2,107 resident slots; a workload-ranked profile raised the fresh-conversation hit rate 0.468 → 0.528, but only via--no-base.)Proposed fix
Add
--reorder: rank the trace's pairs first (most frequent first), then let the base fill the rest, then the fill — so a trace orders the top while the base still covers everything the trace did not see. Default behaviour is unchanged. PR: #589.@Niko1221 commented on GitHub (Oct 4, 2026):
Fixed in 0.1.39 by #589:
tools/make_profile.py --reorderranks your--dump-routingtrace's pairs first, then the base's, then the rest. Without the flag the output is unchanged.