Open Malowking opened 1 month ago
I have the same question.
May I ask which version of flash_attn
is required?
I installed the latest version (2.6.3
) but it will make the error below:
Traceback (most recent call last):
File "test.py", line 335, in <module>
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, device_map="sequential",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/workspace/anaconda3/envs/deepseek/lib/python3.12/site-packages/transformers/models/auto/auto_factory.py", line 551, in from_pretrained
model_class = get_class_from_dynamic_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/workspace/anaconda3/envs/deepseek/lib/python3.12/site-packages/transformers/dynamic_module_utils.py", line 502, in get_class_from_dynamic_module
final_module = get_cached_module_file(
^^^^^^^^^^^^^^^^^^^^^^^
File "/data/workspace/anaconda3/envs/deepseek/lib/python3.12/site-packages/transformers/dynamic_module_utils.py", line 327, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/workspace/anaconda3/envs/deepseek/lib/python3.12/site-packages/transformers/dynamic_module_utils.py", line 182, in check_imports
raise ImportError(
ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run `pip install flash_attn`
DeepSeek-V2-Lite-Chat模型必须使用flash_attn这个包么,如果不必要该怎么指定禁用flash_attn 这个包