Getting cannot import name 'is_npu_available' from 'accelerate.utils'

Trying to run the following notebook Finetune 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.

I’m getting the same error. It was working just fine two days ago. Update: Apparently the dev version of peft was being installed, which does not contain the is_npu_available function (see here). I pinned it to 0.4.0 and all is good now.