[GH-ISSUE #78] DeepSeek-V2-Lite-Chat模型启动依赖问题 #74

Open
opened 2026-10-26 21:07:29 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Malowking on GitHub (Aug 2, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V2/issues/78

DeepSeek-V2-Lite-Chat模型必须使用flash_attn这个包么,如果不必要该怎么指定禁用flash_attn 这个包

Originally created by @Malowking on GitHub (Aug 2, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V2/issues/78 DeepSeek-V2-Lite-Chat模型必须使用flash_attn这个包么,如果不必要该怎么指定禁用flash_attn 这个包
Author
Owner

@itaowei commented on GitHub (Sep 5, 2024):

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`
<!-- gh-comment-id:2330495083 --> @itaowei commented on GitHub (Sep 5, 2024): 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: ```bash 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`
Author
Owner

@noobimp commented on GitHub (Feb 22, 2025):

same question.

<!-- gh-comment-id:2676070125 --> @noobimp commented on GitHub (Feb 22, 2025): same question.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-V2#74
No description provided.