TinyDoc-VLM is our 256M parameter vision-language model for document understanding. It handles OCR, layout analysis, table extraction, and visual question answering — and it runs entirely on your laptop's CPU. Here's how to get started in 5 minutes.
Step 1: Install Dependencies
pip install transformers torch pillow
Step 2: Load the Model
from transformers import AutoProcessor, AutoModelForVision2Seq
processor = AutoProcessor.from_pretrained('eulogik/TinyDoc-VLM-256M')
model = AutoModelForVision2Seq.from_pretrained('eulogik/TinyDoc-VLM-256M')
Step 3: Process a Document
from PIL import Image
image = Image.open('invoice.png')
inputs = processor(images=image, text='Extract all line items from this invoice', return_tensors='pt')
output = model.generate(**inputs, max_new_tokens=512)
result = processor.decode(output[0], skip_special_tokens=True)
print(result)
What Can It Do?
TinyDoc-VLM handles: receipt OCR, invoice processing, table extraction, form understanding, document classification, and visual QA ("What is the total amount?", "Who is the vendor?"). All on CPU, all locally, all privately.
Performance
With 256M parameters and SigLIP + SmolLM2 architecture, TinyDoc-VLM achieves competitive accuracy against models 10× its size on standard document understanding benchmarks. It processes a typical document page in under 2 seconds on a MacBook Air M1.
Download the model from HuggingFace. Apache 2.0 licensed.