Add rope_pairwise config flag to optimize YaRN RoPE - #4627
Open
dandragona wants to merge 3 commits into
Open
Conversation
dandragona
requested review from
A9isha,
NuojCheng,
RissyRan,
SurbhiJainUSC,
abhinavclemson,
aireenmei,
bvandermoon,
gagika,
gobbleturk,
hengtaoguo,
huytransformer,
igorts-git,
jiangjy1982,
khatwanimohit,
parambole,
richjames0,
shralex,
shuningjin,
suexu1025,
vipannalla and
xibinliu
as code owners
July 27, 2026 16:26
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
dandragona
force-pushed
the
rope-pairwise-opt
branch
from
July 27, 2026 16:30
3bd0253 to
05da824
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
dandragona
force-pushed
the
rope-pairwise-opt
branch
2 times, most recently
from
July 27, 2026 17:09
5f37896 to
a7aaa78
Compare
…f YarnRotaryEmbedding. This addresses the Codecov patch coverage warnings. CHANGE_STEWARD=true
Add documentation for the new rope_pairwise optimization flag in the DeepSeek runner guide. TAG=agy CONV=a262e292-a0d4-49f9-ad26-f42e697a5979 CHANGE_STEWARD=true
dandragona
force-pushed
the
rope-pairwise-opt
branch
from
July 27, 2026 22:25
1a7e344 to
75d16a9
Compare
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.
Description
Add
rope_pairwiseconfig flag to optimize YaRN RoPE computation inYarnRotaryEmbedding.When enabled (
rope_pairwise: true), it uses a pairwise interleaved implementation of RoPE inYarnRotaryEmbeddingwhich keeps the rank-5 pair tensor intact, avoiding some data formatting during MLA.Tests
test_pairwise_calltoYarnRotaryEmbeddingTestintests/unit/embeddings_test.py.test_pairwise_requires_interleavevalidation test.Checklist