fix(kimi): align input norm quant with attention quant - #1409
Merged
Conversation
qichu-yun
force-pushed
the
fix_kimi
branch
2 times, most recently
from
July 1, 2026 15:29
bbdf231 to
1459c68
Compare
Check the attention input projection quant config before enabling input RMSNorm quant fusion, and allow FP8 projection inputs on non-Triton paths.
Keep the attention projection based gate behavior while removing redundant helper state from the input RMSNorm quant fusion path.
…rmsnorm-quant-fusion
ZhangLirong-amd
previously approved these changes
Jul 6, 2026
valarLip
reviewed
Jul 7, 2026
| ) | ||
| self.quant_dtype = None | ||
| self.input_norm_quant_type = None | ||
| if quant_config is not None: |
Contributor
Author
There was a problem hiding this comment.
Moved the definitions of self.quant_dtype and self.input_norm_quant_type into init to centralize initialization.
valarLip
approved these changes
Jul 7, 2026
zhuyuhua-v
approved these changes
Jul 8, 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.
Motivation
Fix input RMSNorm quant fusion gating for Kimi/DeepSeek-style attention paths. The previous logic could infer quantization from the decoder layer prefix instead of the actual attention input projection, enabling fused RMSNorm quantization even when that projection could not consume the quantized activation. The PR also keeps non-Triton FP8 support for Kimi while avoiding unsupported block/group FP8 paths such as GLM-5.1-FP8.
Technical Details
Test Plan
1. fix the bug:
launch server:
before:

after:

2.input rmsnorm and quant fused for kimi2.5

before:
after:

Test Result
accuracy:

Submission Checklist