Update app.py
Browse files
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
|