mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #399] [CLOSED] tools: refresh DS4 startup expert profiles from recent routing counts #513
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#513
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/mw00/project-maya/pull/399
Author: @LostVector
Created: 10/22/2026
Status: ❌ Closed
Base:
main← Head:upstream/refresh-ds4-profile📝 Commits (2)
cbde6c5tools: refresh DS4 expert profiles from recent routing deltas0a429dedocs: distinguish count-delta refresh from existing DS4 profile tools📊 Changes
3 files changed (+238 additions, -0 deletions)
View changed files
➕
docs/DS4_PROFILE_REFRESH.md(+90 -0)➕
tools/refresh_ds4_profile.py(+91 -0)➕
tools/test_refresh_ds4_profile.py(+57 -0)📄 Description
Refreshing startup expert placement improved held-out code generation from 11.3 to 18.0 tokens/s on the first response, and 14.6 to 23.9 tokens/s on a repeated response, on our three-GPU AMD setup. First-response expert VRAM hit rate rose from 42.3% to 75.5%. These are workload-specific measurements from our earlier experimental engine stack, not a universal speedup or a benchmark of current upstream.
In plain terms, the saved profile tells Maya which experts to put in VRAM at startup. Our profile contained about 920 million historical selections; roughly 975,000 recent calibration selections barely changed its rankings. This offline utility extracts the new selections from independent before/after snapshots and gives those recent observations more influence. The measured blend was approximately 80% recent usage and 20% normalized historical usage, separately per layer. Normal adaptive caching continues during inference.
What this adds
tools/refresh_ds4_profile.py: read DS4 raw uint32 count profiles, subtract each calibration run's starting counts, combine independent deltas, and write a fresh blended profile plus a SHA-256 provenance receipt.Upstream already saves these routing counts, and
tools/ds4/profile.py makealready normalizes and combines saved profiles. This proposal complements that tool when calibration starts from an accumulated profile: subtracting the starting counts prevents old history from being counted again in each snapshot. Starting calibration from empty profiles and using the existing tool remains an alternative. No automatic aging, runtime defaults, kernels, weights, or cache budgets change.Validation
25deec5; five CPU-only unit tests passed (python3 -m unittest discover -s tools -p test_refresh_ds4_profile.py -v).419ff834edd0952e6ebc2dc260d436590e31b17ecede0b9d5bc8941aa2f743ab.git diff --checkpassed. The live inference server and its profile were not modified for this submission.Measurement scope
DeepSeek-V4.1-Flash-1017 EXL3 3.5 bpw; two R9700 32 GB cards plus an RX 9070 XT 16 GB; TP2, drafting off, greedy 128-token held-out responses. Calibration used different code, technical and prose tasks; confirmation reversed the comparison order. Technical and prose responses also improved, with smaller gains; the documentation includes those results.
Changing placement and initial cache heat can change floating-point execution between CPU and GPU. This is not a cross-profile logit-parity or broad quality claim. Current upstream tool correctness and exact profile reproduction were checked; these historical throughput measurements were not rerun against the current engine. See
docs/DS4_PROFILE_REFRESH.mdfor the recipe and full limits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.