Skip to content

fix partial rotary factor#3861

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

fix partial rotary factor#3861
lvhan028 merged 1 commit intoInternLM:mainfrom
CUHKSZzxy:fix-rope

Conversation

@CUHKSZzxy
Copy link
Copy Markdown
Collaborator

@CUHKSZzxy CUHKSZzxy commented Aug 21, 2025

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

Copy link
Copy Markdown
Collaborator

@grimoire grimoire left a comment

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
5 checks passed
@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
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