Spaces:
Running
on
Zero
Running
on
Zero
Commit
β’
4011b8e
1
Parent(s):
3f53d8e
try flash
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
|
22 |
model = Qwen2VLForConditionalGeneration.from_pretrained(
|
23 |
"Qwen/Qwen2-VL-7B-Instruct",
|
24 |
torch_dtype=torch.bfloat16,
|
25 |
-
|
26 |
device_map="auto",
|
27 |
)
|
28 |
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct")
|
|
|
22 |
model = Qwen2VLForConditionalGeneration.from_pretrained(
|
23 |
"Qwen/Qwen2-VL-7B-Instruct",
|
24 |
torch_dtype=torch.bfloat16,
|
25 |
+
attn_implementation="flash_attention_2",
|
26 |
device_map="auto",
|
27 |
)
|
28 |
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-VL-7B-Instruct")
|