File size: 1,119 Bytes
7c1b44a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# mlx-vision

> DSpark-style speculative decoding for OCR vision-language models on Apple Silicon (MLX).

## Summary
mlx-vision accelerates local OCR VLMs (DeepSeek-OCR-2, GLM-OCR, Unlimited-OCR) using speculative decoding inspired by DeepSeek DSpark. It wraps mlx-vlm with confidence-scheduled drafting, vision feature cache, PDF rasterization, CLI, and an OpenAI-compatible server.

## Install
pip install mlx-vision

## CLI
mlx-vision -m deepseek-ocr-2 -i page.png --mode auto -v
mlx-vision -m deepseek-ocr-2 -i doc.pdf --page 0

## Python
from mlx_vision import ocr
result = ocr("page.png", model="deepseek-ocr-2", mode="auto")

## Modes
baseline, lookup, dspark (training-free semi-AR until OCR drafters exist), dflash, eagle3, mtp, auto

## Links
- https://github.com/will702/mlx-vision
- https://huggingface.co/will702/mlx-vision
- https://github.com/Blaizzy/mlx-vlm
- https://github.com/ARahim3/mlx-dspark
- https://arxiv.org/abs/2607.05147 (DSpark)

## Keywords
mlx, apple-silicon, ocr, deepseek-ocr, glm-ocr, unlimited-ocr, speculative-decoding, dspark, dflash, vision-language-model, metal, faster-inference