|
18 | 18 | _log = logging.getLogger(__name__) |
19 | 19 |
|
20 | 20 |
|
| 21 | +# Granite-Docling |
| 22 | +GRANITEDOCLING_TRANSFORMERS = InlineVlmOptions( |
| 23 | + repo_id="ds4sd/granite-docling-258m-2-9-2025-v2", |
| 24 | + prompt="Convert this page to docling.", |
| 25 | + response_format=ResponseFormat.DOCTAGS, |
| 26 | + inference_framework=InferenceFramework.MLX, |
| 27 | + supported_devices=[AcceleratorDevice.MPS], |
| 28 | + scale=2.0, |
| 29 | + temperature=0.0, |
| 30 | + stop_strings=["</doctag>", "<end_of_utterance>"], |
| 31 | +) |
| 32 | + |
| 33 | +GRANITEDOCLING_MLX = InlineVlmOptions( |
| 34 | + repo_id="ds4sd/granite-docling-258m-2-9-2025-v2-mlx-bf16", |
| 35 | + prompt="Convert this page to docling.", |
| 36 | + response_format=ResponseFormat.DOCTAGS, |
| 37 | + inference_framework=InferenceFramework.MLX, |
| 38 | + supported_devices=[AcceleratorDevice.MPS], |
| 39 | + scale=2.0, |
| 40 | + temperature=0.0, |
| 41 | + stop_strings=["</doctag>", "<end_of_utterance>"], |
| 42 | +) |
| 43 | + |
21 | 44 | # SmolDocling |
22 | 45 | SMOLDOCLING_MLX = InlineVlmOptions( |
23 | 46 | repo_id="ds4sd/SmolDocling-256M-preview-mlx-bf16", |
@@ -272,3 +295,4 @@ class VlmModelType(str, Enum): |
272 | 295 | GRANITE_VISION_VLLM = "granite_vision_vllm" |
273 | 296 | GRANITE_VISION_OLLAMA = "granite_vision_ollama" |
274 | 297 | GOT_OCR_2 = "got_ocr_2" |
| 298 | + GRANITEDOCLING = "granite_docling" |
0 commit comments