Document parsing with GLM-OCR and OpenVINO
GLM-OCR is a compact 0.9B-parameter OCR vision-language model released by Zhipu AI. It combines a CogViT-derived vision encoder with a GLM-4.5-style text decoder and is specialised for three document-parsing tasks: Text Recognition, Formula Recognition
Content
Document parsing with GLM-OCR and OpenVINO
GLM-OCR is a compact 0.9B-parameter OCR vision-language model released by Zhipu AI. It combines a CogViT-derived vision encoder with a GLM-4.5-style text decoder and is specialised for three document-parsing tasks: Text Recognition, Formula Recognition, and Table Recognition. On OmniDocBench v1.5 it reaches 94.62 points, making it competitive with much larger commercial OCR systems.
You can find more information in the model card.
In this tutorial we convert GLM-OCR to the OpenVINO Intermediate Representation, compress it to 4-bit weights with NNCF, and run inference on Intel CPU / integrated GPU / Arc GPU through optimum-intel. A Gradio demo mirroring the official GLM-OCR-Demo Space is provided, plus an optional PP-DocLayout-V3 pipeline that detects document regions and dispatches them to GLM-OCR with the matching prompt.
Notebook contents
The tutorial consists of the following steps:
- Install requirements
- Convert and Optimize model (FP16 or INT4 weights)
- Select inference device (CPU / GPU / AUTO)
- Run GLM-OCR on a sample image (Text / Formula / Table prompts)
- Optional: PP-DocLayout-V3 + GLM-OCR document-parsing pipeline
- Launch Interactive Gradio demo
Installation instructions
This is a self-contained example that relies solely on its own code.</br> We recommend running the notebook in a virtual environment. You only need a Jupyter server to start. For details, please refer to the [Installation Guide](../../README.md).
⚠️ EXPERIMENTAL NOTEBOOK
This notebook demonstrates a model that has not been fully validated with OpenVINO and is using a custom branch of optimum-intel. It may be fully supported and validated in the future.
Source and license
- Source
- Intel OpenVINO Notebooks
- Original
- openvinotoolkit/openvino_notebooks/notebooks/glm-ocr
- License
- Apache-2.0