ImportError: cannot import name 'shard_checkpoint' from 'transformers.modeling_utils
#12
by
rj979797
- opened
ImportError: cannot import name 'shard_checkpoint' from 'transformers.modeling_utils' (/***/qwen2vl/Qwen2.5-VL/venv/lib/python3.11/site-packages/transformers/modeling_utils.py)
solved by
pip install --force-reinstall git+https://github.com/huggingface/transformers.git@9985d06add07a4cc691dc54a7e34f54205c04d40
pip install autoawq
What python version do you have? I haven't been able to resolve this yet.
@yaneivan I had the same issue and the comment by rj979797 did not solve my problem. However upgrading autoawq using source fixed my issue. For some reason
pip install -U autoawq
Would give me version 0.2.5
which is not compatible with recent versions of transformers.
pip install --force-reinstall git+https://github.com/casper-hansen/AutoAWQ.git
Installs autoawq==0.2.8
which is indeed compatible, and includes a later commit b6719dc
with message Add Qwen2.5-VL (#706)
, which itself includes support for Qwen2.5VL models.
I hope this helps!