Join our WeChat and Discord community Use GLM-OCR's API GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder–decoder architecture. It introduces Multi-Token Prediction (MTP) loss and stable full-task reinforcement learning to improve training efficiency, recognition accuracy, and generalization. The model integrates the CogViT visual encoder pre-trained on large-scale image–text data, a lightweight cross-modal connector with efficient token downsampling, and a GLM-0.5B language decoder. Combined with a two-stage pipeline of layout analysis and parallel recognition based on PP-DocLayout-V3, GLM-OCR delivers robust and high-quality OCR performance…
GLM-OCR is an open-weight model for image to text from Manny, released under MIT License. It has 1.3B parameters and a 131,072-token context. At 16-bit it needs about 3.2 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.
Join our WeChat and Discord community Use GLM-OCR's API GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder–decoder architecture.
Runs On
What it takes to serve GLM-OCR (1.3B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.
| Precision | Weights | Memory needed | Cheapest setup | Per hour | Also fits |
|---|---|---|---|---|---|
| 16-bit | 2.7 GB | 3.2 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 8-bit | 1.3 GB | 1.6 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
| 4-bit | 0.7 GB | 0.8 GB | 1x MI300X (192 GB) Vultr |
$1.85 | 1x H100 $1.99 · 1x MI325X $2.00 |
Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 18, 2026.
GLM-OCR on every accelerator the SAVRN Index prices, at every precision
Model Card
By Manny, published under mit, revision d4b8f0564c29.
Join our WeChat and Discord community Use GLM-OCR's API GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder–decoder architecture. It introduces Multi-Token Prediction (MTP) loss and stable full-task reinforcement learning to improve training efficiency, recognition accuracy, and generalization. The model integrates the CogViT visual encoder pre-trained on large-scale image–text data, a lightweight cross-modal connector with efficient token downsampling, and a GLM-0.5B language decoder. Combined with a two-stage pipeline of layout analysis and parallel recognition based on PP-DocLayout-V3, GLM-OCR delivers robust and high-quality OCR performance…
Read Manny's full model card
Join ourWeChat and Discord community
Use GLM-OCR'sAPI
GLM-OCR SDK Recommended
Technical Report
Introduction
GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder–decoder architecture. It introduces Multi-Token Prediction (MTP) loss and stable full-task reinforcement learning to improve training efficiency, recognition accuracy, and generalization. The model integrates the CogViT visual encoder pre-trained on large-scale image–text data, a lightweight cross-modal connector with efficient token downsampling, and a GLM-0.5B language decoder. Combined with a two-stage pipeline of layout analysis and parallel recognition based on PP-DocLayout-V3, GLM-OCR delivers robust and high-quality OCR performance across diverse document layouts.
Key Features
-
State-of-the-Art Performance: Achieves a score of 94.62 on OmniDocBench V1.5, ranking #1 overall, and delivers state-of-the-art results across major document understanding benchmarks, including formula recognition, table recognition, and information extraction.
-
Optimized for Real-World Scenarios: Designed and optimized for practical business use cases, maintaining robust performance on complex tables, code-heavy documents, seals, and other challenging real-world layouts.
-
Efficient Inference: With only 0.9B parameters, GLM-OCR supports deployment via vLLM, SGLang, and Ollama, significantly reducing inference latency and compute cost, making it ideal for high-concurrency services and edge deployments.
-
Easy to Use: Fully open-sourced and equipped with a comprehensive SDK and inference toolchain, offering simple installation, one-line invocation, and smooth integration into existing production pipelines.
Performance
- Document Parsing & Information Extraction
- Real-World Scenarios Performance
- Speed Test
For speed, we compared different OCR methods under identical hardware and testing conditions (single replica, single concurrency), evaluating their performance in parsing and exporting Markdown files from both image and PDF inputs. Results show GLM-OCR achieves a throughput of 1.86 pages/second for PDF documents and 0.67 images/second for images, significantly outperforming comparable models.
Usage
Official SDK
For document parsing tasks, we strongly recommend using our official SDK. Compared with model-only inference, the SDK integrates PP-DocLayoutV3 and provides a complete, easy-to-use pipeline for document parsing, including layout analysis and structured output generation. This significantly reduces the engineering overhead required to build end-to-end document intelligence systems.
Note that the SDK is currently designed for document parsing tasks only. For information extraction tasks, please refer to the following section and run inference directly with the model.
Serve GLM-OCR Locally
GLM-OCR supports deployment with the following frameworks. Feel free to try them out:
- SGLang — see cookbook
- vLLM — see recipes
- Transformers — see transformers docs
Prompt Limited
GLM-OCR currently supports two types of prompt scenarios:
- Document Parsing – extract raw content from documents. Supported tasks include:
{
"text": "Text Recognition:",
"formula": "Formula Recognition:",
"table": "Table Recognition:"
}
- Information Extraction – extract structured information from documents. Prompts must follow a strict JSON schema. For example, to extract personal ID information:
请按下列JSON格式输出图中信息:
{
"id_number": "",
"last_name": "",
"first_name": "",
"date_of_birth": "",
"address": {
"street": "",
"city": "",
"state": "",
"zip_code": ""
},
"dates": {
"issue_date": "",
"expiration_date": ""
},
"sex": ""
}
Note: When using information extraction, the output must strictly adhere to the defined JSON schema to ensure downstream processing compatibility.
Acknowledgement
This project is inspired by the excellent work of the following projects and communities:
License
The GLM-OCR model is released under the MIT License.
The complete OCR pipeline integrates PP-DocLayoutV3 for document layout analysis, which is licensed under the Apache License 2.0. Users should comply with both licenses when using this project.
Citation
If you find GLM-OCR useful in your research, please cite our technical report:
@misc{duan2026glmocrtechnicalreport,
title={GLM-OCR Technical Report},
author={Shuaiqi Duan and Yadong Xue and Weihan Wang and Zhe Su and Huan Liu and Sheng Yang and Guobing Gan and Guo Wang and Zihan Wang and Shengdong Yan and Dexin Jin and Yuxuan Zhang and Guohong Wen and Yanfeng Wang and Yutao Zhang and Xiaohan Zhang and Wenyi Hong and Yukuo Cen and Da Yin and Bin Chen and Wenmeng Yu and Xiaotao Gu and Jie Tang},
year={2026},
eprint={2603.10910},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.10910},
}
Configuration
- Architecture
- GlmOcrForConditionalGeneration
- Context length (tokens)
- 131,072
- Layers
- 16
- Hidden size
- 1,536
- Feed-forward size
- 4,608
- Attention heads
- 16
- Key/value heads
- 8
- Head dimension
- 128
- Vocabulary size
- 59,392
- Model type
- glm_ocr
Identity and Version
- Repository
- manny-the-one/GLM-OCR
- Publisher
- Manny
- Task
- Image to text
- Modality
- Image and text
- Library
- transformers
- Parameters
- 1.3B parameters
- Languages
- zh, en, fr, es, ru, de, ja, ko
- Revision
- d4b8f0564c29287824bdedcb2539de5e495a586b
- First published
- 2026-09-26
- Last updated
- 2026-09-26
Files and Weights
12 files, 2.7 GB in total. The weights are 1 file totalling 2.7 GB in safetensors.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| model.safetensors | Weights | 2.7 GB | a16eb0de98d1 |
| .eval_results/mdpbench.yaml | Configuration | 4.8 KB | — |
| .eval_results/olmocrbench.yaml | Configuration | 1.8 KB | — |
| config.json | Configuration | 1.7 KB | — |
| generation_config.json | Configuration | 165 B | — |
| preprocessor_config.json | Configuration | 367 B | — |
| processor_config.json | Configuration | 1.3 KB | — |
| README.md | Documentation | 6.8 KB | — |
| chat_template.jinja | Other | 4.6 KB | — |
| .gitattributes | Repository | 1.5 KB | — |
| tokenizer.json | Tokenizer | 6.8 MB | — |
| tokenizer_config.json | Tokenizer | 1.1 KB | — |
License and Download
- License
- mit
- Access
- Open weights, no gate
- Download size
- 2.7 GB
Released by Manny through its official repository on Hugging Face. Read the license.
Built From
- Described by arXiv:2603.10910
Evaluations
Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.
| Benchmark | Conditions | Result | Reported by | Revision | Date |
|---|---|---|---|---|---|
| Delores-Lin/MDPBench | Task arMetric arComparison conditions not established | 21.7 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task deMetric deComparison conditions not established | 82.7 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task digitalMetric digitalComparison conditions not established | 77.9 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task enMetric enComparison conditions not established | 84.5 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task esMetric esComparison conditions not established | 75.8 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task frMetric frComparison conditions not established | 76.2 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task hiMetric hiComparison conditions not established | 39.6 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task idMetric idComparison conditions not established | 79.7 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task itMetric itComparison conditions not established | 82.8 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task jpMetric jpComparison conditions not established | 65.5 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task koMetric koComparison conditions not established | 61.2 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task latinMetric latinComparison conditions not established | 78.7 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task nlMetric nlComparison conditions not established | 80.2 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task non_latinMetric non_latinComparison conditions not established | 54.3 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task overallMetric overallComparison conditions not established | 67.3 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task photographedMetric photographedComparison conditions not established | 63.7 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task ptMetric ptComparison conditions not established | 77.4 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task ruMetric ruComparison conditions not established | 64.2 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task thMetric thComparison conditions not established | 27.4 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task viMetric viComparison conditions not established | 69.2 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task zhMetric zhComparison conditions not established | 78.5 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| Delores-Lin/MDPBench | Task zh_tMetric zh_tComparison conditions not established | 76.7 | MDPBench leaderboard Reported by a third party |
Evaluated revision not stated | 2026-04-14 |
| allenai/olmOCR-bench | Task arxiv_mathMetric arxiv_mathComparison conditions not established | 80.7 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task baselineMetric baselineComparison conditions not established | 98.8 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task headers_footersMetric headers_footersComparison conditions not established | 95.8 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task long_tiny_textMetric long_tiny_textComparison conditions not established | 86.9 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task multi_columnMetric multi_columnComparison conditions not established | 76.7 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task old_scansMetric old_scansComparison conditions not established | 37.6 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task old_scans_mathMetric old_scans_mathComparison conditions not established | 68.3 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task overallMetric overallSetup Excluding Headers & Footers category. Using ZAI API.Comparison conditions not established | 75.2 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
| allenai/olmOCR-bench | Task table_testsMetric table_testsComparison conditions not established | 77.6 | GLM-OCR API evaluation Reported by a third party |
Evaluated revision not stated | 2026-09-26 |
Memory Requirements
| Precision | Weights in memory |
|---|---|
| As published | 2.7 GB |
| 16-bit | 2.7 GB |
| 8-bit | 1.3 GB |
| 4-bit | 0.7 GB |
Weights only, from the published parameter count; the key-value cache and runtime add to this.
Questions About GLM-OCR
How much GPU memory does GLM-OCR need?
About 3.2 GB at 16-bit and 0.8 GB at 4-bit: the weights (1.3B parameters) plus a working margin. A long context needs more.
What is the cheapest GPU to run GLM-OCR on?
At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.
Can I use GLM-OCR commercially?
Yes. GLM-OCR is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.
What is GLM-OCR's context length?
131,072 tokens, from the maximum position embeddings in its published configuration.
Similar Models
Join our WeChat and Discord community Use GLM-OCR's API GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder–decoder architecture. It introduces Multi-Token Prediction (MTP) loss and stable full-task reinforcement learning to improve training efficiency, recognition accuracy, and generalization. The model integrates the CogViT visual encoder pre-trained on large-scale image–text data, a lightweight cross-modal connector with efficient token downsampling, and a GLM-0.5B language decoder. Combined with a two-stage pipeline of layout analysis and parallel recognition based on PP-DocLayout-V3, GLM-OCR delivers robust and high-quality OCR performance…
Full BF16 version of the model. We recommend this variant for inference and further fine-tuning. LightOnOCR-1B is a compact, end-to-end vision–language model for Optical Character Recognition (OCR) and document understanding. It achieves state-of-the-art accuracy in its weight class while being several times faster and cheaper than larger general-purpose VLMs. Highlights LightOnOCR combines a Vision Transformer encoder(Pixtral-based) with a lightweight text decoder(Qwen3-based) distilled from high-quality open VLMs. It is optimized for document parsing tasks, producing accurate, layout-aware text extraction from high-resolution pages. All benchmarks evaluated using vLLM on the Olmo-Bench.…
This model was converted to MLX format from zai-org/GLM-OCR using mlx-vlm version 0.3.10. Refer to the original model card for more details on the model.
This Hub repository contains a HuggingFace's transformers implementation of the original Kosmos-2 model from Microsoft. Use the code below to get started with the model. This model is capable of performing different tasks through changing the prompts. First, let's define a function to run a prompt. Here are the tasks Kosmos-2 could perform: Once you have the entities, you can use the following helper function to draw their bounding bboxes on the image
TrOCR model fine-tuned on the SROIE dataset. It was introduced in the paper TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models by Li et al. and first released in this repository. Disclaimer: The team releasing TrOCR did not write a model card for this model so this model card has been written by the Hugging Face team. The TrOCR model is an encoder-decoder model, consisting of an image Transformer as encoder, and a text Transformer as decoder. The image encoder was initialized from the weights of BEiT, while the text decoder was initialized from the weights of RoBERTa. Images are presented to the model as a sequence of fixed-size patches (resolution 16x16), which…
