zk0hf/lfm2-vl-450m-receipt-ocr-mlx-4bit
lfm2-vl-450m-receipt-ocr-mlx-4bit
MLX conversion of a LoRA fine-tune of `LiquidAI/LFM2-VL-450M` for structured receipt extraction.
Scope
Trained on CORD-v2 (Indonesian receipts) as a pipeline proof-of-concept. It is not trained on Japanese receipts and does not follow a Japanese-receipt schema. Measured behaviour on a Japanese receipt: it emits well-formed CORD-shaped JSON with content that is not on the page.
Prompt
Use the instruction it was trained against — asking for JSON with menu (a list of {nm, cnt, price}), sub_total, and total. Its chat template renders no system turn, so adding an unrelated system message degrades it.
Conversion
mlx_vlm.convert -q --q-bits 4 with mlx-vlm 0.6.8. Note that --q-bits 4 does not quantize every module: the result is 6.96 effective bits/weight, 397 MB total. model_type is lfm2_vl.
Measured
Local mlx_vlm.generate on Apple silicon: 0.576 GB peak memory, ~420 tokens/s.
This repo is public so it can be fetched without a token.
