We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 976e92e commit cc45396Copy full SHA for cc45396
docling/models/picture_description_vlm_model.py
@@ -57,7 +57,10 @@ def __init__(
57
artifacts_path,
58
torch_dtype=torch.bfloat16,
59
_attn_implementation=(
60
- "flash_attention_2" if self.device.startswith("cuda") else "eager"
+ "flash_attention_2"
61
+ if self.device.startswith("cuda")
62
+ and accelerator_options.cuda_use_flash_attention2
63
+ else "eager"
64
),
65
).to(self.device)
66
0 commit comments