Skip to content

[Cherry-Pick]Support Norm before Rope(#6332)#6369

Merged
EmmonsCurse merged 5 commits into
PaddlePaddle:release/2.4from
K11OntheBoat:Release24_norm_rope
Feb 5, 2026
Merged

[Cherry-Pick]Support Norm before Rope(#6332)#6369
EmmonsCurse merged 5 commits into
PaddlePaddle:release/2.4from
K11OntheBoat:Release24_norm_rope

Conversation

@K11OntheBoat
Copy link
Copy Markdown
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.

K11OntheBoat and others added 5 commits February 3, 2026 21:40
…addlePaddle#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
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Sunny-bot1
❌ K11OntheBoat


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
Copy Markdown

paddle-bot Bot commented Feb 5, 2026

Thanks for your contribution!

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 35.64356% with 65 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/2.4@499a272). Learn more about missing BASE report.

Files with missing lines Patch % Lines
fastdeploy/model_executor/layers/normalization.py 17.14% 29 Missing ⚠️
...executor/ops/triton_ops/qk_rmsnorm_fused_kernel.py 38.09% 26 Missing ⚠️
...el_executor/layers/attention/flash_attn_backend.py 0.00% 7 Missing ⚠️
...ecutor/layers/attention/flash_mask_attn_backend.py 0.00% 2 Missing ⚠️
...stdeploy/model_executor/ops/triton_ops/__init__.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.4    #6369   +/-   ##
==============================================
  Coverage               ?   56.92%           
==============================================
  Files                  ?      332           
  Lines                  ?    41461           
  Branches               ?     6310           
==============================================
  Hits                   ?    23602           
  Misses                 ?    16012           
  Partials               ?     1847           
Flag Coverage Δ
GPU 56.92% <35.64%> (?)

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.

@EmmonsCurse EmmonsCurse merged commit f649af9 into PaddlePaddle:release/2.4 Feb 5, 2026
24 of 29 checks passed
gongel pushed a commit that referenced this pull request Mar 3, 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>
@K11OntheBoat K11OntheBoat deleted the Release24_norm_rope branch March 17, 2026 09:30
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