-
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
NameError: name 'init_empty_weights' is not defined #37326
Comments
same issue. regression in transformers |
Caused by #37306. |
Maybe fixed by #37324 |
Same issue #37311 |
I was facing the same issue, and downgrading to |
You can also add |
Ran into the same error. Can 4.51.0 be yanked? |
we will patch today |
sorry everyone for this! cc @Cyrilvallez |
This will be fixed in #37337! In the meantime, you can run |
Closing as this was fixed on main #37337 patching asap |
Latest version of transformers (v4.51.0) now depends on accelerate This has been reported and fixed in transformers main branch and will be released as patch. This is a stop gap solution to keep the CI builds working. huggingface/transformers#37326 Specific errors when running tests: File "/***/***-venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4333, in from_pretrained model_init_context = cls.get_init_context(is_quantized, _is_ds_init_called) File "/***/***-venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3736, in get_init_context init_contexts = [no_init_weights(), init_empty_weights()] NameError: name 'init_empty_weights' is not defined
Can we get a patch release for this? |
whats the eta on the patch |
Latest version of transformers (v4.51.0) now depends on accelerate This has been reported and fixed in transformers main branch and will be released as patch. This is a stop gap solution to keep the CI builds working. huggingface/transformers#37326 Specific errors when running tests: File "/***/***-venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4333, in from_pretrained model_init_context = cls.get_init_context(is_quantized, _is_ds_init_called) File "/***/***-venv/lib/python3.10/site-packages/transformers/modeling_utils.py", line 3736, in get_init_context init_contexts = [no_init_weights(), init_empty_weights()] NameError: name 'init_empty_weights' is not defined
1h max |
Patch is out for 3 hours sorry for not mentionning ! |
Lock Transformers before 2.51 because there is a bug huggingface/transformers#37326
System Info
python 3.13
M4 macos 15.4
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
do just
Expected behavior
The text was updated successfully, but these errors were encountered: