-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[Bug]: load_weights() does not work for RobertaModel embeddings since weights start with "roberta." #11821
Closed
1 task done
Labels
bug
Something isn't working
Comments
cc @maxdebayser |
Script for Repro:
|
Actually, after wondering how it was working on the default load path, I realized that it wasn't working there, either. So a simpler repro:
|
very dirt refer to |
I can look into this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your current environment
The output of `python collect_env.py`
Model Input Dumps
No response
🐛 Describe the bug
The RobertaEmbeddingModel here:
vllm/vllm/model_executor/models/roberta.py
Line 151 in a4e2b26
just uses the base BertModel() class, so when model.load_weights() is called the param names don't match, leading to this stack trace:
File "/home/ray/anaconda3/lib/python3.10/site-packages/vllm/model_executor/models/bert.py", line 448, in load_weights
self.model.load_weights(weights)
File "/home/ray/anaconda3/lib/python3.10/site-packages/vllm/model_executor/models/bert.py", line 394, in load_weights
param = params_dict[name]
KeyError: 'roberta.embeddings.LayerNorm.weight'
I think it should be renaming the weights to remove the "roberta." bit similar to
vllm/vllm/model_executor/models/roberta.py
Line 186 in a4e2b26
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: