mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #30] Batch Slots on GLM Engine #15
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#15
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?
Originally created by @genius1012 on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/30
Could the GLM engine get Strata's batch slots (--batch N with --batch-groups pipelining one group per stage, auto in 0.1.41), ideally above 8 slots (16 at least ideally), plus in-RAM conversation parking that works with the split?
A /v1/responses endpoint would also help Codex-style clients.
@genius1012 commented on GitHub (Oct 10, 2026):
Hi, and thanks for Maya. Maya-L and the 16-GPU split are great work.
some additional context and analysi if it's helpful
A Maya-L with Strata-style batch slots across a multi-GPU split would likely be the best local GLM option for multi-lane serving. Today the GLM path serves one request at a time
(serve/server.py:7, FIFO lock at :963), so it can't take more than one lane.
What we found reading the GLM path (so you don't have to re-derive it; please correct anything we misread):
(include/strata/core/glm_model.hpp:189-199). snap_, snap_pool_, kda_bak_ and the ik_ring_ are also single (:356-363, :416). FastState row buffers are single-row
(src/core/glm_fast_state.hpp:194-205).
(include/strata/kernels/glm_fast.hpp:191-220). The expected-count logic assumes one per MoE layer per token (glm_fast_state.hpp:427). We think this is the hardest part.
multi-row decode kernels.
A possible staged plan (each stage behind an off-by-default STRATA_GLM_* setting, per CONTRIBUTING):
@mw00 commented on GitHub (Oct 10, 2026):
Thank you, that read matches the code. Two notes from work since then:
#76 (the MTP rework, in review) adds a multi-row decode window for one sequence. It covers much of your stage 3's kernel work, but for consecutive positions of one sequence, not separate sequences:
Your stage 4 is also where #76 stopped. The tier protocol has one outstanding route per GPU: the response and the CPU-lane answer are single buffers, and a disk read for a route lands in staging the next route may reuse. So a window's rows route one after another, and their RAM, SSD and CPU-lane work does not overlap.
A response ring plus per-request staging would be the shared prerequisite for both batch slots and a faster verify. That part could be built and tested on its own first.
@mw00 commented on GitHub (Oct 11, 2026):
An update: most of this is in v1.0.33, from @0xPreDa's #93 and #94.
STRATA_GLM_SEQS=<n>(up to 8) on a split of two GPUs or more. The engine keeps n sequence states, and a token of each goes through the split's GPUs one behind the other, so every GPU works on a different conversation. On 4x RTX 4090 with Maya-S24: 110 tok/s alone, 225 tok/s in all for four. One request alone keeps the speculative decode.STRATA_FAIR_SLICE_S=<seconds>. An answer that has been decoding that long while another request waits gives the engine to it, then continues where it was.Not covered:
/v1/responses. The server speaks/v1/chat/completionsand/v1/messages.I'm closing this since the core of it shipped. If you still need either of the last two, a new issue for just that part would be easiest to track.