taprosoft
commited on
Commit
·
9f1821c
1
Parent(s):
007293f
fix: specify attention mode
Browse files- backends/smoldocling.py +1 -0
backends/smoldocling.py
CHANGED
@@ -19,6 +19,7 @@ processor = AutoProcessor.from_pretrained("ds4sd/SmolDocling-256M-preview")
|
|
19 |
model = AutoModelForVision2Seq.from_pretrained(
|
20 |
"ds4sd/SmolDocling-256M-preview",
|
21 |
torch_dtype=torch.bfloat16,
|
|
|
22 |
).to(DEVICE)
|
23 |
|
24 |
# Create input messages
|
|
|
19 |
model = AutoModelForVision2Seq.from_pretrained(
|
20 |
"ds4sd/SmolDocling-256M-preview",
|
21 |
torch_dtype=torch.bfloat16,
|
22 |
+
_attn_implementation="sdpa",
|
23 |
).to(DEVICE)
|
24 |
|
25 |
# Create input messages
|