lucataco / olmocr-7b

A release preview of the olmOCR model from Ai2 that's fine tuned from Qwen2-VL-7B-Instruct using the olmOCR-mix-0225 dataset

  • Public
  • 814 runs
  • GitHub
  • Weights
  • License

Run time and cost

This model costs approximately $0.083 to run on Replicate, or 12 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 85 seconds. The predict time for this model varies significantly based on the inputs.

Readme

olmOCR Logo

olmOCR-7B-0225-preview

This is a preview release of the olmOCR model that’s fine tuned from Qwen2-VL-7B-Instruct using the olmOCR-mix-0225 dataset.

Quick links: - 📃 Paper - 🤗 Dataset - 🛠️ Code - 🎮 Demo

The best way to use this model is via the olmOCR toolkit. The toolkit comes with an efficient inference setup via sglang that can handle millions of documents at scale.

Usage

This model expects as input a single document image, rendered such that the longest dimension is 1024 pixels.

The prompt must then contain the additional metadata from the document, and the easiest way to generate this is to use the methods provided by the olmOCR toolkit.

Manual Prompting

If you want to prompt this model manually instead of using the olmOCR toolkit, please see the code below.

In normal usage, the olmOCR toolkit builds the prompt by rendering the PDF page, and extracting relevant text blocks and image metadata.

License and use

olmOCR is licensed under the Apache 2.0 license. olmOCR is intended for research and educational use. For more information, please see our Responsible Use Guidelines.