GLM-OCR
Z.ai's open-source OCR model: accurate, fast, comprehensive text recognition.
Working when we checked on .
What is GLM-OCR?
GLM-OCR is an open-source multimodal OCR model for complex document understanding, built on a GLM-V encoder–decoder architecture with a CogViT visual encoder and 0.5B language decoder. It targets developers and businesses needing high-accuracy text, formula, table, and information extraction from documents. It scores 94.62 on OmniDocBench V1.5 and handles complex tables, code-heavy documents, and seals. With 0.9B parameters, it supports deployment via vLLM, SGLang, and Ollama, or through a hosted Zhipu MaaS API, and ships with a Python SDK.
GLM-OCR pricing
Pricing model: Free
Open source (free); API access available via docs.z.ai (pricing not specified on page)
GLM-OCR pros
- Scores 94.62 on OmniDocBench V1.5, ranking #1 overall
- Only 0.9B parameters, enabling edge and high-concurrency deployment
- Fully open-sourced with SDK, available on Hugging Face and ModelScope
- Skill mode works via pip install glmocr with no GPU or YAML config
- Fine-tuning tutorial based on LLaMA-Factory is available
- Supports self-hosting with vLLM and SGLang
GLM-OCR cons
- Cloud API usage requires an API key from Zhipu
- Self-hosted layout-detection pipeline requires separate installation extra and GPU
- Handling large images/PDFs requires manual vLLM flags such as --max-model-len
- Self-hosting requires vLLM 0.19.0+, SGLang 0.5.10+, or transformers 5.3.0+
Frequently asked questions about GLM-OCR
What is GLM-OCR?
GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder–decoder architecture. It combines a CogViT visual encoder, a lightweight cross-modal connector, and a GLM-0.5B language decoder with a layout-analysis and parallel-recognition pipeline based on PP-DocLayout-V3.
How accurate is GLM-OCR?
It achieves a score of 94.62 on OmniDocBench V1.5, ranking #1 overall, and reports top results across major document understanding benchmarks including formula recognition, table recognition, and information extraction.
How can GLM-OCR be deployed?
It supports deployment via vLLM, SGLang, and Ollama, or through the hosted Zhipu MaaS API which requires no GPU. A Python SDK with installable extras (selfhosted, server) is also provided.
How many parameters does GLM-OCR have?
The model has only 0.9B parameters, which reduces inference latency and compute cost and makes it suitable for high-concurrency services and edge deployments.
Is GLM-OCR open source?
Yes, it is fully open-sourced with weights available on Hugging Face (zai-org/GLM-OCR) and ModelScope in BF16 precision, along with an SDK and inference toolchain.
How do I use the hosted cloud API?
Get an API key from open.bigmodel.cn, set maas.enabled=true with the key in config.yaml, and the SDK forwards documents to the Zhipu cloud API, returning Markdown plus JSON layout details with no local GPU required.
Can GLM-OCR be fine-tuned?
Yes, a fine-tuning tutorial based on LLaMA-Factory is available in the repository under examples/finetune.
What real-world document types does it handle well?
It is optimized for practical business use cases and maintains performance on complex tables, code-heavy documents, seals, and other challenging real-world layouts.
Who is GLM-OCR for?
It is aimed at developers and businesses that need accurate document OCR and understanding, including those building high-concurrency services or edge deployments requiring text, formula, and table extraction.
Is there a Skill mode for agents?
Yes, as of March 2026 the SDK supports agent-friendly Skill mode: install with pip install glmocr, set an API key, and use it via CLI or Python with no GPU or YAML configuration needed.