olmOCR 2: Unit test rewards for document OCR | Ai2
olmOCR 2: Better OCR for real documents, not just demos
If you’ve ever spent an afternoon wrestling with a PDF, you know the pain, the tiny font, the weird columns, the tables that fall apart, or the math that comes out as garbage. I’ve been there, and that’s exactly the problem olmOCR 2 tries to fix.
What it is, in plain terms: olmOCR 2 (olmOCR-2-7B-1025) is a new document OCR model from Ai2 that reads complex pages in a single pass, and it’s built to produce structured outputs like Markdown for headings, HTML for tables, and LaTeX for equations. The model is based on Qwen2.5-VL-7B and fine-tuned on a diverse set of 270,000 PDF pages, including 20,000 extra hard handwritten and typewritten pages.
Why it matters: instead of patching outputs after the fact, the system is trained against verifiable correctness. Ai2 uses unit-test style checks (olmOCR-Bench), a synthetic dataset with 2,186 pages and 30,381 verifiable test cases, and a reinforcement method called Group Relative Policy Optimization. During training the model generates multiple completions, and the ones that pass more tests get higher rewards, so the model learns to be faithful, not vague.
Results are solid, not just hype. olmOCR 2 scores 82.4 on olmOCR-Bench, nearly 4 points up from the prior release, and beats specialized tools like Marker (76.1) and MinerU (75.8). It’s also practical: an FP8 quantized version runs at about 3,400 output tokens per second on a single H100, which translates to roughly 10,000 pages for under $2.
You can try the model or grab the weights and code, they’re available on Hugging Face and through APIs on DeepInfra and Parasail (allenai/olmOCR-2-7B-1025). For more details see https://allenai.org/blog/olmocr-2
Looking ahead, this feels like a step toward OCR that is reproducible, adaptable, and actually useful for real workflows, whether you’re working on accessibility, archives, or financial documents. I’m excited to try fine-tuning it on a messy folder of scanned reports I have, and I’ll report back.
olmOCR 2: Kompakte deutsche Zusammenfassung
Wenn Sie schon einmal versucht haben, ältere oder komplex formatierte PDFs zu digitalisieren, wissen Sie, wie frustrierend das sein kann. olmOCR 2 ist ein neues OCR-System von Ai2, das genau diese echten Probleme adressiert. Es liest komplette Seiten in einem Durchgang und gibt strukturierte Formate zurück, zum Beispiel Markdown für Überschriften, HTML für Tabellen und LaTeX für Formeln.
Technisch kurz: das Modell basiert auf Qwen2.5-VL-7B und wurde mit einem Mix aus 270.000 PDF-Seiten feinabgestimmt, darunter 20.000 zusätzliche schwierige handschriftliche und maschinenschriftliche Seiten. Ai2 nutzt eine Prüfungslogik ähnlich zu Unit-Tests in olmOCR-Bench, sowie eine synthetische Trainingsmenge mit 2.186 Seiten und 30.381 verifizierbaren Testfällen, um Korrektheit direkt zu belohnen.
Das Ergebnis ist bemerkenswert praktisch. olmOCR 2 erreicht 82,4 Punkte auf olmOCR-Bench, etwa 4 Punkte besser als die Vorgängerversion, und schlägt spezialisierte Tools wie Marker und MinerU. Außerdem ist eine FP8-quantisierte Version verfügbar, die auf einer H100 rund 3.400 Ausgabetokens pro Sekunde schafft, genug um ca. 10.000 Seiten für weniger als 2 US-Dollar zu verarbeiten.
Sie finden Modellgewichte, Datensätze und Code auf Hugging Face, oder nutzen APIs bei DeepInfra und Parasail (allenai/olmOCR-2-7B-1025). Mehr Infos gibt es hier: https://allenai.org/blog/olmocr-2
Kurz gesagt, olmOCR 2 macht OCR praktikabler für den Alltag, und das Beste ist: Sie können das Modell mit einer kleinen Anzahl eigener Seiten an Ihre Dokumente anpassen. Das eröffnet viele praktische Anwendungen, von Barrierefreiheit bis Archivarbeit.



Kommentar abschicken