tomasruiz commited on
Commit
5e7cd8f
1 Parent(s): fbe79f1

Install flash_attn

Browse files
Files changed (2) hide show
  1. pre-requirements.txt +1 -1
  2. st_app.py +6 -0
pre-requirements.txt CHANGED
@@ -1 +1 @@
1
- torch
 
1
+ -U pip
st_app.py CHANGED
@@ -5,8 +5,14 @@ try:
5
  from llmlib.runtime import filled_model_registry
6
  except ImportError:
7
  import os
 
8
 
9
  os.system("pip install -e ./llmlib")
 
 
 
 
 
10
  from llmlib.runtime import filled_model_registry
11
 
12
  from llmlib.model_registry import ModelEntry, ModelRegistry
 
5
  from llmlib.runtime import filled_model_registry
6
  except ImportError:
7
  import os
8
+ import subprocess
9
 
10
  os.system("pip install -e ./llmlib")
11
+ subprocess.run(
12
+ "pip install flash-attn --no-build-isolation",
13
+ env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
14
+ shell=True,
15
+ )
16
  from llmlib.runtime import filled_model_registry
17
 
18
  from llmlib.model_registry import ModelEntry, ModelRegistry