DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation
Paper β’ 2607.05147 β’ Published β’ 39
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
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.
| Resource | Link |
|---|---|
| Code | github.com/will702/mlx-vision |
| Agents | AGENTS.md Β· llms.txt |
| Weights used | mlx-community/DeepSeek-OCR-2-8bit, GLM-OCR, Unlimited-OCR |
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"
from mlx_vision import ocr
result = ocr("document.png", model="deepseek-ocr-2", mode="auto")
print(result.text)
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
baseline β mlx-vlm generatedspark / 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 pathSee CITATION.cff. Related paper: DSpark.
MIT