<!-- # hard line break macro for HTML -->

<a id="model-zoo-allenai-olmocr-2-7b-1025"></a>

# allenai/olmOCR-2-7B-1025

<a href="../../plugins/plugins_ecosystem/olmocr_2.html" target="_blank">
    <img src="https://img.shields.io/badge/Plugin-olmOCR--2-orange" alt="From Plugin">
</a>

#### NOTE
This is a [remotely-sourced model](../remote.md#model-zoo-remote) from the
[olmOCR-2](../../plugins/plugins_ecosystem/olmocr_2.html) plugin, maintained by the community.
It is not part of FiftyOne core and may have special installation requirements.
Please review the plugin documentation and license before use.

olmOCR-2 is an advanced OCR model from AllenAI that uses Qwen2.5-VL architecture for document text extraction. Returns markdown output with YAML front matter containing document metadata (language, rotation, tables, diagrams). Converts equations to LaTeX and tables to HTML..

**Details**

- Model name: `allenai/olmOCR-2-7B-1025`
- Model source: [https://huggingface.co/allenai/olmOCR-2-7B-1025](https://huggingface.co/allenai/olmOCR-2-7B-1025)
- Model author: AllenAI
- Model license: Apache 2.0
- Exposes embeddings? no
- Tags: `ocr, document-understanding, VLM, vision-language`

**Requirements**

- Packages: `huggingface-hub, transformers, torch, Pillow, numpy`
- CPU support
  - yes
- GPU support
  - yes

**Example usage**

```python
import fiftyone as fo
import fiftyone.zoo as foz

foz.register_zoo_model_source("https://github.com/harpreetsahota204/olmOCR-2")

dataset = foz.load_zoo_dataset(
    "coco-2017",
    split="validation",
    dataset_name=fo.get_default_dataset_name(),
    max_samples=50,
    shuffle=True,
)

model = foz.load_zoo_model("allenai/olmOCR-2-7B-1025")

dataset.apply_model(model, label_field="predictions")

session = fo.launch_app(dataset)
```
