-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Update rope_scaling to rope_parameters in preparation for Transformers v5
#28542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 27 commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
a62c2df
Rename `rope_scaling` -> `rope_parameters` in `get_rope`
hmellor f42b03d
Patch rope parameters to new name, `rope_parameters`
hmellor a2a9437
Update models where it's a simple rename
hmellor fba5bf5
Fix model config overrides
hmellor ee5cf66
Update examples
hmellor 080530d
Update benchmarks
hmellor 889b900
More renaming in transformers utils
hmellor 50b1a87
Fix `patch_rope_parameters` for when `rope_scaling` was explicitly `N…
hmellor bd182e0
Update Gemma3 and Gemma3n
hmellor 4c61e2e
Merge branch 'main' into update-rope-config
hmellor 65c8658
Get `rope_theta` from the new location too
hmellor 5d65739
Fix condition for non gemma3 models
hmellor b4e1967
Make Transformers backend torch compile check work with new rope params
hmellor ee77bd7
Re-enable a load of Transformers nightly tests which are now fixed
hmellor df4c007
Update the custom configs
hmellor 325ff8d
Make sure scaling factor always exists
hmellor 11c23a7
A couple more models that now init on v5
hmellor 4ea113c
Update Commandr
hmellor 59b0f27
Update Qwen3Next
hmellor 064441b
Update Olmo2
hmellor bdd0e6c
rope_parameters always present because of rope_theta
hmellor f224ef4
Update LFM2MoE
hmellor 19dcc18
Update LFM2
hmellor 2eecd31
Update the rest
hmellor e95ccd4
update tests
hmellor f2bac15
Update configs
hmellor 36e8a1f
Missed 2
hmellor dfa75cf
Improve comment about what `rope_parameters` is
hmellor 708ea0c
Move scaling factor out of loop
hmellor 4a28512
Early exit `patch_rope_parameters` if no rope params present
hmellor dfb476f
Be more explicit about v4 vs v5 behaviour
hmellor 97bb339
Update a few models to not pass `base` outside of `rope_parameters`
hmellor 97766f5
Update some more models
hmellor 783962b
Update some more models
hmellor 797fbea
Add back `type` -> `rope_type` for legacy custom models
hmellor b780892
More models
hmellor ad9dff2
Fix docs build
hmellor 461ff94
Update some more models
hmellor fa2cced
Update some more models
hmellor 4127d54
Remove last references to `base` arg of `get_rope`
hmellor 1ebd0e4
Update mrope test
hmellor ec30fef
Check everything
hmellor 6368078
fix
hmellor 482f378
Merge branch 'main' into update-rope-config
hmellor d4b2fbb
Don't delete the legacy attributes when still using v4
hmellor 1e68d27
Fix typo in commandr
hmellor db6a880
Fix typo in deepseek v2
hmellor 26a51d4
Handle multimodal models where vision model uses RoPE
hmellor dd69244
Use new default value of rope_parameters in kernels test
hmellor 132dc4b
Use `rope_parameters` instead of `base` in compile test
hmellor d7a6ded
Don't overwrite main config for v4 style Gemma 3
hmellor 8ceffd6
Only raise for `disable_sliding_window` if the model actually has `sl…
hmellor 08126a9
Fix arctic config docstring for docs
hmellor f1c3c33
Fix typo in gpt-oss
hmellor a2601ce
Remove disable_sliding_window errors
hmellor 03d50e0
Fix olmo2
hmellor 93827b6
Fix custom code mm models
hmellor 3b3c233
Fix models with no rope info at all in their `config.json`
hmellor 3f9ce07
Fix unaccounted for style of config
hmellor f1714ac
Hopefully final fix for multimodal rope overrides
hmellor 981aac4
Fix condition for raising error
hmellor 5c2f394
Only override `rope_type` to `deepseek_yarn` if it was not `default`
hmellor 6c64ba5
Make 10000 the default base for `get_rope` if `rope_parameters == None`
hmellor 6beee2b
Set all model defaults which are not 10000
hmellor 002fb90
Update models which can default to 10000
hmellor 99c5d47
Fix nemotron config
hmellor c38e8bb
Fix ernie 4.5 vl
hmellor eebe73c
Fix benchmarks/tests where `get_rope` is called with positional argum…
hmellor 540a46b
Merge branch 'main' into update-rope-config
hmellor a60b5ec
Fix get_rope kwargs in vision transformers
hmellor 00f2853
Update new model
hmellor 717a704
Missed positional args
hmellor a9fa3b0
Fix nemotron config validation
hmellor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.