Skip to content
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

Fix rope theta for OpenLlama #29893

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Conversation

jla524
Copy link
Contributor

@jla524 jla524 commented Mar 27, 2024

What does this PR do?

Fixes #29506 (issue)

Rope theta has been added in the config with the same default value as Llama.

Results:

% python3
Python 3.12.2 (main, Feb  6 2024, 20:19:44) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from transformers import OpenLlamaForCausalLM
>>> model = OpenLlamaForCausalLM.from_pretrained("openlm-research/open_llama_7b")
You are using a model of type llama to instantiate a model of type open-llama. This is not supported for all configurations of models and can yield errors.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:22<00:00, 11.41s/it]
Some weights of OpenLlamaForCausalLM were not initialized from the model checkpoint at openlm-research/open_llama_7b and are newly initialized: ['model.embed_layer_norm.bias', 'model.embed_layer_norm.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.

Who can review?

@ArthurZucker and @kevin-guimard-ext

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Thanks!

@ArthurZucker ArthurZucker merged commit 6fd93fe into huggingface:main Mar 30, 2024
8 checks passed
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@jla524 jla524 deleted the fix_open_llama branch April 12, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when loading pretrained OpenLlama model
3 participants