-
Notifications
You must be signed in to change notification settings - Fork 14.1k
convert : refactor rope scaling handling #18013
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
Conversation
ggerganov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming that gpt-oss converts correctly. Will take a look at the rest of the changes, but probably won't be able to give much additional feedback on the python code.
| self.model_name = model_name | ||
| self.dir_model_card = dir_model # overridden in convert_lora_to_gguf.py | ||
|
|
||
| # Ensure "rope_theta" and "rope_type" is mirrored in rope_parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it probably better to extract this into a new method called load_rope_params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered it, but it got a little awkward as a static method and not much sense as a regular method.
Handle rope scaling in
set_gguf_parametersto deduplicate code and support the newrope_parameters(whererope_thetaalso has moved) introduced in huggingface/transformers#39847Obsoletes #18008