Repository navigation
[Feature] GLM-5.3 internal prefill checkpoints - #5048
Closed
yidingcheng0206 wants to merge 4 commits into
Closed
yidingcheng0206 wants to merge 4 commits into
yidingcheng0206 wants to merge 4 commits into
Conversation
RunningLeon
reviewed
Oct 21, 2026
| # named views for operator-owned block caches and configured state caches | ||
| block_caches: Mapping[str, torch.Tensor] | None = None | ||
| named_state_caches: Mapping[str, torch.Tensor] | None = None | ||
| state_capture: 'PrefillStateCapture | None' = None |
Collaborator
There was a problem hiding this comment.
for this type hint, should it be 'PrefillStateCapture' ?
| @@ -0,0 +1,58 @@ | |||
| # GLM-5.3 internal prefill checkpoints | |||
Collaborator
There was a problem hiding this comment.
please add zh_cn docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Feature] GLM-5.3 internal prefill checkpoints
What changes
prefill_save_alignmentfor both internal and prompt-end localprefill checkpoints. Default 8192 is unchanged; smaller endpoint saves
previously admitted are now rejected, including with IC OFF.
checkpoint_state/checkpoint_offsetsoutputs.deepseek_mtp,preserving reservation, restore/pinning, publication and cleanup.
No FlashKDA, KPool, convolution, or TileLang decode kernel sources change.
The same checkpoint H is preserved, rather than discarded for a faster run.
PR #5037 is already in main and is not reapplied.
Enablement and scope
Requires local prefix caching, BF16 inputs, FP32 recurrent state and
FlashKDA with the native checkpoint ABI. Validated FlashKDA:
ee0be888cd0e972f9409bf53756f8c38c6652173.IC defaults to OFF; FLA remains the default prefill entry. Current scope is
exclusive single-sequence text prefill, one internal checkpoint, within the
existing prefill budget. Required endpoint saves and ineligible requests keep
the original path. IC does not support connectors/Mooncake, multimodal,
scoring/routed-expert output, or mixed local decode/prefill.
Intervals within the PCG cap are not merged; IC currently executes outside
prefill PCG while preserving decode graphs. Extra state export and larger
forwards have memory/time costs.
Validation
Submission head:
a447f3768c5a7818563f85a40b9e4d5e55a0ec78.Tested implementation:
170bc8b33b38412d0cbdb56b0e08ed041d804640onmain
52e57d8f0d3a00fc53010f34bb5fe9109e73c560. The only change sincevalidation is documentation cleanup; implementation and tests are identical.
use_graph=TrueModel checks used identical data, native FlashKDA, BF16 KV, prefix ON, prefill16384,
alignment8192, PCG2048, C1, greedy/seed42 and natural EOS with a 512-token cap.
Full responses matched verbatim in only 4/11 pairs; this is not bitwise
equivalence or full IC accuracy acceptance. No separate replay trace was added.
Existing Transformers-version and MP-shutdown warnings were retained.
Both services stopped and GPUs were released.
No new full GSM8K, performance matrix or production-stress claim is made.
Historical performance results are not substituted for this submission-base check.
Review order
Four commits: alignment fix → native backend → non-MTP IC → MTP IC.
User-facing details:
docs/en/advance/internal_checkpoint.md.