# OXR

> An open-source 1.3B document parsing model that converts PDFs and document images into Markdown or JSON with layout coordinates.

OXR (Optical Everything Recognition) is an open-source document parsing model from the team behind SoMark. It turns PDFs and document images into Markdown or JSON with layout coordinates included, and its code and weights are published on GitHub, Hugging Face and ModelScope.

## What It Is

OXR is a 1.3B-parameter model pretrained from scratch for document parsing. It takes a PDF or page image and returns structured output that agents and downstream pipelines can consume. It recognizes 13 element types, including text, titles, tables (HTML/Markdown), formulas (LaTeX), chemical equations, chemical structures (SMILES), code blocks, stamps, captions, footnotes, headers, footers and figures, each with bounding box coordinates. The project says it also handles A3 exam papers, newspapers, vertical text and handwriting.

## How the Pipeline Works

Parsing runs in two stages. A separate layout analysis model returns region types and bounding boxes. OXR then recognizes the content of each cropped region and predicts reading order from the full-page image, and the results are merged by region ID. Because layout analysis is independent and pluggable, the built-in layout model can be replaced with a custom one while OXR continues to handle recognition and reading order. The vision encoder is a NaViT variant of SigLIP2 SO400M feeding a Qwen3-0.6B-Base decoder.

## Training and Benchmark Claims

The developers describe a recursive self-improvement (RSI) loop used in post-training. A general VLM and disagreement across OXR rollouts flag wrong or uncertain parses, causes are clustered, and a VLM generates targeted training data without manual labeling. SoMark states that OXR ranks #1 on olmOCR-Bench, OmniDocBench and DocParsingBench and is the fastest open-source parser in its tests on a single RTX PRO 6000. Accuracy and speed were measured in separate configurations, and scores for other models come from their published results.

## Running and Using It

OXR can be run locally on Linux with an NVIDIA GPU, using Docker or from source with vLLM, a layout service and a parsing API. It offers a visual demo, a sync parse endpoint, and compatibility with SoMark's API, so the somark-py and somark-js SDKs and CLI work by changing the base URL. A free hosted API and online demo are available for testing, though stability is not guaranteed and production use is not recommended. It is released under a custom license based on Apache 2.0 with additional terms covering commercial use thresholds and competing hosted API services.

## Features
- Parses PDFs and document images into Markdown or JSON with layout coordinates
- Recognizes 13 element types including tables, formulas, chemical equations, chemical structures and code blocks
- Independent, pluggable layout analysis module
- Reading order prediction integrated into the recognition model
- Recursive self-improvement loop during post-training
- Visual demo with Markdown preview, layout boxes and reading order
- Sync parsing API compatible with the SoMark API
- Free hosted API and online demo for testing
- Docker and source deployment with vLLM plugin
- Weights available on Hugging Face and ModelScope

## Integrations
Hugging Face, ModelScope, vLLM, Docker, somark-py, somark-js, SoMarkDown, SoPDF

## Platforms
LINUX, API, CLI, WEB

## Pricing
Freemium — Free tier available with paid upgrades

## Version
1.0

## Links
- Website: https://somark.ai/oxr
- Documentation: https://github.com/SoMarkAI/OXR/blob/main/README.md#quick-start
- Repository: https://github.com/SoMarkAI/OXR
- EveryDev.ai: https://www.everydev.ai/tools/oxr
