-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
AutoModel.from_pretrained without accelerate raises a NameError because init_empty_weights
is not available
#37311
Comments
init_empty_weights
is not available
same, this problem is introduced in 4.50.3->4.51.0 |
downgrade to transformers=4.49.0 solved my problem |
init_empty_weights
is not availableinit_empty_weights
is not available
@samuelan installing accelerate is a better solution imo but still, that's a bug. |
Yep accelerate should be installed, we will fix that ASAP sorry all ! |
This hurts especially in inference-only cases. I'm using sentence-transformers (pinned version) to compute embeddings, and this morning my builds started failing for no good reason. We have no need to install accelerate, and I'm not referencing transformers directly. But, simply instantiating a SentenceTransformer calls the magic line, and everything fails. |
…nsorType change in WasmEdge#4069 install transformers==4.50.3 for chattts as a workaround for huggingface/transformers#37311 Signed-off-by: PeterD1524 <[email protected]>
same here @vladiliescu |
…or TensorType change in WasmEdge#4069 install transformers==4.50.3 for chattts as a workaround for huggingface/transformers#37311 Signed-off-by: PeterD1524 <[email protected]>
…r TensorType change in WasmEdge#4069 install transformers==4.50.3 for chattts as a workaround for huggingface/transformers#37311 Signed-off-by: PeterD1524 <[email protected]>
Closing as this was fixed on main #37337 |
Sorry everyone this was not planned |
d1b92369ca193 introduced a call to
init_empty_weights
that leads to an error if accelerate is not installed. This should be guarded by a condition that accelerate is available (one already guards the import, but not the actual call).The text was updated successfully, but these errors were encountered: