Spaces:
Runtime error
Runtime error
VictorSanh
commited on
Commit
•
792e854
1
Parent(s):
5011842
Update app_dialogue.py
Browse files- app_dialogue.py +3 -0
app_dialogue.py
CHANGED
@@ -2,6 +2,7 @@ import copy
|
|
2 |
import hashlib
|
3 |
import os
|
4 |
import re
|
|
|
5 |
import torch
|
6 |
import PIL
|
7 |
|
@@ -19,6 +20,8 @@ from transformers import AutoProcessor, AutoModelForCausalLM, TextIteratorStream
|
|
19 |
from utils import create_model_inputs
|
20 |
|
21 |
|
|
|
|
|
22 |
DEVICE = torch.device("cuda")
|
23 |
MODELS = {
|
24 |
"HuggingFaceM4/idefics2-neftune": AutoModelForCausalLM.from_pretrained(
|
|
|
2 |
import hashlib
|
3 |
import os
|
4 |
import re
|
5 |
+
import subprocess
|
6 |
import torch
|
7 |
import PIL
|
8 |
|
|
|
20 |
from utils import create_model_inputs
|
21 |
|
22 |
|
23 |
+
subprocess.run('pip install flash-attn --no-build-isolation', env={'FLASH_ATTENTION_SKIP_CUDA_BUILD': "TRUE"}, shell=True)
|
24 |
+
|
25 |
DEVICE = torch.device("cuda")
|
26 |
MODELS = {
|
27 |
"HuggingFaceM4/idefics2-neftune": AutoModelForCausalLM.from_pretrained(
|