Z.ai GLM-OCR

GLM-OCR (ocr.z.ai, developed by Z.ai / Zhipu AI) is an open-source, lightweight 0.9B parameter vision-language OCR model and browser-based document understanding tool. Engineered specifically for complex and noisy real-world documents, it pairs a CogViT visual encoder with a GLM-0.5B language decoder to extract and structure multilingual text, LaTeX formulas, multi-column layouts, complex financial tables, stamps/seals, and handwritten notes into clean Markdown with high throughput and edge-friendly resource efficiency.

Traditional OCR solutions and general-purpose multimodal LLMs often struggle with dense tables, mixed-language documents, nested mathematical expressions, and high token costs. GLM-OCR tackles this through a specialized, compact encoder-decoder pipeline that delivers state-of-the-art benchmark accuracy on document parsing while operating at a fraction of the compute overhead required by standard vision models.

Technical Architecture & Model Profile at a Glance

Feature / Dimension GLM-OCR Technical Specification Core Capability Advantage
Model Size 0.9 Billion Parameters (~0.9B) Extremely lightweight; low VRAM footprint suitable for edge and CPU/single-GPU serving.
Architecture Stack CogViT Encoder + GLM-0.5B Decoder Efficient cross-modal projection and token downsampling for fast sequence decoding.
Document Layout Engine Two-stage pipeline (PP-DocLayout-V3) Pre-segments document regions (tables, figures, text) for parallel recognition.
Formula & Math Parsing LaTeX / MathML Reconstruction High-precision academic paper equation and symbol rendering (96.5 on UniMERNet).
Table & Form Extraction Structured Markdown / HTML / JSON Tables Resolves merged cells, financial spreadsheets, invoices, and nested borders.
Language Coverage 100+ Global Languages & Code-Mixed Text Robust recognition across Latin, CJK (Chinese, Japanese, Korean), and Cyrillic scripts.
Ecosystem Deployment Web UI (ocr.z.ai), Hugging Face, vLLM, SGLang Available as a free browser service, open-weight checkpoint, and API.

Key Capabilities and Practical Workflows

  • End-to-End Document-to-Markdown Conversion: Converts scanned PDFs, book pages, research papers, and slide decks directly into semantically formatted Markdown, retaining headings, bullet points, table layouts, and inline LaTeX equations.

  • Robust Handling of Noisy Real-World Media: Excels at parsing low-resolution scans, distorted camera captures, official red seals/stamps, code snippets, and handwritten margin notes that frequently break traditional OCR heuristics.

  • High-Throughput, Low-Latency Processing: Processes full-page documents and complex PDFs at high frame rates with streaming output, making it suitable for high-volume enterprise ingestion and RAG (Retrieval-Augmented Generation) document indexing pipelines.

  • Open-Source Flexibility: In addition to the interactive web demo on ocr.z.ai, model weights are openly accessible on Hugging Face (zai-org/GLM-OCR) for self-hosting with Transformers, Ollama, and optimized inference engines.