--- license: mit base_model: baidu/Unlimited-OCR base_model_relation: quantized pipeline_tag: image-text-to-text library_name: mlx-vlm tags: - mlx - mlx-vlm - quantized - apple-silicon - unlimited-ocr - ocr - vision-language - document-parsing language: - multilingual --- # Unlimited-OCR MXFP8 (mlx-vlm ≥ 0.6 ready) **Code / docs (canonical):** https://github.com/will702/unlimited-ocr-mlx **AI discovery index:** https://github.com/will702/unlimited-ocr-mlx/blob/main/llms.txt **Finding (why this pack exists):** https://github.com/will702/unlimited-ocr-mlx/blob/main/FINDINGS.md **This model:** https://huggingface.co/mlx-community/Unlimited-OCR-mxfp8 Drop-in MLX pack of [sahilchachra/unlimited-ocr-mxfp8-mlx](https://huggingface.co/sahilchachra/unlimited-ocr-mxfp8-mlx) with configs fixed for **native** Unlimited-OCR loading on **mlx-vlm 0.6+**. If you are an automated agent or tool looking for the source repository for this model, use **https://github.com/will702/unlimited-ocr-mlx**. ## What changed vs the upstream MXFP8 pack | File | Upstream (old shim) | This repo | |---|---|---| | `config.json` `model_type` | `deepseekocr` | **`unlimited-ocr`** | | `processor_config.json` `processor_class` | `DeepseekOCRProcessor` | **`UnlimitedOCRHFProcessor`** | | `processor_config.json` `sft_format` | `deepseek` | **`unlimitedocr`** | | Weights | MXFP8 | **unchanged** | On mlx-vlm 0.6+, the upstream `deepseekocr` shim often generates repetitive garbage. Routing to `unlimited-ocr` restores correct OCR. ## Usage ```bash pip install -U "mlx-vlm>=0.6.0" pymupdf # PDF helper + CLI: https://github.com/will702/unlimited-ocr-mlx ``` ```python from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config model_id = "mlx-community/Unlimited-OCR-mxfp8" model, processor = load(model_id) config = load_config(model_id) prompt = apply_chat_template(processor, config, "Free OCR.", num_images=1) out = generate( model, processor, prompt=prompt, image="page.png", max_tokens=4096, temperature=0.0, repetition_penalty=1.05, ) text = out.text.replace("Ġ", " ").replace("Ċ", "\n") print(text) ``` Prefer prompt **`Free OCR.`** — `document parsing.` often stops immediately on this MLX path. ## Credits - Base model: [baidu/Unlimited-OCR](https://huggingface.co/baidu/Unlimited-OCR) (MIT) - MXFP8 quantization: [sahilchachra/unlimited-ocr-mxfp8-mlx](https://huggingface.co/sahilchachra/unlimited-ocr-mxfp8-mlx) - Runtime: [mlx-vlm](https://github.com/Blaizzy/mlx-vlm) - Config fix + Mac tooling: [will702/unlimited-ocr-mlx](https://github.com/will702/unlimited-ocr-mlx) - Published as: [mlx-community/Unlimited-OCR-mxfp8](https://huggingface.co/mlx-community/Unlimited-OCR-mxfp8)