Skip to content

Commit a8eecea

Browse files
committed
fix(extract-core): don't force flash attention by default
1 parent 12fd6d2 commit a8eecea

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎extract-core/extract_core/docling_.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ def _resolve_pipeline_options(
205205
accelerator_opts = getattr(pipeline_options, "accelerator_options", None)
206206
if accelerator_opts is not None:
207207
accelerator_opts.device = device.to_docling()
208-
if device is Device.CUDA:
209-
accelerator_opts.cuda_use_flash_attention2 = True
210-
pipeline_options.accelerator_options.device = device.to_docling()
208+
pipeline_options.accelerator_options = accelerator_opts
211209
return pipeline_options
212210

213211

‎extract-core/tests/test_docling.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ def test_docling_format_options_should_resolve_gpu_accelerator() -> None:
5858
# Then
5959
accelerator_opts = as_docling.pipeline_options.accelerator_options
6060
assert accelerator_opts.device is AcceleratorDevice.CUDA
61-
assert accelerator_opts.cuda_use_flash_attention2 is True

0 commit comments

Comments
 (0)