Baidu's open-source vision-language OCR model that parses long, multi-page documents and PDFs into structured text in one pass.
zai-org/GLM-OCR
A 0.9B-parameter multimodal OCR model and SDK for extracting text, tables, formulas and layout from complex documents.
Open-source alternative to:Adobe Acrobat
- Stars
- 7,582
- Forks
- 677
- Open issues
- 67
- Last commit
- 25 days ago
What is it?
GLM-OCR is an OCR model for complex document understanding, built on the GLM-V encoder-decoder architecture with a CogViT visual encoder and a GLM-0.5B language decoder. It pairs with a two-stage pipeline that first performs layout analysis using PP-DocLayout-V3, then recognizes regions in parallel, so it handles multi-column pages, complex tables, formulas, code-heavy documents and seals.
The project ships as a Python SDK (installable via pip as glmocr) with a CLI, a Python API and an optional Flask service. It can run through the hosted Zhipu MaaS API without a GPU, or be self-hosted with vLLM, SGLang, Ollama or mlx-vlm on Apple Silicon. Output is provided as Markdown and JSON layout details.
The model weights are published on Hugging Face and ModelScope, and a LLaMA-Factory fine-tuning guide is included.
Key features
- 01Recognizes text, tables, formulas and code in complex document layouts.
- 02Runs layout detection first, then recognizes regions in parallel.
- 03Deploys via the hosted Zhipu MaaS API or self-hosted vLLM, SGLang, Ollama and mlx-vlm.
- 04Provides a CLI, Python API and Flask server with Markdown and JSON output.
- 05Supports layout detection on CPU or a chosen GPU to free resources for the OCR model.
- 06Includes a LLaMA-Factory fine-tuning guide.
Use cases
- Converting scanned PDFs and photographed documents into Markdown or structured JSON.
- Extracting tables and formulas from technical reports or papers.
- Building document-processing pipelines that run on a self-hosted GPU server.
- Running OCR on a laptop with Ollama or mlx-vlm without a cloud service.
In collections
Topics
FAQ
- What is GLM-OCR?
- A 0.9B-parameter multimodal OCR model and SDK for extracting text, tables, formulas and layout from complex documents. GLM-OCR is an OCR model for complex document understanding, built on the GLM-V encoder-decoder architecture with a CogViT visual encoder and a GLM-0.5B language decoder. It pairs with a two-stage pipeline that first performs layout analysis using PP-DocLayout-V3, then recognizes regions in parallel, so it handles multi-column pages, complex tables, formulas, code-heavy documents and seals.
- Is GLM-OCR free to use? What license does it have?
- GLM-OCR is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is GLM-OCR still maintained?
- Actively maintained. The last commit to GLM-OCR was on Oct 14, 2026.
- What can I use GLM-OCR for?
- Converting scanned PDFs and photographed documents into Markdown or structured JSON. Extracting tables and formulas from technical reports or papers. Building document-processing pipelines that run on a self-hosted GPU server. Running OCR on a laptop with Ollama or mlx-vlm without a cloud service.
- Where can I get GLM-OCR?
- The source code and installation instructions are on GitHub: https://github.com/zai-org/GLM-OCR
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
MiniCPM-OCR is a family of open-source document parsing models, plus a companion model that scores whether OCR results are correct.
A unified 0.8B vision-language model for document parsing, key information extraction and OCR-centric visual question answering.
Self-hosted document intelligence API that turns PDFs, Office files and images into LLM-ready chunks with layout analysis and OCR.
Open-source OCR and document AI toolkit that converts PDFs and images into structured Markdown or JSON for LLM and RAG pipelines.
A 9B-parameter open-weight multimodal model for visual understanding, spatial reasoning, agentic tool use, and embodied-AI research, built on Qwen3.5 and C-RADIOv4-H.