Fix missing make target platform for local install: 'install-flash-attention-v2' (#1414)

This commit is contained in:
R. P. Ruiz 2024-01-09 10:19:31 -05:00 committed by GitHub
parent 564f2a3b75
commit 91d7267534
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -23,10 +23,15 @@ try:
try: try:
import flash_attn_2_cuda import flash_attn_2_cuda
except ImportError: except ImportError:
architecture_suffix = ""
if IS_CUDA_SYSTEM:
architecture_suffix = "-cuda"
elif IS_ROCM_SYSTEM:
architecture_suffix = "-rocm"
raise ImportError( raise ImportError(
"Flash Attention V2 is not installed.\n" "Flash Attention V2 is not installed.\n"
"Use the official Docker image (ghcr.io/huggingface/text-generation-inference:latest) " "Use the official Docker image (ghcr.io/huggingface/text-generation-inference:latest) "
"or install flash attention v2 with `cd server && make install install-flash-attention-v2`" f"or install flash attention v2 with `cd server && make install install-flash-attention-v2{architecture_suffix}`"
) )
if not (is_sm8x or is_sm90): if not (is_sm8x or is_sm90):
raise ImportError( raise ImportError(