-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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 in tranformers/modeling_utils.py #29825
Comments
EDIT AFTER INITIAL POST: Problem seems to be related to Python 3.11. Managed to run with Python 3.10 and torch-2.2.1-cp310-cp310-manylinux1_x86_64.whl.metadata I have encountered the same issue. My params are: bnb_config = BitsAndBytesConfig( Error: File ~/miniconda3/envs/311_gpu/lib/python3.11/site-packages/transformers/modeling_utils.py:1089, in ModuleUtilsMixin.num_parameters(self, only_trainable, exclude_embeddings) AttributeError: 'torch.dtype' object has no attribute 'itemsize' |
THANK YOU!! |
cc @SunMarc @younesbelkada as it looks like it's quantization code which is triggering this, and should be compatible with multiple versions of python and torch |
Indeed ! #30162 should fix it - we've seen a simiar issue on PEFT recently huggingface/peft#1635 |
System Info
I use torch 1.13.1 / and following bitsandbytes cmake install
Example usage
Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
I use torch 1.13.1 / and following bitsandbytes cmake install
in torch 1.13.1, there is no torch.dtype.itemsize
but tranformers/modeling_utils.py
transformers/src/transformers/modeling_utils.py
Line 1089 in c5f0288
use itemsize()
so I make new function to work in
Expected behavior
The text was updated successfully, but these errors were encountered: