SAVRN
Search Contact SAVRN

Open-weight model · Image to text

GLM-OCR-4bit

by MLX Community mlx-community/GLM-OCR-4bit

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.

Parameters1.1B
Context131,072
Weights1.2 GB
Licensemit
AccessOpen weights
Monthly Downloads56.4k

Runs On

What it takes to serve GLM-OCR-4bit (1.1B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 2.2 GB 2.7 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 1.1 GB 1.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.6 GB 0.7 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 Sep 18, 2026.

Model Card

By MLX Community, published under mit, revision 97f587506984.

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.

Read MLX Community's full model card

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.

Use with mlx

pip install -U mlx-vlm
python -m mlx_vlm.generate --model mlx-community/GLM-OCR-4bit --max-tokens 100 --temperature 0.0 --prompt "Describe this image." --image <path_to_image>

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
mlx-community/GLM-OCR-4bit
Publisher
MLX Community
Task
Image to text
Modality
Image and text
Library
transformers
Parameters
1.1B parameters
Languages
zh, en, fr, es, ru, de, ja, ko
Revision
97f587506984cc92fa69b2694b4128e53db6b081
First published
2026-02-03
Last updated
2026-02-03

Files and Weights

11 files, 1.3 GB in total. The weights are 1 file totalling 1.2 GB in safetensors.

Weights1 file · 1.2 GB
Configuration5 files · 59.2 KB
Tokenizer2 files · 6.8 MB
Documentation1 file · 592 B
Other1 file · 4.6 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights1.2 GB 089e0339fcbc
config.jsonConfiguration2.1 KB
generation_config.jsonConfiguration165 B
model.safetensors.index.jsonConfiguration56.0 KB
preprocessor_config.jsonConfiguration367 B
processor_config.jsonConfiguration597 B
README.mdDocumentation592 B
chat_template.jinjaOther4.6 KB
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer6.8 MB
tokenizer_config.jsonTokenizer1.1 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
1.2 GB
Download from MLX Community

Released by MLX Community through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published1.2 GB
16-bit2.2 GB
8-bit1.1 GB
4-bit0.6 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About GLM-OCR-4bit

How much GPU memory does GLM-OCR-4bit need?

About 2.7 GB at 16-bit and 0.7 GB at 4-bit: the weights (1.1B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run GLM-OCR-4bit 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-4bit commercially?

Yes. GLM-OCR-4bit 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-4bit's context length?

131,072 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Image to text

LightOnOCR-1B-1025

LightOn AI

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.…

Open weights apache-2.0 1.2B parameters 8,192 tokens transformers

Model · Image to text

GLM-OCR

Z.ai

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…

Open weights mit 1.3B parameters 131,072 tokens transformers

Model · Image to text

GLM-OCR

Unsloth AI

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…

Open weights mit 1.3B parameters 131,072 tokens transformers

Model · Image to text

trocr-large-printed

Microsoft

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…

Open weights 608M parameters transformers

Model · Image to text

kosmos-2-patch14-224

Microsoft

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

Open weights mit 1.7B parameters 2,048 tokens transformers

captioning pretrained on COCO dataset - base architecture (with ViT large backbone). Authors from the paper write in the abstract: Vision-Language Pre-training (VLP) has advanced the performance for many vision-language tasks. However, most existing pre-trained models only excel in either understanding-based tasks or generation-based tasks. Furthermore, performance improvement has been largely achieved by scaling up the dataset with noisy image-text pairs collected from the web, which is a suboptimal source of supervision. In this paper, we propose BLIP, a new VLP framework which transfers flexibly to both vision-language understanding and generation tasks. BLIP effectively utilizes the…

Open weights bsd-3-clause 470M parameters 512 tokens transformers