Open coolboyqu opened 1 year ago
我也是这个问题
同一个问题,请问楼主解决了吗 @coolboyqu
因为 fengshen 其他模块为了训练加速引入了 flash_attention 模块。
只用转换脚本的话不用安装这个,可以注释掉fengshen/models/megatron/layers/transformer.py的from .flash_attention import xx
如需安装安装参考 https://github.com/Dao-AILab/flash-attention/tree/main/flash_attn。
Traceback (most recent call last): File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/utils/llama_convert/hf_to_fs.py", line 87, in
fs_model = FengshenLlama(fs_config)
File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/models/llama/modeling_llama.py", line 244, in init
self.llama = LlamaModel(config)
File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/models/llama/modeling_llama.py", line 120, in init
rotary=True) for i in range(config.num_hidden_layers)])
File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/models/llama/modeling_llama.py", line 120, in
rotary=True) for i in range(config.num_hidden_layers)])
File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/models/megatron/layers/transformer.py", line 668, in init
parallel_output=self.gpt_j_residual,
File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/models/megatron/layers/transformer.py", line 271, in init
from .flash_attention import (
File "/dssg/home/scs2010812167/qy/Ziya-LLaMA/Fengshenbang-LM-main/fengshen/models/megatron/layers/flash_attention.py", line 7, in
import flash_attn_cuda
ModuleNotFoundError: No module named 'flash_attn_cuda'
已在根目录执行pip3 install --editable . 且执行成功
nvcc版本:
pytorch所需要的cuda版本:
可以帮忙分析一下是什么问题嘛