Repository navigation
Conversation
Signed-off-by: Kai Xu <kaix@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
kaix-nv
added this pull request to stack #2806
October 14, 2026 20:19
This was referenced Oct 14, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## kaix/linear-attention-qat-example #2805 +/- ##
==================================================================
Coverage 68.12% 68.13%
==================================================================
Files 665 665
Lines 75687 75689 +2
==================================================================
+ Hits 51559 51567 +8
+ Misses 24128 24122 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Kai Xu <kaix@nvidia.com>
Contributor
|
kaix-nv
removed this pull request from stack #2806
October 19, 2026 22:19
kaix-nv
added this pull request to stack #2879
October 19, 2026 22:19
This branch has not been deployed
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.
Linear-attention series — 10 PRs
mainThe nine open PRs form native GitHub stack #2879 in this order. #2497 has landed, so #2519 targets
main.#2829 supplies the shared rounding policy before ReplaySSM training and serving. #2788 owns the ReplaySSM training foundation; #2541 owns ordinary state-QDQ serving; #2878 adds the experimental two-precision ReplaySSM serving backend and native stochastic NVFP4 read integration. The serving branch inherits rounding from #2829 without a temporary backport.
#2503 and #2507 retain their existing code and commit heads. Their functional ports and rebases remain deferred until their immediate parents land; their bases and table positions express the intended merge order. Serving-time prefill-GEMM QDQ remains deferred until an optimized fused kernel is available.
What does this PR do?
Type of change: New feature.
Add optional dynamic NVFP4 recurrent-state fake quantization through ModelOpt's existing TensorQuantizer. This follows #2657 and precedes #2788; the state-QAT runtime remains in #2519. State values use E2M1, 16-value last-axis blocks, E4M3 block scales, a dynamic global scale and identity STE. The new recipe leaves weights and activations unchanged.
The implementation extends format validation and adds a recipe; it introduces no quantization kernel. State storage remains floating point. This PR does not qualify NVFP4 in a vLLM engine or implement ReplaySSM's planned two-precision design.
Usage
Use a supported Megatron-Core GDN/KDA model. For Kimi-Linear/Kimi-K3, explicitly select the
vllm_kimi_k3policy and its serving restrictions. Quantizer configuration isnum_bits=(2,1),block_sizes={-1:16, "type":"dynamic", "scale_bits":(4,3)}, top-leveltype="dynamic", andpass_through_bwd=True.Testing
git diff --checkpassed.The GPU job also passed the parent example's QAT/QAD checkpoint round trips and prompt-derived QAD test (four tests total, 90.50s). Those workflow tests use INT8, not NVFP4; NVFP4 training quality and engine qualification remain unmeasured.
Before your PR is "Ready for review"
Additional Information
Step 4/10. About 101 added non-test lines over #2657. NVFP4 was separated from #2519 in response to review.