mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #48] [MERGED] NextN draft: STRATA_GLM_MTP_KEEP=<n> - fetch only the draft's n best-scored missing experts #301
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#301
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/48
Author: @sociolog
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @mw00
Base:
main← Head:pr4-mtp-keep📝 Commits (2)
751524eNextN draft: STRATA_GLM_MTP_KEEP= - fetch only the n best-scored missing experts of the draft's routeee0c318README: the Tuning table's row for STRATA_GLM_MTP_KEEP📊 Changes
4 files changed (+17 additions, -11 deletions)
View changed files
📝
README.md(+1 -0)📝
include/strata/kernels/glm_fast.hpp(+1 -1)📝
src/core/glm_fast_path.cu(+8 -4)📝
src/kernels/cuda/glm_fast.cu(+7 -6)📄 Description
What
The draft block skips every routed expert that is not in VRAM (
mtp_skip_miss): a draft only has to be a goodguess. On a 2-GPU split that is ~40 % of its experts, and its acceptance shows it.
STRATA_GLM_MTP_KEEP=<n>is inbetween skipping all and
STRATA_GLM_MTP_MISS=1(fetch all): the missing experts among the route's n best-scoredones are computed (CPU lane / PCIe as the plan says for any route), the rest skipped.
moe_routetakesskip_from(the first route rank whose missing experts are skipped: 0 = all, 8 = none) in place of the
skip_missflag.README row added (it also documents
MTP_MISS).Why
A rejected draft costs the head half a full redo of its position, and the draft that skips ~40 % of its experts guesses
worse. Clean A/B on v1.0.23 (RTX 3090 + RTX 3060 split 30, Maya-M, 245760 context,
STRATA_GLM_KV_INT8=1,RAM_RESIDENT=1): the
--benchquestions plus one answer after a 20K-token context,MTP_KEEP0 and 2 interleaved,three rounds each:
MTP_KEEP=0(default)MTP_KEEP=2KEEP=2won every round. Fetching all missing experts (MTP_MISS=1) drafts best (~91 %) but costs the draft more(7.2 vs 3.7 ms a step on the 3060) and came out ~3 % slower than
KEEP=2here. Output tokens are the trunk's owneither way - only the draft changes.
Where it helps: a split whose draft block misses VRAM often (consumer cards, a large quant). It does nothing on one
GPU (no pipelined speculation there) or where the experts all fit in VRAM - which is why it stays off by default.
Checks: on v1.0.21 (whose CUDA sources are those of v1.0.23): build (sm_75, sm_86);
glm_dsa_parity,glm_ffn_parity,glm_hc_parity,glm_kda_parity,glm_layer_parity--selftest: all PASS; the--benchrequest sequence on the real model (RTX 3090 + 3060 split): runs clean. On v1.0.23, as CI runs them:tools/check_hip_compat.pypasses (no new CUDA names); server tests OK (3 skipped); tools tests: the one error istest_iq_packneeding the llama.cpp clone (third_party/), the same on plain v1.0.23.The code, the measurements and this description were produced with the help of Claude, an AI assistant by Anthropic.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.