mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
[PR #224] docs: how to get the same tokens after a restart with the CPU lane on #404
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#404
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?
Original Pull Request: https://github.com/mw00/project-maya/pull/224
State: closed
Merged: Yes
What
A "Repeatable answers" section in
docs/SETTINGS.md(after "The expert pool's size"): why a greedy request does not return the same tokens aftera restart (or with another RAM tier) when the CPU lane is on, which settings pin that, and what it costs. Documentation only - no code, no new setting.
Why
With the CPU lane on, a RAM-tier expert is computed by the lane or by the GPU depending on where it sits, and the two paths round differently (GPU: q8_1 activations in blocks of 32;
ggml-cpu's dot: Q8_K in blocks of 256). I measured the lane at 1.7% relative L2 from a double-precision reference and the GPU kernels at 1.1% (150 real lane calls over 42 layers
of Maya-S-v2-IQ2_XXS), 1.9% from each other. The router's top-8 amplifies that: within a few tokens a quarter or more of the layers pick a different expert set, and greedy output parts
within tens of tokens. So the answer depends on which experts the lane gets, and that changes from one start to the next for reasons that are easy to miss.
What I measured (RTX 5090, 64 GB, Maya-S-v2-IQ2_XXS, 42 GB RAM tier, greedy, 6 prompts x 256 tokens + a warm-up, engine
main@07c3dc9, interleaved engine starts)--expert-cache 3250,STRATA_GLM_PROMOTE=0,STRATA_GLM_CPU_RETIME=0,STRATA_GLM_CPU_PLAN=001122333--expert-cache autowith the same 300 MiB heldSTRATA_GLM_CPU_LANE=0Decode with the recipe: 18.31 tok/s (18.29-18.35) against 18.26 (17.80-18.48) with the defaults (medians of five). The cause is placement, not a race: with the same placement the
lane-on runs are bit-identical (logits and routes of 1762 of 1762 decoded positions, compared bitwise); what varies between starts is the VRAM pool (
tiers warm: 9,453-9,488 expertsin five starts:--expert-cache autotakes whatever VRAM is free, and the "only N MiB free once the pool is written ... GB less" step trims it), the lane's start-up split (0.137 vs 0.141 ms per expert: a near tie,... 3 3 3or... 3 3 4),the split timed again in decode, and the background moves between tiers. Raw per-run files, scripts and the analysis: https://github.com/hiroki-abe-58/moe-tiering-lab/tree/main/results/phase4 (
SUMMARY.md,exp13-determinism,exp14-recipe).The section also says what it does not cover (one PC; DFlash2, MTP, several GPUs, Linux, AMD not tried) and that another pool, RAM tier, split, build or driver gives different, equally valid tokens.
Checks
python tools/check_hip_compat.pypasses (no code touched).🤖 Generated with Claude Code
https://claude.ai/code/session_012aHyspr6cyZfg2a8QG9Hqy