Conversation
|
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: trueComment |
This was referenced Sep 22, 2026
kaix-nv
added this pull request to stack #2510
September 22, 2026 21:27
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## kaix/linear-attention-vllm #2503 +/- ##
==============================================================
+ Coverage 70.20% 70.28% +0.08%
==============================================================
Files 619 621 +2
Lines 68475 68649 +174
==============================================================
+ Hits 48070 48253 +183
+ Misses 20405 20396 -9
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:
|
kaix-nv
removed this pull request from stack #2510
September 23, 2026 01:07
kaix-nv
added this pull request to stack #2520
September 23, 2026 01:07
kaix-nv
removed this pull request from stack #2520
September 23, 2026 01:08
kaix-nv
force-pushed
the
kaix/linear-attention-qat-m2
branch
from
September 23, 2026 01:16
86c4600 to
bd1f350
Compare
kaix-nv
changed the base branch from
kaix/linear-attention-qat-m1
to
kaix/linear-attention-decode-first
September 23, 2026 01:16
This was referenced Sep 23, 2026
kaix-nv
added this pull request to stack #2521
September 23, 2026 01:22
kaix-nv
removed this pull request from stack #2521
September 24, 2026 06:17
kaix-nv
added this pull request to stack #2542
September 24, 2026 06:18
kaix-nv
force-pushed
the
kaix/linear-attention-qat-m2
branch
from
September 24, 2026 06:30
bd1f350 to
580c3dc
Compare
kaix-nv
removed this pull request from stack #2542
September 24, 2026 06:31
kaix-nv
changed the base branch from
kaix/linear-attention-decode-first
to
kaix/linear-attention-vllm
September 24, 2026 06:31
kaix-nv
added this pull request to stack #2543
September 24, 2026 06:31
Contributor
|
kaix-nv
force-pushed
the
kaix/linear-attention-qat-m2
branch
2 times, most recently
from
September 25, 2026 01:54
207e918 to
2dd8c1d
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-m2
branch
from
September 25, 2026 04:26
2dd8c1d to
3f42ee9
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-m2
branch
from
September 25, 2026 05:11
3f42ee9 to
564f906
Compare
Signed-off-by: Kai Xu <kaix@nvidia.com>
kaix-nv
force-pushed
the
kaix/linear-attention-qat-m2
branch
from
September 25, 2026 20:57
564f906 to
4472fb0
Compare
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 PR stack — 5 PRs
All five PRs form a linear GitHub stack in the review order shown above. #2541 applies TensorQuantizer before native vLLM prefill/decode calls.
A separate vLLM prefill-GEMM PR will wait for an optimized fused kernel. #2506 and #2509 are superseded and closed.
What does this PR do?
Type of change: New feature.
Add configurable GDN and KDA prefill operand fake quantization after the decode
and INT8 state infrastructure in #2519. This PR is stacked on the state-only
vLLM plugin in #2541. Each of the eight logical matmul sites
quantizes its actual transformed operands through ModelOpt
TensorQuantizer,with independent FP8/NVFP4 settings, accumulator rounding schedules, and named
elementwise rounding points. State carry and all rounding sites remain differentiable.
KDA uses causal per-channel gate differences to avoid overflowing inverse-decay factors.
This combines the prefill functionality previously split between this PR and
#2506. The triangular solve is exact; approximate inverse belongs to #2507.
Existing FP8/INT8 state formats, decode policies, explicit phase handoff, and
ModelOpt save/restore remain available. Operand scales and state-write scales
are independent. Working arithmetic remains FP32 inside BF16/FP16 autocast.
GDN and KDA share the dispatch between pure prefill and explicit prefill/decode execution. Operand modules follow ModelOpt temporary-attribute cleanup. The prefill benchmark reuses the decode benchmark measurement helper, with one configuration pass per quantizer.
Execution configuration is introduced by #2519 and extended here for prefill arithmetic. This PR replaces the decode prefix implementation with the shared batched prefill core, removes the superseded prefix helper, and keeps independent numerical oracles under tests.
The QAT entry point is
examples/llm_qat/linear_attention/train.py. Usage and numerical contracts live with the example; historical study reports remain beside the scripts in the PRs that introduce them. The training example writes metrics without saving a trained checkpoint, and its source manifest hashes the current implementation files.Usage
The state-read LHS uses the existing GDN/KDA W handle. See
the GDN guide
and the KDA guide
for NVFP4, individual sites, scale domains, arithmetic policies, and framework limits.
Testing
For this documentation/example amendment, pre-commit, Markdown links and anchors, command/Python syntax, source-manifest readability, and stale-path checks passed. Runtime kernels were not changed; model training, distributed integration, and quality studies were not rerun for this amendment.
Prior runtime validation on RTX A6000/SM86, Torch 2.9.1+cu128, Triton 3.5.1, and fla-core 0.5.1:
The tests preserve independent numerical oracles under the test package and cover checkpoint compatibility, default-disabled handles, packed tails, grouped heads, and autocast. Megatron/full-FLA-layer and model-quality qualification were not rerun during this restack. No serving-speed or quality-recovery claim is made.
Before your PR is "Ready for review"
Additional Information
This materialized backend emulates training numerics. It does not provide native
low-precision MMA, compressed states, or a serving speedup. #2541 supplies
state-only vLLM integration; serving-time prefill-GEMM quantization remains
deferred until an optimized fused kernel is available.