55 4 days ago

GLM-OCR compressed with Artemis by TurinTech: a 359.7 MB GGUF and its 484 MB vision projector for text, formula and table recognition, closer to BF16's answers than mradermacher's Q2_K (NED 0.0264 against 0.0968 on 2,012 crops).

vision
ollama run turintech/glm-ocr-artemis

Details

4 days ago

c814cd6c35e2 · 844MB

glm4
·
891M
·
Q2_K
clip
·
434M
·
Q8_0
GLM-OCR is released by zai-org under the MIT License, as its model card states: https://huggingface.
GLM-OCR Artemis GGUF The files in this repository are a modified version of GLM-OCR, developed by za
{ "num_ctx": 16384, "num_predict": 8192, "temperature": 0, "top_k": 1 }

Readme

GLM-OCR Artemis

GLM-OCR for text, formula and table recognition, compressed with Artemis.

  • Model file: 359.7 MB.
  • Distance from BF16 (NED): 0.0264 (mradermacher Q2_K 0.0968).

Run with Ollama

Tags: latest and q2_k are the same package, GLM-OCR-Artemis-Q2_K.gguf with its vision projector mmproj-Q8_0.gguf (844.1 MB download). Put the image’s path after one of the three prompts, Text Recognition:, Formula Recognition: or Table Recognition::

ollama run turintech/glm-ocr-artemis "Table Recognition: ./table.png"

Through the API, send the image in images; the answer is in message.content, and tables come back as HTML:

IMG=$(base64 -w0 table.png)
printf '{"model": "turintech/glm-ocr-artemis", "messages": [{"role": "user", "content": "Table Recognition:", "images": ["%s"]}], "stream": false}' "$IMG" > request.json
curl http://localhost:11434/api/chat --data-binary @request.json

The package sets temperature 0, top_k 1, a 16,384-token context and an 8,192-token answer limit, as in the card’s tests.

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 ran on to the 8,192-token limit where BF16 stopped by itself; this file had 3, one more than our release rule allows. Sizes are the model files without a projector. This file was measured with the Q8_0 projector, the others with F16. How it was tested.

Files

File Size Use it for
GLM-OCR-Artemis-Q2_K.gguf 360 MB Default, and the only model file, Ollama tag q2_k (latest)

Limitations

  • 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 card’s numbers 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.
  • The numbers come from llama.cpp, not from Ollama or LM Studio.

Questions

Ask on Discord.

Licence

MIT, as zai-org’s model card states. The package carries the Hugging Face repository’s LICENSE and NOTICE. This is an independent TurinTech release, not affiliated with or endorsed by zai-org.