GLM-OCR vs Granite Docling
Pick GLM-OCR for high-volume PDF to Markdown through a cheap API, or for pulling fields into a JSON schema. Pick Granite Docling for self-hosted English PDFs with tables, code and equations, especially inside a Docling pipeline. The main split is delivery and scope: GLM-OCR is an API or self-host model, while Granite Docling is a 258M self-hosted model that outputs DocTags.
GLM-OCRzai/glm-ocr | Granite Doclingibm/granite-docling | |
|---|---|---|
| Type | Open source | Open source |
| Price | 6 credits / page | 1 credit / page |
| Per 1,000 pages | $6.00 | $1.00 |
| Typical speed | 1.3 s / page | 1.5 s / page |
| Best for | Low-cost general documents | Small-model document conversion |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages | English, experimental CJK and Arabic |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | No | No |
| Math | ✓ Yes | ✓ Yes |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| Multilingual | ✓ Yes | No |
| On OCRRouter | Available | Available |
Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.
Which to choose
Choose GLM-OCR if
- You can call it through the Z.ai API at $0.03 per million tokens for input and output, so you do not need to run a GPU.
- It extracts fields into a user-defined JSON schema, which suits forms, and it scores 94.62 on OmniDocBench v1.5 per its model card.
- It reached 1.86 PDF pages per second on a single replica in the authors' test, which fits high-volume PDF to Markdown.
Choose Granite Docling if
- It is Apache-2.0 and only 258M parameters, so it can run on CPU or a small GPU at no licence cost.
- It reports table structure TEDS of 0.97 on FinTabNet, plus equation F1 of 0.968 and code recognition F1 of 0.988.
- It outputs DocTags, Markdown, HTML, LaTeX and bounding boxes, and it is built to feed the Docling library.
Key differences
| GLM-OCR | Granite Docling | |
|---|---|---|
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers | Self-host only, typically inside Docling |
| Licence | MIT for the weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0 | Apache-2.0 |
| Price | API: $0.03 per million tokens for input and output. Self-hosted: free, you pay for compute | Free, self-hosted, you pay for compute |
| Size | 0.9B parameters | 258M parameters |
| Output formats | Markdown, JSON, plain text | DocTags, Markdown, HTML, LaTeX, bounding boxes |
| Limits and platform | API caps input at 100 pages, 50 MB per PDF and 10 MB per image. Cannot run on aarch64 Linux | English primary; Japanese, Arabic and Chinese are experimental. Needs float32 on GPUs without bfloat16, such as T4 |
| Known failure | Repeats output unless a stop sequence is set. Drops table footer and summary rows, and loses comma decimal separators in cropped tables | Gets stuck in repetitive loops on page headings and invoices. Ollama on CPU may hallucinate from FP16 overflow |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- Issue #240 missing table rows
- Granite-Docling model card
- HF discussion #24 repetition
What each one is
Granite Docling
Compact IBM vision model that converts pages to DocTags for the Docling pipeline.
Granite Docling detailsTry both on your own file
Run the file once with each model and compare the output.
PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?
Use one, fall back to the other
{"model": "zai/glm-ocr","fallbacks": ["ibm/granite-docling"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs SmolDoclingGLM-OCR vs Qwen-VLUnlimited OCR vs Granite DoclingPaddleOCR-VL vs Granite DoclingGranite Docling vs Adobe Acrobat OCRGLM-OCR vs OCRmyPDFGranite Docling vs MonkeyOCRAzure Document Intelligence vs Granite Docling
GLM-OCR alternativesGranite Docling alternativesBest OCR models in 2026