Skip to content

[DCP] Restore GLM-5.3 Flash target-only decode CP - #40433

Closed
kpham-sgl wants to merge 1 commit into
mainfrom
codex/glm53-flash-dcp-base
Closed

kpham-sgl wants to merge 1 commit into
mainfrom
codex/glm53-flash-dcp-base

Conversation

@kpham-sgl

@kpham-sgl kpham-sgl commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Split from #39117, which remains open for reference. This is the base of the two-PR stack; speculative decoding is added by stacked PR #40434.

Restore GLM-5.3-Flash DCP prefill/decode and fix global KV locations addressing rank-local buffers (#36886).

  • Shard target KV, replicate the target indexer, and combine sparse decode outputs with base-2 LSE. Prefill gathers KV and remaps RAGGED indices.
  • At DCP4/base 64, target KV pages are 64 and indexer/allocator pages are 256; indexer kernels retain packed 64-entry blocks. Keep indexer capacity, accounting, CPU copies, and host geometry consistent.
  • Reject DSA + DCP + any speculative algorithm at startup. Existing K3 + DSpark remains allowed. Normal GLM-5.3/RoPE DSA remains unsupported.

Indexer PD descriptors retain their base-page wire layout; heterogeneous-DCP target KV transfer remains unresolved.

Validation on this split: 55 existing pool/DCP CPU tests passed; 110 argument-guard checks and 126 target pool/restore/boundary checks passed, with CPU substitutes for GPU/transport operations. Pre-commit passed. GPU/e2e and accuracy reruns remain pending; evaluation is paused.


CI States

Latest PR Test (Base): ❌ Run #36212967694
Latest PR Test (Extra): ❌ Run #36212967637
Latest PR Test (AMD ROCm 10): ❌ Run #36212967701

@JackChuang

Copy link
Copy Markdown
Contributor

@kpham-sgl Since #42689 (merged 10-21) stopped clamping BF16 NaNs in per-token FP8 quantization, the missing slot-0 skip in set_mla_kv_buffer_kernel_norope that this PR fixes now breaks GLM-5.3-Flash on main without DCP. Padding rows write NaN K into slot 0, the FP8 TileLang sparse decode maps unused top-k entries to row 0, and the model outputs gibberish after the first token.

Would you be open to landing the non-DCP part of your mla_buffer.py change on its own, so main is fixed before the DCP stack is ready? I have it ready as a small PR (the reserved_skip_index skip in the zero-RoPE kernel, the same skip in the torch-native fallback, and rope_dim=0 cases in test_set_mla_kv_buffer.py), and #40433 would rebase on it by adding only the DCP arguments. Happy to file it crediting this PR, or to leave it to you if you prefer to split it yourself.

This is complementary to #45988, which hardens the reader side of the same kernel.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants