#240·GLM-OCR

表脚注/摘要行从 OCR 输出中缺失(源中存在的行在表标记中不存在)

作者: textlastig创建于 2026年8月28日更新于 2026年9月22日
### System Info / 系统信息 - Backend: MLX (mlx_vlm), model mlx-community/GLM-OCR-bf16 - Served via the SDK's own glmocr server (/glmocr/parse), not vLLM - Apple Silicon Mac, macOS - Deterministic decoding configured: temperature: 0.0, top_p: 0.00001, top_k: 1 (per config.yaml) ### Who can help? / 谁可以帮助到您? _No response_ ### Information / 问题信息 - [ ] The official example scripts / 官方的示例脚本 - [x] My own modified scripts and tasks / 我自己修改的脚本和任务 ### Reproduction / 复现过程 We call the model directly the same way as in #96: from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template model, processor = load("mlx-community/GLM-OCR-bf16") prompt = "Table Recognition:" formatted_prompt = apply_chat_template( processor, model.config, prompt, num_images=1) result = generate( model, processor, formatted_prompt, image=["./invoice_table.png"], max_tokens=2048, verbose=True, ) ### Expected behavior / 期待表现 1. Take the attached source image (billing table from a real invoice, anonymized — no name/diagnosis, two rows highlighted in red are the ones missing from the output). 2. Run the code above (or the equivalent /glmocr/parse SDK call) on it. 3. Compare the returned table HTML against the source image — the last two rows ("Summe Honorar EUR: 86,23" and "Rechnungsbetrag EUR: 86,23") are not correctly transcribed. 4. Repeat the same call on the identical input a few times — the failure mode is not consistent (see below). Image Actual Table Recognition: output for this region:
DatumGOÄLeistungAnz.AuslagenFaktorHonorar
13.02.241Beratung (persönlich oder telefon.)12,30010,72
6Untersuchung Organsystem Auge/HNO12,30013,41
1201subj.Refraktion sphär.-zylindr.Gl.12,30011,93
1202objektive Refraktionsbestimmung12,30011,93
1207Prüfung./ Bestimmung von Mehrstärken-o. Prismenbrille12,3009,92
1242Binoc.Unters.d.Augenhintergrundes12,3009,38
1256Applanationstonometrie12,30010,49
12,300
12,300
The 7 line-item rows are recognized correctly. The last two rows are not: instead of the label and amount text visible in the source, the table ends with two near-empty rows containing only a stray 1 and 2,300 copied from the pattern …

内容来源: zai-org/GLM-OCR