Repository navigation
[Feature] Add optional FP8 MLA cache for GLM-5.3-Flash - #5045
Merged
RunningLeon merged 6 commits intoOct 21, 2026
Merged
Conversation
RunningLeon
reviewed
Oct 21, 2026
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.
Summary
Enable opt-in
--quant-policy fp8for GLM-5.3-Flash target and MTP MLA caches on Hopper, following vLLM #59246. GLM manages KPool itself and setsmla_index_topk=None, so the existing cache-policy conversion did not select its FP8 MLA path. The default BF16 behavior remains unchanged.The FlashMLA cache row changes from 512 BF16 values (1024 B) to 512 FP8 values, four FP32 scales and 64 BF16 zeros (656 B). Decode pads the 512-wide NoPE query to 576 while preserving the model's attention scale. The writer clears the unused tail for each written token; prefill dequantizes to the logical 512 dimensions. Sparse decode preserves KPool's 2048 selected tokens plus up to three tail tokens and pads the index width to 2112 for the FP8 kernel. This uses FlashMLA
1.0.0+ba89a34on H200.Validation
--cache-max-entry-count 0.7, batch size 32, session length 32768, with otherwise matched BF16/FP8 server settings. Cache sizes are actual owning allocations per GPU, excluding model weights and runtime workspaces.--quant-policy none)--quant-policy fp8)At the same allocated block-cache budget, FP8 increases usable token capacity by 50.30%. The separate state pool is excluded from the block-cache row. GSM8K used temperature 0, seed 42 and a 256-token output limit; the +0.30-point difference is a single paired result, not an established accuracy gain.
--cache-max-entry-count 0.7, prefix caching and 5 MTP draft tokens. The evaluation used temperature 1, top-p 0.95 and thinking enabled. One response reached the output limit. There is no matched BF16 GPQA baseline, so this measures FP8 accuracy rather than an accuracy change.