mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
[PR #642] GLM paged attention and multi-sequence serving with prefix-aware scheduling #645
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#645
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/642
Author: @ClintMoody
Created: 10/28/2026
Status: 🔄 Open
Base:
main← Head:paged-attn-main📝 Commits (5)
1672a2aApply GLM paged-attention contribution onto upstream v1.1.33, rebased onto v1.1.367aefb7dFix two em-dash comment lines in glm_multi.cudf8e5d6Neutralize an internal decision comment in generate.cpp9f7e1eaNeutralize internal history and gate references in port comments6806e0fdocs(readme): note the paged-attention fork provenance at the top📊 Changes
26 files changed (+4298 additions, -109 deletions)
View changed files
📝
CMakeLists.txt(+34 -1)📝
README.md(+11 -0)➕
bench/README.md(+47 -0)📝
include/strata/core/glm_model.hpp(+114 -0)➕
include/strata/core/glm_pages.hpp(+94 -0)➕
include/strata/core/glm_prefix.hpp(+82 -0)📝
include/strata/kernels/glm_batch.hpp(+10 -2)📝
include/strata/kernels/glm_fast.hpp(+10 -1)➕
src/core/glm_ablate.cuh(+145 -0)📝
src/core/glm_fast_path.cu(+22 -1)📝
src/core/glm_model.cu(+58 -7)📝
src/core/glm_multi.cu(+2103 -67)➕
src/core/glm_pages.cu(+323 -0)📝
src/core/glm_prefill.cu(+43 -1)➕
src/core/glm_prefix.cu(+206 -0)📝
src/core/glm_rows.cu(+7 -1)📝
src/core/glm_rows_state.hpp(+1 -0)➕
src/core/glm_seq_dynamic_test.cpp(+198 -0)📝
src/core/glm_window.cu(+5 -1)📝
src/kernels/cuda/glm_batch.cu(+26 -2)...and 6 more files
📄 Description
Summary
This contribution adapts GLM-5.3-Flash's latent cache to a page-pool and page-table layout, adds per-sequence state and prefix sharing, and schedules multiple requests with admission and pressure management. It includes CUDA gather routing, tests for page/prefix/latent parity, and a synthetic dynamic-sequence test. The work is based on upstream Project Maya v1.1.33 (
88a746c9f94d3c34a9ed31711ecfc64a2f03aa39). It does not port GLM paged attention into DeepSeek's distinctsrc/ds4/engine; the feasibility assessment in the private outer project'sDS4-PAGED-ATTENTION-NOTE.mdsays a direct port is inappropriate.Author credit: Clint Moody contributed the paged-attention, multi-sequence serving, scheduler, and related integration work. Project Maya and Strata retain their existing author credits and copyright notices. The repository's MIT license and all upstream/vendor notices are unchanged. DeepSeek model weights and optional differently licensed drafter weights do not belong in the code PR.
What the branch contains
README.mdexplaining the provenance; everything upstream below it is untouched.Test plan (performed evidence)
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_BUILD_TESTS=ON -DCMAKE_CUDA_ARCHITECTURES=86thenninja -j 8 maya strata_core strata_kernels strata_engine strata_prefill strata_spec: EXIT 0, 154 targets, only the pre-existing unused-argmax warning.glm_prefix_parityandglm_lat_paged_parityPASSED;glm_pages_paritypasses beside a free GPU (its beside-production run fails only with the documented init-shrink OOM beside a full GPU, by design).finish_reason=stop; the repeated-prefix probe reused 1,536 of 1,775 prompt tokens; the speculative path under concurrency stayed byte-identical to the serial MTP path (+12.5% aggregate vs the incumbent pipelined reference in the same window).Notes for maintainers
v1.1.33and carries one squashed contribution commit plus comment-scrub commits.src/ds4/engine is deliberately untouched; DeepSeek loaded and passed bounded probes on the same PC separately, but its sustained speed, long-context behavior and quality remain unmeasured. No DeepSeek performance claim is made from the GLM port tests.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.