Unlimited-OCR-2 — 4-bit MLX

A 4-bit MLX quantization of baidu/Unlimited-OCR-2, Baidu ERNIE's OCR / document-parsing vision-language model.

  • Size: ~1.9 GB (from ~6.4 GB bf16).
  • Quantization: affine, 4-bit, group size 64. Experts quantized; the SAM vision branch kept in bf16 (quantized_sam=false). See quantization.json for the exact per-tensor layout.
  • Runs on: Apple Silicon via MLX.

Architecture note

Unlimited-OCR-2 uses a custom architecture (page2d two-axis RoPE, DASH block-sparse attention, stacked quantized MoE experts, a SAM+CLIP vision front end). It is not loadable by generic mlx-vlm / transformers auto classes. A native MLX-Swift decoder for it ships in MlxOCRKit and is numerically aligned with the Python/MLX reference.

Usage — Swift (MlxOCRKit)

minerukit uocr2 --model ./Unlimited-OCR-2-4bit-mlx --image page.png \
  --prompt "Multi page parsing." --max-tokens 512

Output follows the model's block protocol (<PAGE><BLOCK>type[x0, y0, x1, y1]<FORK> ...).

License & attribution

MIT, inherited from the base model. This repo only re-quantizes the weights to 4-bit MLX; all model credit goes to the original authors (Baidu). See the original model card.

Downloads last month
-
Safetensors
Model size
0.6B params
Tensor type
U32
·
BF16
·
I64
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for playstonex/Unlimited-OCR-2-4bit-mlx

Finetuned
(5)
this model