Llama-Chinese icon indicating copy to clipboard operation
Llama-Chinese copied to clipboard

运行quikstart进行模型推理报错

Open sunt40 opened this issue 9 months ago • 4 comments

This modeling file requires the following packages that were not found in your environment: flash_attn. Run pip install flash_attn

sunt40 avatar May 08 '24 08:05 sunt40

安装不了这个包

sunt40 avatar May 08 '24 08:05 sunt40

。。。。mac m1 一样这个问题

wangzilong1997 avatar May 09 '24 03:05 wangzilong1997

如何解决?

shams2023 avatar May 09 '24 06:05 shams2023

trust_remote_code=True, use_flash_attention_2=True 我把这两个都移除了可以加载了,参考https://huggingface.co/microsoft/phi-1_5/discussions/72

我在纯CPU环境,改成了AutoModelForCausalLM.from_pretrained(model_name_or_path, device_map=device_map, torch_dtype=torch.float16)

wytitan avatar May 15 '24 09:05 wytitan