-
Notifications
You must be signed in to change notification settings - Fork 1.1k
The default values for rope_freq_base and rope_freq_scale override the model values #765
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
Comments
Thanks so much for just posting this, it fixed my issues with my models, if I set those parameters to 0. |
If I set 1 scale and 0 for base, it will still use 1.0 and 10,000.0? In models that have a specific value I make sure that it's what I want it. I ask because some have metadata of 10,000 and some have it at 0. |
You have to use the latest llama-cpp-python (version 0.2.7) for those default values to work - set them to 0 to enforce defaults (not 0.0 though). |
The metadata of the models should not be set to zero, it should either be the correct value or absent. If the model doesn't have the metadata, the default values are 10000 for rope_freq_base 1 for rope_freq_scale. If the conversion script is adding the metadata with value zero, that is likely a bug in llama.cpp. |
They were just converted before and/or from GGML. All the new ones auto populate with 10k where it's needed. In textgen scale tends to default to 1 and base tends to default to 0 unless the metadata is read. I pulled this morning and yesterday, didn't want to be setting a base of literally 0 although that might have let itself be known rather quickly. |
This should be resolved by #767 in v0.2.8. |
The default values from these parameters are set to 10000 and 1:
llama-cpp-python/llama_cpp/llama.py
Lines 232 to 233 in a72efc7
To use the model default values, these should be set to zero instead.
This is the relevant code in llama.cpp:
https://github.com/ggerganov/llama.cpp/blob/2777a84be429401a2b7d33c2b6a4ada1f0776f1b/llama.cpp#L6699-L6701
Setting an incorrect value may result in poor generation quality in models that use a different value for these parameters, such as CodeLlama.
The text was updated successfully, but these errors were encountered: