How to use the Qwen 3.5 LLMs to OCR documents
a day ago
- Author impressed with Gemini OCR but found it expensive and privacy-concerning for sensitive documents.
- Qwen 3.5 is an open-weight multimodal model from Alibaba available in sizes from 0.8B to 397B parameters.
- For OCR, the 9B model is the sweet spot; smaller models may summarize instead of extracting text.
- Use PyMuPDF to convert PDF pages to images at 100 DPI before OCR.
- Local OCR with LM Studio and Python code; 9B model gives ~3s/page on consumer GPU.
- OpenRouter hosts Qwen 3.5 9B at very low cost (~$0.12 per 1000 pages) and high speed (128 pages simultaneously, ~10s each).
- This approach is cheaper, faster, and more private than using frontier APIs like OpenAI or Google for bulk OCR.
- Ideal for digitizing historical documents or handling massive archives affordably.