mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #25] [MERGED] GLM: opt-in RAM-resident tier, nothing evicted to disk #286
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#286
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/25
Author: @handmade0octopus
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/8/2026
Merged by: @mw00
Base:
main← Head:glm-ram-resident📝 Commits (1)
6fa5d11GLM: opt-in RAM-resident tier, nothing evicted to disk📊 Changes
5 files changed (+86 additions, -9 deletions)
View changed files
📝
README.md(+1 -0)📝
src/core/glm_fast_path.cu(+59 -9)📝
src/core/glm_fast_state.hpp(+4 -0)📝
src/core/glm_prefill.cu(+2 -0)📝
src/program/generate.cpp(+20 -0)📄 Description
What this changes
--glm-ram-resident(STRATA_GLM_RAM_RESIDENT=1) sizes the pinned RAM tier so it holds every expert that is not in VRAM, and a demotion never drops an expert to disk. The start fails if the tier cannot hold them (STRATA_GLM_RAM_GB, or a smaller--max-context).--glm-ram-slack N(STRATA_GLM_RAM_SLACK, default 16) is extra slots per MoE layer for a demotion that has not landed yet.A demotion keeps the VRAM copy live until the copy into RAM has landed, so a route in that window still hits VRAM. The prompt path publishes those landed copies before it borrows the pool tail.
What it leaves alone
Default off. With the flag unset the tier cap, the disk-read spare slots, and the demote path are the ones this tree already has.
Measured
Same build, RTX 4090 D, 128 GB RAM, Windows, Maya-S IQ2_XXS, context 262144, one 38188-token prompt, 512 new tokens.
STRATA_GLM_PROMOTE_MIN=6(separate change)The warm stock run was slower than the cold one: the cold tail rotated back onto disk. This flag is what removes that. The paired run also had
STRATA_GLM_PROMOTE_MIN=6, which is not in this PR. An earlier split on the same machine, resident only, was 18.6-20.1 tok/s with disk 0, against a stock run that still read the disk. Needs enough free RAM for the pin (66 GB on that box). Not measured on Linux or on a second GPU.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.