ImportError: cannot import name 'is_npu_available' from 'accelerate.utils' 1. 解决方法 pip uninstall peft pip install peft@git+https://github.com/huggingface/peft.git 1. 2. 卸载后重新安装就可以了。
一般出现这种问题的原因是该版本的peft包中没有PeftModel,这种情况都需要降级。 我验证了以下,我实在alpaca-lora项目中使用peft,alpaca-lora的项目大概在2个月以前更新,而peft包实在最近更新的4.0版本,而2个月以前peft还是2.0版本,所以我果断把peft降到2.0版本,然后问题就解决了。
return train(config, [], device, on_step_complete, positive=[positive], negative=[negative], save_file=False, clip_index=clip_index, peft_type=peft_type, rank=rank) if __name__ == "__main__": parser = argparse.ArgumentParser() @@ -352,7 +353,7 @@ def train_lora(target, posit...
21 is_peft_available, 22 logging, 23 ) 26 if is_accelerate_available(): ImportError: cannot import name 'check_peft_version' from 'transformers.utils' (/miniconda3/lib/python3.10/site-packages/transformers/utils/__init__.py) The above exception was the direct cause of the following exception...
ImportError: cannot import name 'prepare_model_for_kbit_training' from 'peft', how to solve this error? Member BenjaminBossan commented Aug 14, 2023 Could you try installing the latest version of PEFT? In your Python environment, run: python -m pip install -U peft 👍 2 👎 2 githu...
model_name = 'google/flan-t5-large' model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.float16, load_in_8bit=True, device_map="auto") tokenizer = AutoTokenizer.from_pretrained(model_name) from peft import prepare_model_for_training model = prepare_model_for_traini...
(peft) $ python Python 3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:58:44) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from peft import prepare_model_for_kbit_training ==...
[BUG] 当使用LLaMA-Factory 使用.bin格式训练合并之后的模型,出现TypeError: PeftConfig.__init__() got an unexpected keyword argument '_name_or_path' #3791 caijx168 opened this issue Apr 17, 2024· 2 comments Comments caijx168 commented Apr 17, 2024 2024-04-17 14:06:37 | ERROR | std...