Instructions to use majentik/Unlimited-OCR-MLX-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use majentik/Unlimited-OCR-MLX-6bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("majentik/Unlimited-OCR-MLX-6bit") config = load_config("majentik/Unlimited-OCR-MLX-6bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
Unlimited-OCR-MLX-6bit
6-bit MLX quantization of baidu/Unlimited-OCR -- a long-horizon document OCR / parsing model (DeepEncoder vision + DeepSeek-V2 MoE decoder) -- running natively on Apple Silicon via mlx-vlm.
At a glance
| Source | baidu/Unlimited-OCR @ ee63731b6461c8afcdcc7b15352e7d2ffecc2ead |
| Architecture | DeepEncoder (SAM-ViT + CLIP-L) vision + DeepSeek-V2 MoE decoder (12 layers, 64 experts) |
| Format | MLX (Apple Silicon native), loads via mlx-vlm's deepseekocr |
| Quantization | 6-bit, group-size 64 (7.65 bits/weight effective) |
| Disk size | 3.0 GB |
Verification (2026-07-12, M-series Mac)
Converted with mlx-vlm 0.3.9 and document-OCR smoke-tested locally before publishing -- this pack correctly extracts all fields from a test invoice (number, date, bill-to, line item, amount, status) with bounding-box grounding.
Sibling variants
| Variant | Size | Status |
|---|---|---|
| Unlimited-OCR-MLX-8bit | 3.7 GB | public |
| Unlimited-OCR-MLX-6bit | 3.0 GB | public |
| Unlimited-OCR-MLX-4bit | 2.3 GB | private — pending quality review |
Usage
Requires mlx-vlm >= 0.3.9. This repo already carries the small config shim so mlx-vlm routes it through its deepseekocr implementation (upstream model_type: unlimited-ocr -> deepseekocr; processor -> DeepseekVLV2Processor):
from mlx_vlm import load, generate
model, processor = load("majentik/Unlimited-OCR-MLX-6bit")
out = generate(model, processor, "<image>document parsing.", ["page.png"], max_tokens=2048)
print(out)
Prompts follow the upstream convention: <image>document parsing. for single documents; the model emits text with <|det|>...<|/det|> bounding-box grounding.
Intended use
Document OCR, layout parsing, and text extraction (English + Chinese) locally on Apple Silicon. See the base model card for benchmarks and long-horizon / multi-page usage.
Conversion notes
Loadable via mlx-vlm's existing deepseekocr module -- Unlimited-OCR shares the DeepEncoder + DeepSeek-V2 architecture with DeepSeek-OCR. The only changes from upstream are two config fields (model_type, processor_class/sft_format) so the stock loader routes it; the weights are unmodified beyond quantization.
Reproduce
This pack is produced from upstream baidu/Unlimited-OCR with a small config
shim so mlx-vlm routes it through its existing deepseekocr implementation,
then converted with mlx_vlm.convert:
- Patch
config.json:model_type: unlimited-ocr->deepseekocr. - Patch
processor_config.json:processor_class->DeepseekVLV2Processor,sft_format->deepseek. - Convert:
python -m mlx_vlm convert \
--hf-path <patched dir> \
--mlx-path <out> \
-q --q-bits 6 --q-group-size 64
The weights themselves are unmodified beyond quantization; only the two
config fields above are changed so the stock mlx-vlm loader recognizes
the architecture (Unlimited-OCR shares the DeepEncoder + DeepSeek-V2
MoE decoder architecture with DeepSeek-OCR).
License
MIT, inherited from the upstream model.
- Downloads last month
- 21
6-bit
Model tree for majentik/Unlimited-OCR-MLX-6bit
Base model
baidu/Unlimited-OCR