Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,7 +146,7 @@ model_n = AutoModelForImageTextToText.from_pretrained(
|
|
| 146 |
MODEL_ID_N,
|
| 147 |
trust_remote_code=True,
|
| 148 |
torch_dtype=torch.float16,
|
| 149 |
-
attn_implementation="flash_attention_2"
|
| 150 |
).to(device).eval()
|
| 151 |
|
| 152 |
|
|
@@ -155,7 +155,7 @@ MODEL_PATH_D = model_path_d_local
|
|
| 155 |
processor_d = AutoProcessor.from_pretrained(MODEL_PATH_D, trust_remote_code=True)
|
| 156 |
model_d = AutoModelForCausalLM.from_pretrained(
|
| 157 |
MODEL_PATH_D,
|
| 158 |
-
attn_implementation="
|
| 159 |
torch_dtype=torch.bfloat16,
|
| 160 |
device_map="auto",
|
| 161 |
trust_remote_code=True
|
|
|
|
| 146 |
MODEL_ID_N,
|
| 147 |
trust_remote_code=True,
|
| 148 |
torch_dtype=torch.float16,
|
| 149 |
+
attn_implementation="eager" # else "flash_attention_2"
|
| 150 |
).to(device).eval()
|
| 151 |
|
| 152 |
|
|
|
|
| 155 |
processor_d = AutoProcessor.from_pretrained(MODEL_PATH_D, trust_remote_code=True)
|
| 156 |
model_d = AutoModelForCausalLM.from_pretrained(
|
| 157 |
MODEL_PATH_D,
|
| 158 |
+
attn_implementation="eager", # else "flash_attention_2"
|
| 159 |
torch_dtype=torch.bfloat16,
|
| 160 |
device_map="auto",
|
| 161 |
trust_remote_code=True
|