# 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