System Requirements
Before installing olmOCR, ensure your system meets these requirements:Hardware Requirements
GPU
Recent NVIDIA GPU with CUDA supportTested GPUs:
- RTX 4090
- L40S
- A100
- H100
Storage
Minimum 30GB of free disk spaceRequired for:
- Model weights
- Temporary processing files
- Output storage
Software Requirements
- Python: 3.11 or higher (pyproject.toml:20)
- CUDA: Compatible version for your GPU
- Operating System: Ubuntu/Debian (other Linux distributions may work)
Installation Steps
Install System Dependencies
Install poppler-utils and additional fonts for rendering PDF images:
These fonts are required for properly rendering PDF pages to images.
Clone and Install olmOCR
Clone the repository and install the package:This installs all core dependencies including:
- pypdf (>=5.2.0) - PDF parsing
- pypdfium2 - PDF rendering
- torch (>=2.5.1) - Deep learning framework
- transformers (>=4.46.2) - Model loading
- Pillow - Image processing
- And more (see pyproject.toml:21-42 for full list)
Install SGLang for GPU Inference (Recommended)
For GPU-accelerated inference, install sglang with flashinfer support:
Optional Dependencies
Development Tools
If you plan to contribute to olmOCR, install the development dependencies:- Testing tools (pytest, pytest-cov)
- Code formatters (black, isort, ruff)
- Type checking (mypy)
- Documentation tools (Sphinx)
Training Dependencies
For fine-tuning models, install the training extras:- accelerate - Distributed training
- peft - Parameter-efficient fine-tuning
- wandb - Experiment tracking
- datasets - Data loading
GPU Configuration
Memory Requirements
The pipeline automatically adjusts GPU memory usage based on available VRAM:- < 60GB VRAM: Uses 80% memory fraction for KV cache
- >= 60GB VRAM: Uses default memory allocation
The memory fraction is automatically configured in pipeline.py:508 based on your GPU.
Checking GPU Availability
Verify that PyTorch can detect your GPU:Troubleshooting
Poppler Not Found
If you get an error about poppler not being found:CUDA Version Mismatch
If you encounter CUDA version errors, ensure your PyTorch installation matches your CUDA version:Font Rendering Issues
If PDFs render with missing characters, ensure all fonts are installed:Next Steps
Now that you have olmOCR installed, you’re ready to process your first PDF!Quickstart Guide
Learn how to convert PDFs in minutes