mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #70] [MERGED] GLM CPU lane: calibrate on experts read from DRAM, not from the L3 #314
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#314
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/70
Author: @merbanan
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @mw00
Base:
main← Head:cpu-lane-calibration📝 Commits (1)
7ce83f9GLM CPU lane: calibrate on experts read from DRAM, not from the L3📊 Changes
1 file changed (+16 additions, -7 deletions)
View changed files
📝
src/core/glm_fast_path.cu(+16 -7)📄 Description
The CPU lane's start-up calibration times the CPU from the L3 cache, but decode reads its RAM-tier experts from DRAM. On a desktop CPU it therefore thinks the CPU is about 1.5x faster than it is. The split then keeps too many RAM-tier experts on the CPU, and the GPU waits for the lane.
Cause. The calibration ran 16 timed calls on the same 4 RAM-tier experts. Four of Maya-S24's 7.5 MB experts are 30 MB, which stays in a 7950X's 64 MB L3 after the first call. Decode reads ~1.1 GB of RAM-tier experts per token, so they always come from DRAM.
Fix. Each warm-up and timed call takes the next 4 of up to 64 RAM-tier experts of the calibration layer (~480 MB), so every timed call reads from DRAM. With fewer than 64 in the tier, the sets repeat sooner. The PCIe timing and
STRATA_GLM_CPU_LANE_CHECKstill use the first expert. One file, +16 / -7 lines.Measurements
1x Tesla V100-PCIE-32GB (PCIe 3.0 x16), Ryzen 9 7950X (16C, 64 MB L3, DRAM reads ~57 GB/s), 62 GB RAM, Maya-S24,
--max-context 131072,STRATA_GLM_KV_INT8=1.--bench, 8 starts alternating stock and fix:0 1 2 3 4 5 5 6 7or0 1 2 3 4 4 5 6 70 1 2 3 3 4 5 6 7every startSTRATA_GLM_CPU_PLAN(v1.0.23, same setup).0 1 2 3 3 4 5 6 7was the best of three: 26.9 / 27.5 tok/s, against 25.1 / 25.3 for0 1 2 3 4 5 5 6 7and 25.9 / 25.4 for0 1 2 2 3 4 4 5 6. The fix now picks that plan by itself.Not tested
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.