Skip to content

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

Merged
K11OntheBoat merged 5 commits intoPaddlePaddle:release/2.4from
K11OntheBoat:Release24_norm_rope
Feb 5, 2026
Merged

[Cherry-Pick]Support Norm before Rope(#6332)#6333
K11OntheBoat merged 5 commits intoPaddlePaddle:release/2.4from
K11OntheBoat:Release24_norm_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.

K11OntheBoat and others added 4 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

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

paddle-bot bot commented Feb 3, 2026

Thanks for your contribution!

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 59.48276% with 47 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
...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 ⚠️
fastdeploy/model_executor/models/glm4_moe.py 16.66% 5 Missing ⚠️
fastdeploy/model_executor/layers/normalization.py 88.57% 3 Missing and 1 partial ⚠️
...ecutor/layers/attention/flash_mask_attn_backend.py 0.00% 3 Missing ⚠️
fastdeploy/model_executor/models/qwen3.py 87.50% 1 Missing ⚠️
...stdeploy/model_executor/ops/triton_ops/__init__.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             release/2.4    #6333   +/-   ##
==============================================
  Coverage               ?   57.05%           
==============================================
  Files                  ?      332           
  Lines                  ?    41379           
  Branches               ?     6298           
==============================================
  Hits                   ?    23609           
  Misses                 ?    15922           
  Partials               ?     1848           
Flag Coverage Δ
GPU 57.05% <59.48%> (?)

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 K11OntheBoat merged commit a62d003 into PaddlePaddle:release/2.4 Feb 5, 2026
15 of 19 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
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