[PR #101] [MERGED] GLM fast path: a complete expert pool where VRAM holds every expert (from the Gorgon Halo work; needs a test on such a machine) #338

Closed
opened 2026-10-29 21:24:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/101
Author: @mw00
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @mw00

Base: main ← Head: complete-pool


📝 Commits (7)

  • 2ef8fc8 Fixes from the issues: pinned buffers before the RAM tier (#67), the CPU lane's timing by its median (#56), ZFS's ARC counted as free RAM (#89), the prefetch's settings said at start (#6)
  • 38e7c14 Calibration: the disk reads' size (STRATA_GLM_READ_CHUNKS) measured too when part of the model is on the SSD (#67)
  • 992da2a CPU lane timing: the fastest of five spread rounds' medians (a burst of other work covered a whole round's runs)
  • 15d2b09 GLM fast path: a complete expert pool where the budget holds every expert (from the Gorgon Halo work, without the MTP rework's parts)
  • 8c7511a Merge remote-tracking branch 'origin/main' into issue-fixes-2
  • cab2981 Merge remote-tracking branch 'origin/issue-fixes-2' into complete-pool
  • 4cf65fd Merge remote-tracking branch 'origin/main' into complete-pool

📊 Changes

7 files changed (+198 additions, -19 deletions)

View changed files

📝 README.md (+3 -0)
📝 src/core/glm_fast_path.cu (+61 -16)
📝 src/core/glm_fast_state.hpp (+69 -0)
📝 src/core/glm_layer_graphs.hpp (+3 -1)
📝 src/core/glm_memory.hpp (+17 -1)
📝 src/core/glm_prefill.cu (+28 -1)
📝 tests/glm_memory_test.cpp (+17 -0)

📄 Description

The Gorgon Halo work's complete expert pool, on its own, without the MTP rework (#76) it was built on. Stacked on #99.

Waiting for a test on a machine whose VRAM holds every expert. Not to merge before that. None of our machines is one.

What it does

Where a GPU's expert budget holds every expert, the 3 spares a layer and the prompt path's borrowed tail, each layer gets exactly that many slots (STRATA_GLM_COMPLETE_POOL, on). That happens on an AMD APU's carve-out on Windows (the 8065S's 160 GB), on a big card, or on a split over many GPUs. Then:

  • the start loads every expert;
  • a prompt borrows only the slots beyond them: none is moved out, none is staged from the SSD, there is no prestage buffer and the landing ring is the smallest;
  • the decode never misses, the RAM tier is staging only, and the CPU lane has nothing to take;
  • while every expert is in VRAM, the decode leaves out each route's wait and fetch launches (STRATA_GLM_RESIDENT_SKIP, on). They would find nothing to do: ~2.5 ms of a 54 ms token on the 8065S.

Linux APUs keep their unified-memory policy. STRATA_GLM_COMPLETE_POOL=0 gives the old pool. A Windows + AMD submit switch (STRATA_GLM_FLUSH) comes along, off by default.

Measured

  • On the 8065S (Maya-S, drafting with #76): sustained decode +2.6%, 256-token answers +4%, the same answers. Prompts stage nothing (0 of ~1900 experts from the SSD at 16K) and run as fast.
  • Not measured: a split of discrete cards that holds every expert. #89's 4x RTX 4090 is one. There --prefill auto's 8192-token chunks borrowed ~2 GB of each card's pool and prefill halved against --prefill 2048. This mode should give that back. @0xPreDa, could you try this branch with --prefill auto against v1.0.32?

Checked

  • 1x Tesla V100 (Maya-S), where the pool does not hold every expert, so the new mode stays off: the same tokens as v1.0.32, decode the same (18.0 vs 18.2 tok/s).
  • glm_memory_test covers the new sizing.
  • Ported from the branch where it was measured: its MTP verify-path parts (fast_moe_rows) stay with #96.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/101 **Author:** [@mw00](https://github.com/mw00) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `complete-pool` --- ### 📝 Commits (7) - [`2ef8fc8`](https://github.com/mw00/project-maya/commit/2ef8fc8eb6f481cee28dacb19bbde8d0a0c429ca) Fixes from the issues: pinned buffers before the RAM tier (#67), the CPU lane's timing by its median (#56), ZFS's ARC counted as free RAM (#89), the prefetch's settings said at start (#6) - [`38e7c14`](https://github.com/mw00/project-maya/commit/38e7c1483a1bc1edb3b9abeedb52ad8152c7b1f2) Calibration: the disk reads' size (STRATA_GLM_READ_CHUNKS) measured too when part of the model is on the SSD (#67) - [`992da2a`](https://github.com/mw00/project-maya/commit/992da2acb9d9cfdb9a8a404c4916b2110a97e4c3) CPU lane timing: the fastest of five spread rounds' medians (a burst of other work covered a whole round's runs) - [`15d2b09`](https://github.com/mw00/project-maya/commit/15d2b09eff4afe1d05188800057d26e3f7594114) GLM fast path: a complete expert pool where the budget holds every expert (from the Gorgon Halo work, without the MTP rework's parts) - [`8c7511a`](https://github.com/mw00/project-maya/commit/8c7511a0640a581926b2a14dc1ea43aa9d5b7d76) Merge remote-tracking branch 'origin/main' into issue-fixes-2 - [`cab2981`](https://github.com/mw00/project-maya/commit/cab2981f7fe041ed7d9a1a55d7d012628d8167b0) Merge remote-tracking branch 'origin/issue-fixes-2' into complete-pool - [`4cf65fd`](https://github.com/mw00/project-maya/commit/4cf65fdee0d55818cb31d0532a1c09e7e52ef143) Merge remote-tracking branch 'origin/main' into complete-pool ### 📊 Changes **7 files changed** (+198 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+3 -0) 📝 `src/core/glm_fast_path.cu` (+61 -16) 📝 `src/core/glm_fast_state.hpp` (+69 -0) 📝 `src/core/glm_layer_graphs.hpp` (+3 -1) 📝 `src/core/glm_memory.hpp` (+17 -1) 📝 `src/core/glm_prefill.cu` (+28 -1) 📝 `tests/glm_memory_test.cpp` (+17 -0) </details> ### 📄 Description The Gorgon Halo work's **complete expert pool**, on its own, without the MTP rework (#76) it was built on. Stacked on #99. **Waiting for a test on a machine whose VRAM holds every expert. Not to merge before that.** None of our machines is one. ## What it does Where a GPU's expert budget holds every expert, the 3 spares a layer and the prompt path's borrowed tail, each layer gets exactly that many slots (`STRATA_GLM_COMPLETE_POOL`, on). That happens on an AMD APU's carve-out on Windows (the 8065S's 160 GB), on a big card, or on a split over many GPUs. Then: - the start loads every expert; - a prompt borrows only the slots beyond them: none is moved out, none is staged from the SSD, there is no prestage buffer and the landing ring is the smallest; - the decode never misses, the RAM tier is staging only, and the CPU lane has nothing to take; - while every expert is in VRAM, the decode leaves out each route's wait and fetch launches (`STRATA_GLM_RESIDENT_SKIP`, on). They would find nothing to do: ~2.5 ms of a 54 ms token on the 8065S. Linux APUs keep their unified-memory policy. `STRATA_GLM_COMPLETE_POOL=0` gives the old pool. A Windows + AMD submit switch (`STRATA_GLM_FLUSH`) comes along, off by default. ## Measured - **On the 8065S** (Maya-S, drafting with #76): sustained decode +2.6%, 256-token answers +4%, the same answers. Prompts stage nothing (0 of ~1900 experts from the SSD at 16K) and run as fast. - **Not measured: a split of discrete cards that holds every expert.** #89's 4x RTX 4090 is one. There `--prefill auto`'s 8192-token chunks borrowed ~2 GB of each card's pool and prefill halved against `--prefill 2048`. This mode should give that back. @0xPreDa, could you try this branch with `--prefill auto` against v1.0.32? ## Checked - 1x Tesla V100 (Maya-S), where the pool does not hold every expert, so the new mode stays off: the same tokens as v1.0.32, decode the same (18.0 vs 18.2 tok/s). - `glm_memory_test` covers the new sizing. - Ported from the branch where it was measured: its MTP verify-path parts (`fast_moe_rows`) stay with #96. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:24 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#338
No description provided.