Repository navigation
Conversation
Signed-off-by: weixin_51634168 <2082464740@qq.com>
|
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
|
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.
Summary
Add normalized-input PyTorch reference primitives for Qwen3-Next Ascend groundwork: sigmoid gating, causal depthwise convolution with continuation cache, and sequential Gated DeltaNet with grouped heads and FP32 recurrent state.
Use an analytical sigmoid backward to prevent NaN gradients for extreme negative inputs, hoist Q/K normalization and grouped-head expansion out of the token loop, and return compact convolution caches. Include canonical registry dispatch, legacy import aliases, tests, benchmarks, operator documentation and CPU CI coverage. Fix UTF-8 source reading in the Windows layout compatibility test.
Relationship to existing work
Related to #428 and the references/contracts from #659 and #660. The new normalized GDN API takes beta logits, already-computed log decay and K-major FP32 state; the existing vllm_decode_v1 profile takes raw gate parameters and V-major paged state with its own rounding discipline. Tests explicitly convert those boundaries and compare within tolerance.
This is a draft to review the additional normalized interface and overlap with the existing sequence reference. It does not implement or qualify AscendC kernels, complete model assembly, MoE, TP/CP or provider-level bitwise equivalence.
Validation
Before readiness
Agree on the normalized reference boundary and reuse strategy, then qualify Ascend kernels and their numerical profile on target hardware.
Replaces #708 after renaming the source branch; the commit and changes are identical.