camenduru / text-generation-webui-colab

A colab gradio web UI for running Large Language Models
The Unlicense
2.07k stars 367 forks source link

cannot import name 'is_npu_available' from 'accelerate.utils' #24

Closed jackyzhang69 closed 1 year ago

jackyzhang69 commented 1 year ago

│ /usr/local/lib/python3.10/dist-packages/peft/utils/other.py:24 in │ │ │ │ 21 import accelerate │ │ 22 import torch │ │ 23 from accelerate.hooks import add_hook_to_module, remove_hook_from_modu │ │ ❱ 24 from accelerate.utils import is_npu_available, is_xpu_available │ │ 25 │ │ 26 from ..import_utils import is_auto_gptq_available │ │ 27 │ ╰──────────────────────────────────────────────────────────────────────────────╯ ImportError: cannot import name 'is_npu_available' from 'accelerate.utils' (/usr/local/lib/python3.10/dist-packages/accelerate/utils/init.py)

actually it is installed.

XSES-0020 commented 1 year ago

try this. it might work ( •̀ ω •́ )✧ pip install --upgrade accelerate

kyrie2to11 commented 1 year ago

try this. it might work ( •̀ ω •́ )✧ pip install --upgrade accelerate

it works. thank u!

Lyyynnnnnn commented 1 year ago

I meet the same problem and can't deal with it.

camenduru commented 1 year ago

thanks for the info ❤ please test new v2.3

liuzc188 commented 1 year ago

well, you should use pip install accelerate==0.21.0 PS: 0.22.0 version may be same error.