Skip to content

fix partial rotary factor - #3861

Merged
lvhan028 merged 1 commit into
InternLM:mainfrom
CUHKSZzxy:fix-rope
Aug 21, 2025
Merged

lvhan028 merged 1 commit into
InternLM:mainfrom
CUHKSZzxy:fix-rope

Conversation

@CUHKSZzxy

@CUHKSZzxy CUHKSZzxy commented Aug 21, 2025 •

Copy link
Copy Markdown
Collaborator

Config may have partial_rotary_factor attribute without rope_scaling attributes.

e.g.

https://huggingface.co/zai-org/GLM-4-9B-0414/blob/main/config.json

https://huggingface.co/zai-org/GLM-4.5-Air/blob/main/config.json

Previous condition checks will miss partial_rotary_factor in this case, which leads to incorrect rope calculations.

Related

This PR is the pre-requisite of GLM4-0414, GLM-4.1V, GLM-4.5 (Air), etc

@grimoire grimoire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lvhan028
lvhan028 merged commit f0e9d98 into InternLM:main Aug 21, 2025
@CUHKSZzxy
CUHKSZzxy deleted the fix-rope branch August 21, 2025 05:45
littlegy pushed a commit to littlegy/lmdeploy that referenced this pull request Sep 11, 2025
oliveagle pushed a commit to oliveagle/lmdeploy that referenced this pull request May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants