Instructions to use turintech/GLM-OCR-Artemis-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use turintech/GLM-OCR-Artemis-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama cli -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K
Use Docker
docker model run hf.co/turintech/GLM-OCR-Artemis-GGUF:Q2_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use turintech/GLM-OCR-Artemis-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "turintech/GLM-OCR-Artemis-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "turintech/GLM-OCR-Artemis-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/turintech/GLM-OCR-Artemis-GGUF:Q2_K
- Ollama
How to use turintech/GLM-OCR-Artemis-GGUF with Ollama:
ollama run hf.co/turintech/GLM-OCR-Artemis-GGUF:Q2_K
- Unsloth Desktop
- Pi
How to use turintech/GLM-OCR-Artemis-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "turintech/GLM-OCR-Artemis-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use turintech/GLM-OCR-Artemis-GGUF with Docker Model Runner:
docker model run hf.co/turintech/GLM-OCR-Artemis-GGUF:Q2_K
- Lemonade
How to use turintech/GLM-OCR-Artemis-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull turintech/GLM-OCR-Artemis-GGUF:Q2_K
Run and chat with the model
lemonade run user.GLM-OCR-Artemis-GGUF-Q2_K
List all available models
lemonade list
- Hermes Agent
How to use turintech/GLM-OCR-Artemis-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default turintech/GLM-OCR-Artemis-GGUF:Q2_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use turintech/GLM-OCR-Artemis-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf turintech/GLM-OCR-Artemis-GGUF:Q2_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "turintech/GLM-OCR-Artemis-GGUF:Q2_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
TurinTech models, built with Artemis
GLM-OCR for text, formula and table recognition in llama.cpp, compressed with Artemis
| Model file | GPU memory with images | Distance from BF16 (NED) |
|---|---|---|
| 359.7 MB | 3.38 GiB | 0.0264 (mradermacher Q2_K 0.0968) |
Run it
hf download turintech/GLM-OCR-Artemis-GGUF GLM-OCR-Artemis-Q2_K.gguf mmproj-Q8_0.gguf --local-dir .
llama-server -m GLM-OCR-Artemis-Q2_K.gguf --mmproj mmproj-Q8_0.gguf -ngl 99 -c 16384 --image-max-tokens 6144 -n 8192 --port 8080
Ollama: ollama run turintech/glm-ocr-artemis ยท LM Studio: turintech/glm-ocr-artemis
In Ollama and LM Studio, pages larger than about 3.2 megapixels are scaled down to about 4,096 image tokens, because neither lets a package raise the image-token limit, while the numbers on this card were measured at 6,144 with llama-server; in our tests, a 2212 ร 1148 table and a 658 ร 204 example table gave the same answers in both apps as with llama-server. On a 2480 ร 3508 page the scaled-down answer differed from llama-server's: it lost the thousands separators and the table's header markup. With Ollama 0.40.18, starting the server with LLAMA_ARG_IMAGE_MAX_TOKENS=6144 gave llama-server's answer on that page.
Tested with llama.cpp b12110; use that build or newer. A projector is required to read images: the command downloads
and loads mmproj-Q8_0.gguf, the tested default, which every number of this file was measured with. Keep -n 8192:
on 3 of 1,112 tables the file ran on to that limit where BF16 stopped. The prompts are the original's:
Text Recognition:, Formula Recognition: and Table Recognition:.
Request example
IMG=$(base64 -w0 table.png)
printf '{"messages": [{"role": "user", "content": [{"type": "image_url", "image_url": {"url": "data:image/png;base64,%s"} }, {"type": "text", "text": "Table Recognition:"}]}], "temperature": 0, "max_tokens": 8192}' "$IMG" > request.json
curl http://localhost:8080/v1/chat/completions -H 'Content-Type: application/json' --data-binary @request.json
The answer is in choices[0].message.content; tables come back as HTML.
Results
| File | Size | NED to BF16 (macro) | Table runaways (of 1,112) |
|---|---|---|---|
| TurinTech Q2_K | 359.7 MB | 0.0264 | 3 |
| mradermacher Q2_K | 361.4 MB | 0.0968 | 27 |
| mradermacher Q3_K_M | 450.1 MB | 0.0289 | 3 |
| BF16 original | 1785.8 MB | reference | reference |
Lower NED is closer to BF16's answers on 2,012 crops. A table runaway is an answer that ran on to the 8,192-token limit where BF16 stopped by itself; our own release rule allowed at most 2, and this file had 3, so it did not meet that rule. Against mradermacher's Q2_K the paired difference in NED is โ0.0705 [โ0.0767, โ0.0644]. Against mradermacher's Q3_K_M a later look, not preregistered, gave โ0.0025 [โ0.0063, +0.0008], which does not separate the two on closeness to BF16. Sizes are the model files without a projector. This file was measured with the Q8_0 projector, the others with F16. Bold marks the lowest NED and runaway count, ties included, not a significance claim.
The release check scored whole pages against ground truth, with no layout model: of the 1,022 tests on olmOCR-bench's 188 table pages, this file passed 64.5%, mradermacher's Q3_K_M 61.4%, mradermacher's Q2_K 52.6% and BF16 58.7%. Pages with several tables may be answered only in part. This file passed more of the 1,022 tests on the table pages than mradermacher's Q2_K (+11.8 points [+5.5, +18.4]), and the check does not separate it from mradermacher's Q3_K_M (+3.1 [โ1.7, +8.1]). It also scored above BF16, but no comparison with BF16 was preregistered, and this does not show that it reads tables better than the original. Full results, memory and method.
Files
| File | Size | Peak GPU memory | Use it for |
|---|---|---|---|
GLM-OCR-Artemis-Q2_K.gguf |
360 MB | 3.38 GiB | Default, and the only file, Ollama tag q2_k (latest) |
mmproj-Q8_0.gguf |
484 MB | Required to read images: the tested default, with --mmproj |
|
mmproj-F16.gguf |
869 MB | Reads images in place of the Q8_0 projector; not measured with this file |
A projector is required to read images. mmproj-Q8_0.gguf is the tested default: every number of this file was measured with it, and the Run it command downloads it with the model file. mmproj-F16.gguf is the projector BF16 and mradermacher's files were measured with; this file has no numbers with it. Peak GPU memory measured on NVIDIA GeForce RTX 3060 12 GB, llama.cpp cd959bae (b12110), the card's command (-ngl 99 -c 16384 --image-max-tokens 6144 -n 8192 with mmproj-Q8_0.gguf), all layers on the GPU, the llama-server process's own allocation from nvidia-smi every 0.2 s over five requests ending with a test page of 6,154 prompt tokens, 23 November 2026.
Pick this model
- Good for OCR of text, formulas and tables in llama.cpp from a 359.7 MB model file, with answers closer to BF16's than mradermacher's Q2_K: NED 0.0264 against 0.0968, and 3 table runaways of 1,112 against 27. On olmOCR-bench's table pages it passed 64.5% of the tests against 52.6% for that file (whole pages, no layout model; pages with several tables may be answered only in part).
- Pick another file when answers as close as possible to the original's matter more than size: this file ran on to the 8,192-token limit on 3 tables where BF16 stopped, so use the original's weights. mradermacher's Q3_K_M (450.1 MB) had 3 such tables too, on different tables; neither the later look on closeness to BF16 nor the table check separated it from this file.
How it was made
Built with Artemis, TurinTech's optimisation platform. The model file is
a per-tensor mix of standard llama.cpp quant types, built to the size of mradermacher's Q2_K with an importance matrix;
the matrix and the method are not published. Stock llama.cpp runs it. Q2_K is the label of the file it was built to the size of, not its main tensor type: the
results page gives its bits per weight and tensor types. The file keeps the
original's nextn layer, which llama.cpp b12110 skips at load. mmproj-F16.gguf is converted from the original's
weights and mmproj-Q8_0.gguf quantized from them; the Q8_0 projector is the one this file was measured with.
How it was tested
Every file in the Results table ran on one NVIDIA RTX 3060 12 GB with llama.cpp b12110, greedy decoding and an 8,192-token limit, on 2,012 crops the file was not chosen on: 1,112 tables from PubTables-v2, FinTabNet and DocLayNet v1.1, and 600 text boxes and 300 formulas from DocLayNet v1.1, all from test splits. The run was preregistered and ran once. It has no ground truth: each answer is compared with BF16's answer to the same crop, so the numbers measure closeness to BF16, not accuracy. Our own release rule allowed at most 2 table runaways, and this file had 3, so it did not meet that rule; the rule's other conditions held.
A release check then scored whole pages against ground truth: olmOCR-bench's 188 table pages and their 1,022 tests,
each page sent as one image with Table Recognition:, once per file. The pages went in with no layout model, which
the original's own pipeline adds for whole pages, and about 21 of them, by a rough count of captions, have two or
more tables, where the table prompt may answer only the first.
Contains information from olmOCR-bench, which is made available under the ODC Attribution License.
The results page has the method, the full tables and the paired intervals of the confirmation and the release check, the licences of the test sets and the olmOCR-bench notice.
Licence and citation
GLM-OCR is by zai-org and released under the MIT License, as its card states; these files keep that licence. The original's full OCR pipeline adds a separate layout model under Apache-2.0, which these files do not include. Please cite the original:
@misc{duan2026glmocrtechnicalreport,
title={GLM-OCR Technical Report},
author={Shuaiqi Duan and Yadong Xue and Weihan Wang and Zhe Su and Huan Liu and Sheng Yang and Guobing Gan and Guo Wang and Zihan Wang and Shengdong Yan and Dexin Jin and Yuxuan Zhang and Guohong Wen and Yanfeng Wang and Yutao Zhang and Xiaohan Zhang and Wenyi Hong and Yukuo Cen and Da Yin and Bin Chen and Wenmeng Yu and Xiaotao Gu and Jie Tang},
year={2026},
eprint={2603.10910},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2603.10910},
}
File checksums
| File | Bytes | sha256 |
|---|---|---|
GLM-OCR-Artemis-Q2_K.gguf |
359,697,472 | 6dea619c318329ffe82da5b9002742924943fece5240a4fbb91ba830f95c860c |
mmproj-Q8_0.gguf |
484,403,712 | 0063cef878d3f46bf70542c4bc423d85a8b5d9d2d52025d03238bebb0a3f5ef7 |
mmproj-F16.gguf |
869,018,112 | 3467ca0bd6fc294e3143cb1a6bc33edbdd02e6e0ea0e2499fd16c802b72f5029 |
Artemis is TurinTech's optimisation platform: teams use it to make their own models smaller and faster, or to optimise their code.
All our models ยท LinkedIn ยท Questions and requests
MIT, as released by zai-org (licence); see LICENSE and NOTICE. An independent TurinTech release, not affiliated with or endorsed by zai-org. When serving these files to others, for example through an API, an inference provider or OpenRouter, we'd appreciate a mention of TurinTech (turintech.ai) as the source of the quantization.
These files keep improving.
- Downloads last month
- 304
2-bit
Model tree for turintech/GLM-OCR-Artemis-GGUF
Base model
zai-org/GLM-OCR






