Book a demo Start for free

Compare model versions

Model: zai-org/GLM-OCR

Earlier snapshot Snapshot #217 Repository revision ca5d8b3 (opens in a new tab) Recorded at 04 Sep 2026, 13:20 UTC Unchanged through 11 Sep 2026, 05:00 UTC
Later snapshot Snapshot #1023 Repository revision 2e85a62 (opens in a new tab) Recorded at 14 Sep 2026, 04:47 UTC Unchanged through 04 Nov 2026, 06:58 UTC

Summary

Licence

Unchanged

No change

MIT MIT

PinDiff reports the declared licence and licence files. It does not interpret licence terms.

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
Licence tag declared in the model card metadata, observed via the Hugging Face API; licence file hashes from the repository file manifest.

Weights

Unchanged

No change

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
Weight file hashes and sizes from the repository file manifest (Git LFS SHA256 where available). Weight files are not downloaded.

Remote code / configuration

Changed

6 configuration values changed

Remote code No No

config.json Changed

Added: + tie_word_embeddings: false
Removed: - transformers_version: "5.0.1dev0"
Added: + transformers_version: "5.17.0"
Added: + vision_config.attention_dropout: 0
Added: + vision_config.in_channels: 3
Added: + vision_config.rope_parameters.rope_theta: 10000
Added: + vision_config.rope_parameters.rope_type: "axial"

generation_config.json Unchanged

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
Stored config.json and generation_config.json at each revision (trust_remote_code / auto_map), and Python file hashes from the repository file manifest.

Access / gating

Unchanged

No change

Public Public

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
Gated and private flags observed via the Hugging Face API.

Model card

Changed

Model card modified (6 sections)

Metadata (front matter) Changed Material section +3 −0

Diff

⋯ 7 unchanged lines
  - de
  - ja
  - ko
Added: + pipeline_tag: image-to-text
  library_name: transformers
Added: + tags:
Added: + - conversational

Before

license: mit
language:
- zh
- en
- fr
- es
- ru
- de
- ja
- ko
library_name: transformers

After

license: mit
language:
- zh
- en
- fr
- es
- ru
- de
- ja
- ko
pipeline_tag: image-to-text
library_name: transformers
tags:
- conversational
Serve GLM-OCR Locally Added +5 −0

Diff

Added: + GLM-OCR supports deployment with the following frameworks. Feel free to try them out:
Added: +
Added: + - [SGLang](https://github.com/sgl-project/sglang) — see [cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-OCR)
Added: + - [vLLM](https://github.com/vllm-project/vllm) — see [recipes](https://recipes.vllm.ai/zai-org/GLM-OCR)
Added: + - [Transformers](https://github.com/huggingface/transformers) — see [transformers docs](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/glm_ocr.md)

Before

Not present in the earlier snapshot.

After

GLM-OCR supports deployment with the following frameworks. Feel free to try them out:

- [SGLang](https://github.com/sgl-project/sglang) — see [cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-OCR)
- [vLLM](https://github.com/vllm-project/vllm) — see [recipes](https://recipes.vllm.ai/zai-org/GLM-OCR)
- [Transformers](https://github.com/huggingface/transformers) — see [transformers docs](https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/glm_ocr.md)
vLLM Removed +0 −17

Diff

Removed: - 1. run
Removed: -
Removed: - ```bash
Removed: - pip install -U vllm --extra-index-url https://wheels.vllm.ai/nightly
Removed: - ```
Removed: -
Removed: - or using docker with:
Removed: - ```
Removed: - docker pull vllm/vllm-openai:nightly
Removed: - ```
Removed: -
Removed: - 2. run with:
Removed: -
Removed: - ```bash
Removed: - pip install git+https://github.com/huggingface/transformers.git
Removed: - vllm serve zai-org/GLM-OCR --allowed-local-media-path / --port 8080
Removed: - ```

Before

1. run 

```bash
pip install -U vllm --extra-index-url https://wheels.vllm.ai/nightly
```

or using docker with:
```
docker pull vllm/vllm-openai:nightly
```

2. run with:

```bash
pip install git+https://github.com/huggingface/transformers.git
vllm serve zai-org/GLM-OCR  --allowed-local-media-path /  --port 8080
```

After

Not present in the later snapshot.

SGLang Removed +0 −18

Diff

Removed: - 1. using docker with:
Removed: -
Removed: - ```bash
Removed: - docker pull lmsysorg/sglang:dev
Removed: - ```
Removed: -
Removed: - or build it from source with:
Removed: -
Removed: - ```bash
Removed: - pip install git+https://github.com/sgl-project/sglang.git#subdirectory=python
Removed: - ```
Removed: -
Removed: - 2. run with:
Removed: -
Removed: - ```bash
Removed: - pip install git+https://github.com/huggingface/transformers.git
Removed: - python -m sglang.launch_server --model zai-org/GLM-OCR --port 8080
Removed: - ```

Before

1. using docker with:

```bash
docker pull lmsysorg/sglang:dev
```

or build it from source with:

```bash
pip install git+https://github.com/sgl-project/sglang.git#subdirectory=python
```

2. run with:

```bash
pip install git+https://github.com/huggingface/transformers.git
python -m sglang.launch_server --model zai-org/GLM-OCR --port 8080
```

After

Not present in the later snapshot.

Ollama Removed +0 −12

Diff

Removed: - 1. Download [Ollama](https://ollama.com/download).
Removed: - 2. run with:
Removed: -
Removed: - ```bash
Removed: - ollama run glm-ocr
Removed: - ```
Removed: -
Removed: - Ollama will automatically use image file path when an image is dragged into the terminal:
Removed: -
Removed: - ```bash
Removed: - ollama run glm-ocr Text Recognition: ./image.png
Removed: - ```

Before

1. Download [Ollama](https://ollama.com/download).
2. run with: 

```bash
ollama run glm-ocr
```

Ollama will automatically use image file path when an image is dragged into the terminal: 

```bash
ollama run glm-ocr Text Recognition: ./image.png
```

After

Not present in the later snapshot.

Transformers Removed +0 −42

Diff

Removed: - ```
Removed: - pip install git+https://github.com/huggingface/transformers.git
Removed: - ```
Removed: -
Removed: - ```python
Removed: - from transformers import AutoProcessor, AutoModelForImageTextToText
Removed: - import torch
Removed: -
Removed: - MODEL_PATH = "zai-org/GLM-OCR"
Removed: - messages = [
Removed: - {
Removed: - "role": "user",
Removed: - "content": [
Removed: - {
Removed: - "type": "image",
Removed: - "url": "test_image.png"
Removed: - },
Removed: - {
Removed: - "type": "text",
Removed: - "text": "Text Recognition:"
Removed: - }
Removed: - ],
Removed: - }
Removed: - ]
Removed: - processor = AutoProcessor.from_pretrained(MODEL_PATH)
Removed: - model = AutoModelForImageTextToText.from_pretrained(
Removed: - pretrained_model_name_or_path=MODEL_PATH,
Removed: - torch_dtype="auto",
Removed: - device_map="auto",
Removed: - )
Removed: - inputs = processor.apply_chat_template(
Removed: - messages,
Removed: - tokenize=True,
Removed: - add_generation_prompt=True,
Removed: - return_dict=True,
Removed: - return_tensors="pt"
Removed: - ).to(model.device)
Removed: - inputs.pop("token_type_ids", None)
Removed: - generated_ids = model.generate(**inputs, max_new_tokens=8192)
Removed: - output_text = processor.decode(generated_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
Removed: - print(output_text)
Removed: - ```

Before

```
pip install git+https://github.com/huggingface/transformers.git
```

```python
from transformers import AutoProcessor, AutoModelForImageTextToText
import torch

MODEL_PATH = "zai-org/GLM-OCR"
messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image",
                "url": "test_image.png"
            },
            {
                "type": "text",
                "text": "Text Recognition:"
            }
        ],
    }
]
processor = AutoProcessor.from_pretrained(MODEL_PATH)
model = AutoModelForImageTextToText.from_pretrained(
    pretrained_model_name_or_path=MODEL_PATH,
    torch_dtype="auto",
    device_map="auto",
)
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_dict=True,
    return_tensors="pt"
).to(model.device)
inputs.pop("token_type_ids", None)
generated_ids = model.generate(**inputs, max_new_tokens=8192)
output_text = processor.decode(generated_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
print(output_text)
```

After

Not present in the later snapshot.

9 other sections unchanged.

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
README.md at each revision, stored by PinDiff. Sections are compared individually.
Stored file SHA256
e8e84b75857428ba5c152b561b5af0e607c991240ecf8dfa31cb616f8a1c61ff → 172334449c3df98650bc9a42781c254c64c9d466b440e2ca8ce31f99829212b2

Repository status

Changed

Repository revision moved

Earlier
Revision ca5d8b3 (opens in a new tab) · 11 files · 2.66 GB
Later
Revision 2e85a62 (opens in a new tab) · 12 files · 2.66 GB

A new revision does not by itself mean files changed; the categories above show what differs.

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
Default-branch head commit observed via the Hugging Face API.

Files

Changed

2 other files changed

1 changed hash 1 added

Other files
FileStatusBeforeAfter
tokenizer_config.json CHANGED Git blob ID 18f2106a5124ac945ee5526ac60fa75e09e97e11 1.1 KB Git blob ID 04b9992511183247d5115f176a5b9f0360a36a1c 1.1 KB (+72 B)
processor_config.json ADDED — Git blob ID 58b03daf067d4e47aa5cd433029c303e032a92c2 1.3 KB

Evidence · Observed by PinDiff

Earlier
Snapshot #217 · revision ca5d8b3 · Recorded at 04 Sep 2026, 13:20 UTC
Later
Snapshot #1023 · revision 2e85a62 · Recorded at 14 Sep 2026, 04:47 UTC
Source
File hashes and sizes from the repository file manifest. Weights, licence, configuration, Python and model card files are covered above.

Evidence observed by PinDiff from the Hugging Face API and stored when recorded. PinDiff compares stored metadata, hashes and text files; it does not download weight files. Change events recorded between these snapshots