Data & ExtractionOpen source codeallenai/olmocr

olmOCR: Open Source AI Repository & Self-Hosting Guide

Allen Institute for AI (Ai2) open-source vision-language PDF linearization toolkit converting complex, noisy, or handwritten PDFs into clean Markdown via vLLM.

GitHub Stars
19,869 stars
Repository License
Apache-2.0
Last Push (UTC)
Mar 25, 2026
Check the repo's license. Model weights may have a different license.
git clone https://github.com/allenai/olmocr.git
View on GitHub
Installpip install olmocr

olmOCR: Architecture & Practical Workflow

olmOCR pairs Qwen2-VL / Qwen2.5-VL fine-tuned weights (`olmOCR-7B`) with smart PDF page prompting (`anchor` metadata from pypdf) to reconstruct multi-column text, equations, and stubborn tables accurately at scale over vLLM or SGLang GPU clusters.

Recommended End-to-End Pipeline

Run `python -m olmocr.pipeline ./workspace --pdfs scans/*.pdf` on a CUDA GPU to batch-convert scanned books and archival documents into structured Dolma JSONL/Markdown.

Runtime Target
Self-Hosted / Python (GitHub)
Primary Users
Researchers, Developers
Code License
Apache-2.0
Focus Topics
open-source, github, ocr, vlm, pdf, self-hosted

Quick Setup & Installation Steps

Platform target: Self-Hosted / Python (GitHub). Always verify environment variables and dependencies in the upstream repository README.

  1. 1Clone the repository from GitHub: `git clone https://github.com/allenai/olmocr.git && cd olmocr`.
  2. 2Review the Apache-2.0 license (Check the repo's license. Model weights may have a different license.) and note any separate terms on external model weights.
  3. 3Install or launch the project directly: `pip install olmocr` (use an isolated Python virtualenv, Node workspace, or Docker volume so dependencies remain clean).
  4. 4Validate end-to-end behavior with a small sample input (Run `python -m olmocr.pipeline ./workspace --pdfs scans/*.pdf` on a CUDA GPU to batch-convert scanned books and archival documents into structured Dolma JSONL/Markdown.)

Hardware & VRAM Notes

Hardware & VRAM guidance: GPU recommended

GPU & VRAM

GPU recommended

System RAM & Storage

16 GB–32 GB system RAM recommended plus 10 GB–40 GB free SSD space for container images, Python dependencies, and model weights.

Runtime Target

Self-Hosted / Python (GitHub)

Strengths & Best For

  • PDF to text conversion
  • Vision-language model approach
  • Batch processing
  • Best suited for: Researchers, Developers

Limitations & Caveats

  • GPU recommended
  • Check model and code licenses before commercial use
  • Check the repo's license. Model weights may have a different license.

3 Similar Tools on /tools (Data)

Prefer a hosted web app instead of managing local weights or Docker containers? Explore these cloud alternatives.

Browse all tools
Self-Hosted olmOCR vs. Hosted Alternatives (AI PDF Data Extractor & Formula Bot)
FactorolmOCR (Self-Hosted)AI PDF Data ExtractorFormula Bot
Execution & PrivacyRuns locally via Self-Hosted / Python (GitHub); data stays on your disk or private server.Hosted cloud web interface; zero local dependency setup required.Hosted cloud web interface; zero local dependency setup required.
Cost & QuotaApache-2.0 code; bound only by local CPU/GPU hardware.Free; subject to vendor free-tier limits or paid plans.Freemium; subject to vendor free-tier limits or paid plans.
Primary FitPDF to text conversion; Vision-language model approachExtract tables, form fields, and scanned PDF documents into structured Excel (.xlsx), CSV, or JSON without coding or regex templates.AI spreadsheet and data analytics tool turning plain-English prompts into complex Excel/Google Sheets formulas, SQL, and charts.
Key Trade-offGPU recommendedRequires internet access and vendor account/quota limits.Requires internet access and vendor account/quota limits.

Matching Ready-Made Prompts

All Prompts →

Customize variables in Live Prompt Studio for olmOCR workflows.

Complex Bank Statement & Ledger NormalizerExtraction · Finance, Bank Statement, Excel, CSV
Open in Studio
Freight Bill of Lading (BOL) & Shipping Manifest ExtractorExtraction · Logistics, Bill of Lading, Freight, Shipping
Open in Studio
NotebookLM Multi-Source Deep Literature ReviewExtraction · Research, Literature Review, Synthesis, Academic
Open in Studio

More Open Source Data & Extraction Repositories

Frequently Asked Questions

What does olmOCR do and how does it work?

olmOCR (allenai/olmocr) is an open-source data & extraction project with 19,869 stars on GitHub. Allen Institute for AI (Ai2) open-source vision-language PDF linearization toolkit converting complex, noisy, or handwritten PDFs into clean Markdown via vLLM. olmOCR pairs Qwen2-VL / Qwen2.5-VL fine-tuned weights (`olmOCR-7B`) with smart PDF page prompting (`anchor` metadata from pypdf) to reconstruct multi-column text, equations, and stubborn tables accurately at scale over vLLM or SGLang GPU clusters.

Is olmOCR free to self-host and use commercially?

olmOCR provides open source code licensed under Apache-2.0. Check the repo's license. Model weights may have a different license. Always verify both source code and model weight licenses in the GitHub repository before commercial deployment.

What hardware, runtime, or VRAM does olmOCR require?

olmOCR targets Self-Hosted / Python (GitHub). Typical installation runs via `pip install olmocr`. GPU recommended

How does self-hosting olmOCR compare to hosted tools like AI PDF Data Extractor?

Self-hosting olmOCR gives you full local data control, zero per-usage vendor fees, and customizable Self-Hosted / Python (GitHub) pipelines—at the cost of managing your own setup and compute. By contrast, AI PDF Data Extractor (Free) runs in the browser with no local installation, though usage quotas and cloud privacy policies apply.

Is olmOCR actively maintained and what workflow fits it best?

Repository metadata records 19,869 stars on GitHub with the latest recorded push on Mar 25, 2026. Run `python -m olmocr.pipeline ./workspace --pdfs scans/*.pdf` on a CUDA GPU to batch-convert scanned books and archival documents into structured Dolma JSONL/Markdown.