mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #79] Expert-cache study on a RAM-bound DDR4 box: replayed route traces - past-only eviction rules saturate, perfect hindsight would cut off-card time ~20 %, near misses do not predict #29
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#29
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 @sociolog on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/79
Notes from a weekend of trying to raise the VRAM hit rate on a RAM-bound box (Ryzen 9 5900X, 128 GB DDR4-3200, RTX
3090 + 3060 at x8), in case they save someone the same dead ends. Everything below is Maya-M, split 30
(76 / 51 slots a layer),
RAM_RESIDENT=1,CPU_PLAN=012234567, v1.0.30.Method
STRATA_GLM_ROUTE_LOGtraces of a warm 21K API test (~3,100 generated tokens, ~159K routes), replayed through a modelof the tier rules: per layer
n - 3residents +kSpares3; the route kernel's split of a route's RAM-tier misses (theCPU lane takes
plan[f]of them, the coldest bydcnt; the rest are fetched and land in spares - the only way intoVRAM); counts aged every 4096 routes; spares refilled at each token boundary. Validated against the live tier bits in
the same trace: 65.0 % vs live 65.4 % (3090 half), 60.1 % vs 61.5 % (3060 half). Cost proxy per layer:
max(CPU-lane experts x 0.31 ms, PCIe fetches x 0.66 ms) - the calibration's numbers.
Results (VRAM hits on the 3090 / 3060 half; off-card ms a token of the slower half)
a predictor of the next tokens' routes. The route's next-ranked experts (near misses) are not one - giving them
weight makes it worse.
012234567only ~14 of ~76 off-card experts a token (3090half) are fetched (and can be promoted); the rest go to the CPU lane. Live,
lruwas +2.6 % on Maya-L with thecalibrated plan and +0 % on Maya-M with
012234567(#78).on one thread whether the expert is in L3 or DRAM (compute-bound), but six threads reach 29.9 GB/s, twelve threads on
twelve cores only 32.3, all 24 threads 37.3 - this box's practical read rate for that pattern. A faster kernel would
buy little here; more RAM bandwidth (or fewer bytes a token) is what moves decode.
If useful I can PR the near-miss extension of the route log (
| n0 .. n15after the tier masks, only withSTRATA_GLM_ROUTE_LOG) and the trace simulator (Python, one file) as a tool for this kind of study.The study, the measurements and this report were produced with the help of Claude, an AI assistant by Anthropic.
@mw00 commented on GitHub (Oct 10, 2026):
Thank you, this maps the ceiling clearly.
Both PRs would be welcome:
tools/, with a short note in its docstring on how to make a trace and what the model of the tier rules leaves out.STRATA_GLM_ROUTE_LOGand the decode path is unchanged without it.#78 (your LRU option) is in review.
@mw00 commented on GitHub (Oct 12, 2026):
Closing this study as noted: the next gain is in predicting the next tokens' routes, not in a better eviction rule. The trace simulator and the near-miss columns are still welcome as PRs any time.