Roboflow
Z.ai

Z.ai: GLM-OCR

GLM-OCR Overview

GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder-decoder architecture by Zhipu AI. The model combines a 0.4B-parameter CogViT visual encoder pre-trained on large-scale image-text data, a lightweight cross-modal connector with efficient token downsampling, and a 0.5B-parameter GLM language decoder, totaling 0.9B parameters. To address the inefficiency of standard autoregressive decoding in deterministic OCR tasks, GLM-OCR introduces a Multi-Token Prediction (MTP) mechanism that predicts multiple tokens per step, significantly improving decoding throughput while keeping memory overhead low through shared parameters. Training proceeds through four stages: visual encoder pretraining with MIM, CLIP, and distillation objectives; vision-language pretraining on document parsing, grounding, and VQA data; supervised fine-tuning on curated OCR datasets covering text, formula, table, and key information extraction; and full-task reinforcement learning to improve accuracy and structural consistency.

At the system level, GLM-OCR adopts a two-stage pipeline in which PP-DocLayout-V3 first performs layout analysis, followed by parallel region-level recognition. This design enables robust handling of diverse document layouts including tables, formulas, and multi-column text. The model supports document parsing and targeted recognition tasks, producing structured outputs in Markdown, JSON, and LaTeX formats across more than 100 languages. On the OmniDocBench V1.5 benchmark, GLM-OCR scores 94.62, and achieves 94.0 on OCRBench and 96.5 on UniMERNet for formula recognition.

GLM-OCR Interactive Demo

GLM-OCR Details & Performance

Details

Resources

Vision Tasks

OCRDocument Question AnsweringVisual Question AnsweringVision LanguageChart Question Answering

Features

Multimodal VisionLLMs with Vision Capabilities

Usage

Past 30 Days

Performance

Avg. Latency

Arena Rankings

GLM-OCR Vision Evals

GLM-OCR has not yet been evaluated on the current benchmark. The results below are from the legacy version of Vision Evals, our previous benchmark. See the current Vision Evals

HighestLowest
This model#8 of 5887.34% pass rate · better than 84%
Score87.34%pass rate across 229 tasks
Speed1.00savg response per task
Costpricing unavailable
Tokenstokens unavailable
Score key:≥75%40–74%<40%
CategoryPassedScore
Handwritten Math10 / 10
100%
Text Recognition27 / 30
90%
License Plate Recognition27 / 30
90%
Focused Scene OCR87 / 99
87.9%
VQA & Extraction49 / 60
81.7%

Scores based on a single evaluation run · Methodology

View all legacy Vision Evals results →

Price vs. performance

Estimated cost per task vs. OCR score, for this model and others ranked near it. Upper-left is the sweet spot (high quality, low cost). Based on Vision Evals (legacy) results.

10 of 11 models plotted · 1 not yet evaluated

ModelScoreMedian tokensEst. cost / taskCompare
GoogleGemini 3 Flash93.0%1.3K$0.0010Compare
GoogleGemini 3.5 Flash90.4%1.3K$0.0034Compare
GoogleGemini 3.1 Flash-Lite90.0%1.1K$0.0003Compare
GoogleGemini 3.1 Pro89.5%1.1K$0.0024Compare
AnthropicClaude Fable 589.5%782$0.014Compare
Z.aiGLM-OCR(this model)87.3%
AnthropicClaude Opus 4.887.3%670$0.0049Compare
AnthropicClaude Opus 4.786.9%1.1K$0.0069Compare
QwenQwen3.5 27B85.6%273$0.0003Compare
GoogleGemma 4 31B84.7%423$0.0001Compare
AnthropicClaude Sonnet 583.8%725$0.0019Compare

Alternatives to GLM-OCR

Other models worth comparing for similar use cases.

HuggingFace
SmolVLM2
SmolVLM2 is a compact multimodal vision-language model developed by the Hugging Face TB Research team, released in February 2025 under the Apache 2.0 license. It is designed for efficient image and video understanding on resource-constrained hardware, with model variants ranging from 256M to 2.2B parameters. SmolVLM2 processes images, multi-image inputs, and video alongside text queries to generate text outputs for tasks including visual question answering, image captioning, and OCR.SmolVLM2 is designed for on-device and edge deployment, requiring substantially less GPU memory than comparable multimodal models. It supports standard fine-tuning pipelines via the Hugging Face transformers library and quantization through bitsandbytes. SmolVLM2 is suited for applications where a capable vision-language model is needed without full server-scale infrastructure.
Google
PaliGemma 2
PaliGemma 2 is a vision-language model released in December 2024 by Google DeepMind. It pairs the SigLIP-So400m vision encoder with the Gemma 2 language model family, extending the original PaliGemma architecture with stronger language capabilities and a wider set of transfer benchmarks. The model is designed primarily as a fine-tuning base rather than a chat-optimized assistant. Google releases pretrained "PT" checkpoints intended for task-specific adaptation rather than direct out-of-the-box use.PaliGemma 2 accepts an image paired with a text prompt and generates natural language output, supporting image captioning, visual question answering, optical character recognition, document understanding, object detection and segmentation (with appropriate fine-tuning), and a range of specialized vision-language tasks. The model is released at three parameter sizes (3B, 10B, and 28B), built on the Gemma 2 2B, 9B, and 27B language backbones. Each size is available at three input resolutions: 224, 448, and 896 pixels. Alongside the base PT checkpoints, Google released PaliGemma 2 Mix variants that have been tuned on a mixture of downstream tasks to provide stronger out-of-the-box performance for common applications such as OCR and document parsing. PaliGemma 2 is distributed under the Gemma license, a custom license from Google that permits commercial use subject to the terms of the Gemma Prohibited Use Policy.
Azure
Florence-2
Florence-2, introduced by Microsoft Research at CVPR 2024, is an open-source vision-language foundation model designed to unify diverse computer vision tasks within a single sequence-to-sequence framework. Unlike traditional models that specialize in specific tasks, Florence-2 accepts both images and text prompts and outputs text for tasks such as captioning, object detection, segmentation, OCR, and region-based grounding. It comes in two sizes—Florence-2-base (~230M parameters) and Florence-2-large (~770M parameters)—and is trained on FLD-5B, a large dataset of ~126M images with ~5.4B annotations.The model demonstrates strong zero-shot and fine-tuned performance, often rivaling larger vision-language systems while remaining lightweight and efficient. Released under the MIT license, all weights are publicly available, making it accessible for fine-tuning and deployment in applications like VQA, content tagging, accessibility, and research. Florence-2’s compact design, versatility, and openness position it as a practical alternative to larger proprietary multimodal models.
Qwen
Qwen2.5 VL 7B Instruct
Qwen2.5-VL-7B-Instruct is a 7-billion parameter vision-language model from Alibaba’s QwenLM team, released on January 26, 2025 under the Apache 2.0 license. It is the instruction-tuned variant of the 7B scale in the Qwen2.5-VL family, designed to process multimodal inputs such as text, images, charts, documents, and video. The model enables structured outputs—including JSON for structured content and bounding boxes for visual localization. Weights are publicly available on Hugging Face and GitHub, making it suitable for both research and applied multimodal use.
Google
Gemini 2.5 Flash-Lite
Gemini 2.5 Flash-Lite, released for general availability on July 22, 2025, is the most cost-efficient model in the Gemini 2.5 family, designed for high-volume and latency-sensitive tasks. It is multimodal, supporting text, images, video, audio, and PDFs as inputs, with text as its primary output. The model handles up to 1 million input tokens and generates outputs up to 64K tokens, making it suitable for large-scale document or media processing at low cost. It is built on a Sparse Mixture-of-Experts architecture with native multimodal support, though exact parameter counts are undisclosed.Flash-Lite offers the lowest usage cost among Gemini 2.5 models. It introduces developer controls for “thinking mode,” allowing fine-tuning of reasoning depth vs. efficiency. It also integrates native tools such as code execution, search grounding, and URL context. While strong on translation, classification, coding, and general multimodal reasoning, it lacks support for image or audio generation in its stable release and is less capable than Gemini 2.5 Flash or Pro on complex reasoning-heavy workflows.
Moondream 2
Moondream 2 is a small open-source vision-language model from Moondream, the company founded by Vikhyat Korrapati. It was first released in early 2024 and updated through mid-2025. At approximately 1.9 billion parameters, it is designed to run efficiently on consumer hardware such as laptops and edge devices while supporting a practical range of multimodal tasks. Moondream 2 combines a vision encoder based on SigLIP with a compact language backbone, trained for image understanding tasks rather than as a general chat model.The model accepts an image paired with a natural language prompt and produces text responses, supporting visual question answering, image captioning, and image-conditioned dialogue. Later Moondream 2 releases added object localization through a point API that returns coordinates for queried objects, along with improvements to OCR, counting, and document understanding. Moondream 2 is distributed under the Apache 2.0 license and is available through Hugging Face and the maintainer's distribution. Because the model is updated frequently, production deployments should pin to a specific revision rather than tracking the latest release. A successor model, Moondream 3 (Preview), was released in September 2025 with a 9B mixture-of-experts architecture and 2B active parameters, offering substantially stronger visual reasoning than Moondream 2 while retaining the efficiency-focused design. A referring expression segmentation extension to Moondream 3 was released in March 2026.

GLM-OCR License

MIT

License terms and commercial-use guidance for GLM-OCR.

This model is released under the MIT License, a short and permissive open-source license that allows commercial use, modification, and redistribution.

Read the full MIT license ↗

Yes. Under the terms of the MIT license, you can freely use this model for commercial purposes. You must retain the copyright notice and license text when redistributing.

License information is provided as a guide and is not legal advice.

Frequently Asked Questions About GLM-OCR Vision

Yes. GLM-OCR accepts image input, and on Roboflow's previous vision benchmark it scored 87.3% on OCR. You can test it on your own image in the demo above.

GLM-OCR has not yet been evaluated on Roboflow's current Vision Evals. The results on this page are from the previous benchmark.

Yes. The demo on this page runs GLM-OCR in the free Roboflow Playground: upload an image and see results in seconds. A free account unlocks unlimited runs.