Reusable code components in olmOCR
mainThe olmOCR repository contains several reusable scripts for advanced document processing, training, and data generation tasks:
- Natural Text Parsing:
olmocr/data/buildsilver.pyprovides a prompting strategy for high-quality parsing using GPT-4o. - Data Filtering:
olmocr/filter/filter.pyimplements basic filtering by language and SEO spam removal. - Model Training:
olmocr/train/train.py: SFT Finetuning code for Qwen2.5-VL.olmocr/train/grpo_train.py: GRPO RL Trainer.
- Synthetic Data:
olmocr/synth/mine_html_templates.pyfor synthetic data generation. - Large-scale Pipelines:
olmocr/pipeline.pyfor processing millions of PDFs through a finetuned model using vLLM. - Visualization:
olmocr/viewer/dolmaviewer.pyfor viewing Dolma docs created from PDFs.