PaddleOCR-VL-1.6 for MLX (OhMyShot model pack)

PaddlePaddle's PaddleOCR-VL-1.6, a 0.9B vision-language model that reads text, tables, formulas, and charts in a picture, on MLX with 8-bit weights, and PP-DocLayoutV3, which finds the tables and charts, as Core ML, for OhMyShot, a screenshot app for macOS, which downloads them as a model pack: the text it recognizes then holds the tables and charts in a picture a row a line, cells apart by tabs, and its Recognized Text window shows them as tables. The weights are PaddlePaddle's, quantized; see LICENSE.txt for the license and what was changed. While it reads, the reading process peaks near 2.6 GB of memory.

File What it is
config.json The model's configuration, as mlx-vlm writes it (paddleocr_vl; quantization: 8 bits, groups of 64).
model.safetensors The weights, as mlx-vlm names them (visual.*, language_model.*); a module with .scales and .biases beside its .weight is quantized.
vocabulary.json The tokens by id, a JSON array of strings: โ– is a space, <0xHH> a byte of UTF-8 text.
prompts.json Each task's prompt around the picture's tokens, as ids: {"table": {"before": [โ€ฆ], "after": [โ€ฆ]}, โ€ฆ}; the picture's tokens (id 100295) go between, one for each 2 ร— 2 patches of 14 pixels.
layout.mlpackage PP-DocLayoutV3: input pixel_values, 1 ร— 3 ร— 800 ร— 800 (value / 255); outputs logits, 1 ร— 300 ร— 25, and boxes, 1 ร— 300 ร— 4. Class 21 is a table, 3 a chart.
layout.json The layout model's input, the classes read, and the threshold (0.5).
LICENSE.txt Apache License 2.0, with what was changed.

A table reads as OTSL (<fcel> a cell, <ecel> an empty one, <lcel>/<ucel>/<xcel> merged, <nl> a row's end), a chart as rows with cells apart by |. Pictures are scaled with PIL's bicubic filter to whole 28-pixel blocks between 112,896 and 1,003,520 pixels; decoding is greedy and ends at token 2.

Made with Tools/model-packs/vlm_pack.py from these upstream revisions:

Checked with OhMyShot's Swift reader (Packages/OhMyShotVLM), whose tokens match mlx-vlm's on the pictures compared: text in the OhMyShot benchmark's 40 pictures read with "OCR:", content character error rate 3.97%; 10 screen-style tables read with "Table Recognition:", 261 of 261 cells right, 10 of 10 in the right shape.

Downloads last month
115
Safetensors
Model size
0.9B params
Tensor type
U32
ยท
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for MoraxCheng/ohmyshot-paddleocr-vl-1.6-mlx

Quantized
(9)
this model