GLM-OCR — document OCR model

★ 7.5K

GLM-OCR is an open-source multimodal OCR model for complex documents, built on the GLM-V architecture: a CogViT visual encoder, a lightweight cross-modal connector and a GLM-0.5B language decoder, about 0.9B parameters in total. Reach for it when you need text and structure from PDFs and scans with dense tables, formulas, seals or code, when ordinary OCR loses page layout, or when recognition must sit inside a high-concurrency, low-latency service. It works in two stages, layout analysis with PP-DocLayout-V3 followed by parallel region recognition; the authors report 94.62 on OmniDocBench V1.5. Install with pip install glmocr. You can call the hosted Zhipu MaaS API (no GPU needed), self-host with vLLM or SGLang, run it through Ollama or mlx-vlm on Apple Silicon, use the agent-friendly Skill mode from the CLI or Python, or set up an SDK server with a GPU-less client. BF16 weights are on Hugging Face and ModelScope, and a LLaMA-Factory fine-tuning guide is provided. Output is Markdown and JSON with layout details. Self-hosting needs a GPU with enough memory; this is a recognition tool, not an image generator.