Skip to content

[Feature] Support Norm before Rope. #6332

Merged
Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
K11OntheBoat:remotes/myfork/change_rope
Feb 5, 2026
Merged

[Feature] Support Norm before Rope. #6332
Jiang-Jia-Jun merged 1 commit intoPaddlePaddle:developfrom
K11OntheBoat:remotes/myfork/change_rope

Conversation

@K11OntheBoat
Copy link
Collaborator

Motivation

支持模型通过config变量来交换Attention之前的Rope和Norm计算顺序.

Modifications

支持模型通过config变量来交换Attention之前的Rope和Norm计算顺序.

Usage or Command

当config.json 中存在 "qk_norm_before_rope": true, 即可实现.

Accuracy Tests

结合具体模型评估

Checklist

  • Add at least a tag in the PR title.
    • Tag list: [[FDConfig],[APIServer],[Engine], [Scheduler], [PD Disaggregation], [Executor], [Graph Optimization], [Speculative Decoding], [RL], [Models], [Quantization], [Loader], [OP], [KVCache], [DataProcessor], [BugFix], [Docs], [CI], [Optimization], [Feature], [Benchmark], [Others], [XPU], [HPU], [GCU], [DCU], [Iluvatar], [Metax]]
    • You can add new tags based on the PR content, but the semantics must be clear.
  • Format your code, run pre-commit before commit.
  • Add unit tests. Please write the reason in this PR if no unit tests.
  • Provide accuracy results.
  • If the current PR is submitting to the release branch, make sure the PR has been submitted to the develop branch, then cherry-pick it to the release branch with the [Cherry-Pick] PR tag.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


K11OntheBoat seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@paddle-bot
Copy link

paddle-bot bot commented Feb 3, 2026

Thanks for your contribution!

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@793dac0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...el_executor/layers/attention/flash_attn_backend.py 0.00% 3 Missing ⚠️
...ecutor/layers/attention/flash_mask_attn_backend.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #6332   +/-   ##
==========================================
  Coverage           ?   67.38%           
==========================================
  Files              ?      389           
  Lines              ?    51905           
  Branches           ?     8082           
==========================================
  Hits               ?    34976           
  Misses             ?    14377           
  Partials           ?     2552           
Flag Coverage Δ
GPU 67.38% <40.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

K11OntheBoat added a commit that referenced this pull request Feb 5, 2026
* Support norm before rope

* [Optimization] Accelerate Qwen3 QK RMSNorm via Fused Triton Kernel (#5880)

* qk rmsnorm fused

* inplace

* glm

* fix

* add qknorm layer

* fix

* update

* fix qwen3 vl

* update rl baseline

* fix qwen3 vl moe

* test

* fix qwen vl moe rl

* fix

* fix opt qknorm (#6080)

* Support Norm before Rope

* remove extra file

---------

Co-authored-by: K11OntheBoat <“ruianmaidanglao@163.com”>
Co-authored-by: sunxin <68891411+Sunny-bot1@users.noreply.github.com>
@Jiang-Jia-Jun Jiang-Jia-Jun merged commit 116e2ae into PaddlePaddle:develop Feb 5, 2026
18 of 24 checks passed
EmmonsCurse added a commit that referenced this pull request Feb 5, 2026
EmmonsCurse added a commit that referenced this pull request Feb 5, 2026
EmmonsCurse pushed a commit that referenced this pull request Feb 5, 2026
* Support norm before rope

* [Optimization] Accelerate Qwen3 QK RMSNorm via Fused Triton Kernel (#5880)

* qk rmsnorm fused

* inplace

* glm

* fix

* add qknorm layer

* fix

* update

* fix qwen3 vl

* update rl baseline

* fix qwen3 vl moe

* test

* fix qwen vl moe rl

* fix

* fix opt qknorm (#6080)

* Support Norm before Rope

* remove extra file

---------

Co-authored-by: K11OntheBoat <“ruianmaidanglao@163.com”>
Co-authored-by: sunxin <68891411+Sunny-bot1@users.noreply.github.com>
kesmeey pushed a commit to kesmeey/FastDeploy that referenced this pull request Feb 22, 2026
Co-authored-by: K11OntheBoat <“ruianmaidanglao@163.com”>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants