Image-to-Text
MLX
mlx-vision
ocr
apple-silicon
speculative-decoding
dspark
deepseek-ocr
glm-ocr
vision-language-model
Instructions to use will702/mlx-vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use will702/mlx-vision with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir mlx-vision will702/mlx-vision
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
| title: mlx-vision | |
| emoji: ποΈ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: static | |
| pinned: false | |
| license: mit | |
| tags: | |
| - mlx | |
| - ocr | |
| - apple-silicon | |
| - speculative-decoding | |
| - dspark | |
| - deepseek-ocr | |
| - glm-ocr | |
| - vision-language-model | |
| - region:us | |
| library_name: mlx-vision | |
| pipeline_tag: image-to-text | |
| # mlx-vision | |
| **DSpark-style faster OCR on Apple Silicon (MLX).** | |
| Speculative decoding for OCR VLMs β DeepSeek-OCR-2, GLM-OCR, Unlimited-OCR. | |
| Vision/OCR counterpart to [mlx-dspark](https://github.com/ARahim3/mlx-dspark). | |
| | Resource | Link | | |
| |----------|------| | |
| | **Code** | [github.com/will702/mlx-vision](https://github.com/will702/mlx-vision) | | |
| | **Agents** | [AGENTS.md](https://github.com/will702/mlx-vision/blob/main/AGENTS.md) Β· [llms.txt](https://github.com/will702/mlx-vision/blob/main/llms.txt) | | |
| | **Weights used** | [`mlx-community/DeepSeek-OCR-2-8bit`](https://huggingface.co/mlx-community/DeepSeek-OCR-2-8bit), [`GLM-OCR`](https://huggingface.co/mlx-community/GLM-OCR-bf16), [`Unlimited-OCR`](https://huggingface.co/baidu/Unlimited-OCR) | | |
| ## Install | |
| ```bash | |
| pip install git+https://github.com/will702/mlx-vision.git | |
| # with PDF support: | |
| pip install "mlx-vision[pdf] @ git+https://github.com/will702/mlx-vision.git" | |
| ``` | |
| ## Quick start | |
| ```python | |
| from mlx_vision import ocr | |
| result = ocr("document.png", model="deepseek-ocr-2", mode="auto") | |
| print(result.text) | |
| ``` | |
| ```bash | |
| mlx-vision -m deepseek-ocr-2 -i page.png --mode dspark -v | |
| mlx-vision -m deepseek-ocr-2 -i doc.pdf --page 0 --dpi 200 | |
| ``` | |
| ## Modes | |
| - `baseline` β mlx-vlm generate | |
| - `dspark` / `lookup` β training-free semi-AR draft + confidence schedule (OCR DSpark weights not public yet) | |
| - `dflash` / `eagle3` / `mtp` β neural speculation via mlx-vlm (`--drafter`) | |
| - `auto` β best available path | |
| ## Cite | |
| See [CITATION.cff](https://github.com/will702/mlx-vision/blob/main/CITATION.cff). Related paper: [DSpark](https://arxiv.org/abs/2607.05147). | |
| ## License | |
| MIT | |