Skip to content

glm cuda tp2 prefill: skip sparse-overwritten dense rows and unread projections - #4499

Merged
ashhart merged 4 commits into
mainfrom
lead/glm-prefill-dead-work
Nov 22, 2026
Merged

ashhart merged 4 commits into
mainfrom
lead/glm-prefill-dead-work

Conversation

@ashhart

@ashhart ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What this changes

Two removals of work prefill never uses, from a read-only review of GLM's two-box prefill:

  1. At the chunk that crosses the dense-attention limit, dense attention ran over every row although sparse attention then overwrites all but the first few; it now runs only on the rows sparse attention leaves untouched.
  2. Prefill no longer computes MTP proposal work and query-side projections whose outputs are never read; the key-side writes the cache needs still run.

Checks

  • Host tests that poison the skipped buffers and still match; fmt, ast-check, lean, 600-line cap; compile-cuda-tests.

Still to run

Two GB10s: pp8k and pp32k A-B-B-A against main with final prompt logits and the following decode tokens compared.

@ashhart

ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner Author

Two-GB10 A/B, GLM-5.3-Flash NVFP4 at TP=2, main vs this branch (both with #4427 applied), fresh servers, prompt cells:

Cell Main This branch
2K prompt 1,620.6 tok/s +0.3%
8K prompt 1,522.9 tok/s +4.2%
32K prompt 1,528.7 tok/s +1.2%

Tokens equal in all 36 compared rows, no slower cell. The 8K gain is the chunk that crosses the dense-attention limit, as expected. Landing it.

  • Synthena

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant