minhdang commited on
Commit
db4ffb6
·
verified ·
1 Parent(s): 618424b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  from transformers import AutoTokenizer, AutoModel
2
  import torch
3
  import torchvision.transforms as T
 
1
+ import os
2
+ import subprocess
3
+
4
+ # Install flash attention
5
+ subprocess.run(
6
+ "pip install flash-attn --no-build-isolation",
7
+ env={"FLASH_ATTENTION_SKIP_CUDA_BUILD": "TRUE"},
8
+ shell=True,
9
+ )
10
  from transformers import AutoTokenizer, AutoModel
11
  import torch
12
  import torchvision.transforms as T