docling-project / docling-project/docling

Can't Set Ollama Context Size

Open
#2,795 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

### Bug
Per discussion https://github.com/docling-project/docling/discussions/2784, unable to set Ollama context size as suggested

### Steps to reproduce
Use the following config to pass the context size to Ollama:
# Initialize document converter
pipeline_options = VlmPipelineOptions(enable_remote_services=True)
pipeline_options.vlm_options = ApiVlmOptions(
url="http://localhost:11434/v1/chat/completions",
params={
"model": "qwen2.5vl:72b-q8_0",
"max_tokens": 8192,
},
prompt="OCR the full page to markdown.",
timeout=300,
temperature=0.0,
concurrency=4,
scale=1.0,
response_format=ResponseFormat.MARKDOWN,
)

Doesn't work with Ollama's num_ctx config either.

## Docling version
2025-12-16 18:32:11,901 - INFO - Loading plugin 'docling_defaults'
2025-12-16 18:32:11,922 - INFO - Registered ocr engines: ['auto', 'easyocr', 'ocrmac', 'rapidocr', 'tesserocr', 'tesseract']
Docling version: 2.64.1
Docling Core version: 2.55.0
Docling IBM Models version: 3.10.3
Docling Parse version: 4.7.2
Python: cpython-312 (3.12.9)
Platform: Linux-6.16.3+deb13-amd64-x86_64-with-glibc2.41

### Python version
Python 3.12.9

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.