Instructions to use AIArchiveInfo/GLM-OCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AIArchiveInfo/GLM-OCR with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="AIArchiveInfo/GLM-OCR") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("AIArchiveInfo/GLM-OCR") model = AutoModelForMultimodalLM.from_pretrained("AIArchiveInfo/GLM-OCR", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
Download .eval_results/mdpbench.yaml from AIArchiveInfo/GLM-OCR: direct link, hf CLI and curl.
- Browser
- Download file 4.78 kB
-
https://huggingface.co/AIArchiveInfo/GLM-OCR/resolve/main/.eval_results/mdpbench.yaml
- Command line
-
hf download hf://AIArchiveInfo/GLM-OCR/.eval_results/mdpbench.yaml
-
curl -L -o mdpbench.yaml https://huggingface.co/AIArchiveInfo/GLM-OCR/resolve/main/.eval_results/mdpbench.yaml
4.78 kB
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: overall | |
| value: 67.3 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: digital | |
| value: 77.9 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: photographed | |
| value: 63.7 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: latin | |
| value: 78.7 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: de | |
| value: 82.7 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: en | |
| value: 84.5 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: es | |
| value: 75.8 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: fr | |
| value: 76.2 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: id | |
| value: 79.7 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: it | |
| value: 82.8 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: nl | |
| value: 80.2 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: pt | |
| value: 77.4 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: vi | |
| value: 69.2 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: non_latin | |
| value: 54.3 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: ar | |
| value: 21.7 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: hi | |
| value: 39.6 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: jp | |
| value: 65.5 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: ko | |
| value: 61.2 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: ru | |
| value: 64.2 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: th | |
| value: 27.4 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: zh | |
| value: 78.5 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |
| - dataset: | |
| id: Delores-Lin/MDPBench | |
| task_id: zh_t | |
| value: 76.7 | |
| date: "2026-04-14" | |
| source: | |
| url: https://huggingface.co/datasets/Delores-Lin/MDPBench | |
| name: MDPBench leaderboard | |
| user: Delores-Lin | |