Getting cannot import name 'is_npu_available' from 'accelerate.utils'
Trying to run the following notebookFinetune Llama-7B with LORA - Sentiment | Kaggle. Getting cannot import name ‘is_npu_available’ from ‘accelerate.utils’ while doing from peft import LoraConfig, get_peft_model, get_peft_model_state_dict, prepare_model_for_int8_training. No idea what is wrong here, and any help is much appreciated.
2023-08-18T09:58:48Z
I’m getting the same error. It was working just fine two days ago. Update: Apparently the dev version ofpeftwas being installed, which does not contain theis_npu_availablefunction (seehere). I pinned it to 0.4.0 and all is good now.
2024-07-06T10:28:14Z
I solved it usingpip install --upgrade peft accelerate