OXR-1.0 is a 1.3B-parameter document parser from SoMark that holds first place on olmOCR-Bench, OmniDocBench, and DocParsingBench at the same time. I pulled the safetensors header to find out where those 1.3B parameters actually sit, then pushed two arXiv papers through the project’s own free API to see what comes out the other end.
Both halves of that turned up something the README does not advertise.
Three services, not one
The thing that makes OXR structurally different from every other OCR model on those leaderboards is that layout analysis is not inside the model. It is a separate process with its own port, its own checkpoint, and its own class vocabulary.
config.example.yaml in the repo makes the split plain:
layout_analyze_model:
url: http://127.0.0.1:8081
batch_size: 8
max_concurrency: 2
timeout: 60
retry_times: 2
score_threshold: 0.5
provides_reading_order: false
oxr_model:
model_name: oxr
url: http://127.0.0.1:8080/v1
max_tokens: 8192
max_concurrency: 16
timeout: 120
retry_times: 2
Three processes in the default deployment: the layout service on 8081, the OXR model on 8080 (an OpenAI-compatible endpoint backed by vLLM 0.25.1 and an out-of-tree plugin), and the parsing API on 8000. docker/allinone_entrypoint.py supervises all three in one container.
The layout model is D-FINE Stage-2 B2, 12 classes, 960x960 input. Its metadata.json pins the class IDs, the preprocessing backend, and a SHA-256 of the weights, and the service refuses to start if the checkpoint does not match. That is a nice touch: swapping the layout model means pointing layout_analyze_model.url at a different service, and the integrity check is metadata-driven rather than hardcoded.
The README calls this “the first to make its layout analysis module independent and pluggable,” and the claim is checkable in the config surface. provides_reading_order: false is the load-bearing line. The layout model detects regions; it does not order them. Reading order comes from the OXR model itself.
That decision has consequences in the code, so here is the contract for it. The model is prompted to output reading order as “a whitespace-separated permutation of 0-based box IDs only,” and parse_reading_order rejects any output that is not an exact permutation of 0 through n-1. When the model returns something nearly complete, a vendored XY-Cut++ implementation (82 KB of Python, adapted from PaddleXrc, itself credited to arXiv:2504.10258) supplies reference ranks, and the missing IDs get inserted at the positions that minimize pairwise inversions against that reference. The tolerance is min(2, max(1, block_count // 10)) missing IDs. There is a weaker second fallback, supplement_incomplete_reading_order, which requires at least half the IDs to have come from the model before it will use XY-Cut++ to patch the rest.
Two independent sources of reading order, with a strict contract on one and a conservative repair path to the other, is a more careful design than most document parsers manage. It is also the part that would silently rot if you swapped in a layout model that did provide ordering.
The part that is actually new
Now the parameters. config.json lists visual_vocab_size: 65536, and the checkpoint header tells the rest of the story.
The vision tower is google/siglip2-so400m-patch16-512, a SigLIP2 Navit model with hidden_stride: 2. The stride means 2x2 patch merging, so a 1152-dim feature becomes 4608 dims before anything else happens. Then visual_tokenizer.head.0.weight is shaped [65532, 4608], which is 301,971,456 parameters.
That is the single largest tensor in the checkpoint. The language model’s embedding table, llm.model.embed_tokens.weight at [151936, 1024], is 155,582,464. The visual projection is nearly twice the size of the text vocabulary.
The mechanism is a learned visual vocabulary. The head produces logits over 65532 entries, torch.softmax turns them into soft token probabilities, and OXREmbedding multiplies those probabilities against a [65536, 1024] table (vte.weight, 67,108,864 params) to produce the visual embeddings that get spliced into the language model’s input stream. Every patch of every image is quantized into a 65536-atom codebook before the LLM sees it. Four of the slots are reserved as indicator IDs, INDICATOR_IDS = [-301, -302, -303, -304], for image and video begin/end markers, which is why the head outputs 65532 and not 65536.
Here is the full accounting, straight from the safetensors header:
llm (stored) 751,632,384 includes lm_head tied to embed_tokens
llm.lm_head (tied duplicate) 155,582,464 tie_word_embeddings: True
llm (unique) 596,049,920 exactly Qwen3-0.6B
visual_tokenizer 715,636,968 SigLIP2 ViT + the 301M projection head
vte (visual embedding table) 67,108,864 [65536, 1024]
--------------------------------------------------------------
unique total 1,378,795,752 = 1.379B, so the README's "1.3B" holds
stored total 1,534,378,216 = 1.53B, 3.07 GB on disk in bf16
Two numbers, both correct, describing different things. The checkpoint stores the tied lm_head a second time, so the file is bigger than the parameter count.
The balance here is unusual for something billed as a small model. The visual tokenizer at 715M parameters is larger than the language model at 596M. For a document parser, most of the capacity went into turning pixels into something an LLM can read.
What I sent through it
The repo ships a free API that needs no registration, and the somark CLI works against it directly:
pip install somark
somark --base-url https://free-oxr.somark.ai/api/v1 --api-key dummy \
parse document.pdf --formats md,json --out ./parsed-output/
I ran two arXiv papers through it. The first was 2410.07038, a 19-page astronomy paper about HI mapping of the M106 group with FAST. It took 2m18.8s of wall clock and returned 200 blocks: 135 Text, 26 Title, 18 Caption, 12 Picture, 4 Formula, 3 Table, 2 Footnote, and zero page headers or footers. The second was 1706.03762, the Attention Is All You Need paper, 15 pages, done in 1m11.4s with 133 Text, 25 Title, 9 Caption, 6 Formula, 5 Picture, 4 Table, 5 Footnote.
Combined that is 34 pages in 210.1 seconds, or 0.162 pages per second. The benchmark document claims 0.990373 pages per second on a single RTX PRO 6000 Blackwell with 96 GB of VRAM, which is 6.1x higher. That is not a like-for-like comparison, and the project says so: the free endpoint queues requests, the README explicitly recommends against running it in production, and it warns that “requests are queued, so processing speed may vary slightly.” So the honest reading is that 0.162 pages per second is what a stranger gets on a shared public queue, not what the model does on hardware you control.
Formula output was good. Attention’s core equation came back as \text{Attention}(Q,K,V)=\text{softmax}(\frac{QK^{T}}{\sqrt{d_{k}}})V\tag{1} with the equation number intact, and the multi-head block came back as a proper aligned environment rather than flattened text.
Tables came back as HTML with cells populated, which is the part that is genuinely hard. Two cells in the astronomy paper’s appendix table were wrong in ways worth naming exactly. The Name column produced dwC where the paper’s own body text refers to dw1210+4727, so the identifier got truncated mid-token. Another row produced 588298663037239998$^{a}$ in the Name column, which is a footnote marker string mangled into the wrong field. The wide appendix table with 18 columns came back with its header split across two rows, (1) through (18) on one row and the real column names on the next. That is how the PDF is typeset, but it is not how you want the data.
Also worth knowing: the CLI warned me that enable_image_understanding, enable_inline_image, and enable_table_image are “accepted but ignored; open-source OXR only implements feature_config.keep_header_footer.” The open-source build is a subset of the hosted API.
Thirteen element types, twelve classes
The README documents 13 element types. oxr/pipeline/models.py defines 12 in the BlockType enum. The thirteenth, Chemical Equation, is manufactured at serialization time in json_postprocess.py:
"idx": block.idx,
"type": "Chemical Equation" if block.type == BlockType.FORMULA and r"\ce" in block.content
else block.type.value,
So it is not a detected class at all. It is a Formula block relabeled when its LaTeX happens to contain mhchem’s \ce. The layout model’s 12 classes are the real detection set: Caption, Footnote, Formula, Text, Page-footer, Page-header, Picture, Title, Table, Code Block, Stamp, Chemical Structure. A pipeline consuming OXR’s JSON has to know that, or it will count chemistry twice.
The RSI loop, and the part that is not shipped
The most interesting claim in the release is the recursive self-improvement loop. The README describes it as “pretrained from scratch, OXR uses a recursive self-improvement (RSI) loop during post-training, a first in document parsing,” and there is a diagram with three panels that spells the mechanics out.
Prediction and Classification: the image goes into OXR, OXR produces multiple rollouts, the rollouts get compared for high disagreement, and a General VLM classifies each sample as Correct, Wrong, or Uncertain.
Attribution and Training Planning: per-sample reasons get clustered into reason clusters, and a General VLM does sample-by-sample attribution.
Data Generation: each reason cluster drives a General VLM that generates new Image plus label pairs, matching a reference style and selecting a different real sample each time, which feeds the training loop back around to OXR.
Then I went looking for the training code. There is none. The repository has 206 files, and the oxr/ package is inference only: orchestrator, recognition, reading order, assembler, and a postprocess directory. No trainer, no data generator, no eval harness for the RSI loop. The repo’s own topic list includes rsi, and the README’s arXiv badge reads “Coming Soon.”
So the most interesting claim in this release is currently a PNG.
There is a related tension in the same sentence. config.json points llm_config._name_or_path at Qwen/Qwen3-0.6B-Base and vit_config._name_or_path at google/siglip2-so400m-patch16-512. The sensible reading is that the OXR-specific pieces, the visual vocabulary head, the vte table, and the layout model, are trained from scratch on top of a Qwen3-0.6B and SigLIP2 stack. But “pretrained from scratch” as written reads broader than that, and issue #16 in the tracker is literally titled “model structure and training.”
The license, which is the actual news for anyone shipping this
The OXR License is Apache-2.0 with four additional terms that take precedence on conflict.
Section 1 sets a size test. Commercial use is fine without a separate commercial license only while you and your affiliates, on a consolidated basis, stay under USD 2,000,000 in total funding or under USD 2,000,000 in annual revenue. Cross either threshold and you need a separate commercial license before commencing or continuing commercial use.
Section 2 requires attribution. If you offer an online service to third parties using OXR, you must prominently identify SoMark OXR in the user interface or in publicly accessible documentation.
Section 3 is the one that matters most, and it is structured completely differently from Section 1. You may not use OXR or its derivative works to offer, operate, or make available a hosted API service that competes with one offered by SoMark or its affiliates. It covers document parsing, OCR, layout analysis, and document content extraction as a substitute for substantially similar functionality. It applies regardless of total funding or annual revenue. It explicitly includes reseller, white-label, and intermediary arrangements, paid or free. Using OXR solely within your own organization is not prohibited.
Section 4 terminates your rights automatically if you fail Section 1, fail Section 2, or violate Section 3, with no notice.
The threshold structure is unusual. Section 1 is a size test with two numbers. Section 3 is a business-model test with no size escape hatch and no revenue floor, and the license spells out that being below the Section 1 thresholds “does not waive any other term in this License, including the competing hosted API restriction in Section 3.”
If you are building a document parsing API, Section 3 is the term to read twice, not Section 1.
One more wrinkle on the weights: the Hugging Face model card carries no license tag in its metadata, and layout_analysis/README.md says model weight terms are provided by the model repository, which means the separate 78,791,307-byte last.pth layout checkpoint has its own terms to check rather than inheriting the code license.
Trade-offs and what it does not fix
The accuracy tables and the speed table were measured under different regimes, and the difference matters. Peer accuracy numbers come from “published papers, model cards, and the olmOCR-bench leaderboard.” Only the speed table is uniform hardware: one RTX PRO 6000 Blackwell, a 24-CPU quota, 96 GiB of RAM with no swap, vLLM 0.25.1, on a frozen stratified 100-page subset of the 1,651-page OmniDocBench source set. So the accuracy claim is OXR-measured against other models’ self-reported numbers, and the speed claim is apples to apples. The accuracy charts also truncate their axes hard: olmOCR-Bench runs 70 to 90, OmniDocBench 88 to 100, DocParsingBench 70 to 90. A 0.24 point win over Infinity-Parser2-Pro, 87.84 against 87.60, looks like a cliff on a truncated axis. It is a 0.24 point win. The DocParsingBench margin is wider at 2.59 points, and the table parsing margin is the widest of all, which matches the README’s own emphasis.
The end-to-end throughput figure comes from 200 timed observations of the same 100 pages, the mean of two rounds over a frozen subset, with frozen-100-pages.json committed so anyone can reproduce the exact workload. That is a better protocol than most leaderboards publish, and the frozen manifest is the reason.
OXR’s weakest olmOCR category is old_scans at 59.32. Everything else it scores between 85 and 97. Scanned legacy documents are exactly where a document parser tends to matter most in an enterprise deployment, and that is the cell where this one is at 59.
The open issue tracker as of October 30 is a useful catalog of what is not finished. Nested math delimiters survive when equation numbering follows inline math, filed October 29 with a reproduction case. Traditional Chinese recognition is poor. Russian output mixes in Chinese. Sheet music is not supported. Some documents fail to parse entirely, with a CNKI link attached. Bounding boxes are line-level; word-level is a question, not a feature. And there are no GitHub releases at all, no tags, from a repository created on October 5 with two contributors.
What I cannot resolve from outside the project is whether the RSI loop is load-bearing or a label. The recipe in that diagram is the kind of thing that either produces compounding gains or produces a very good dataset of synthetic documents, and from the outside the two look identical. The accuracy margins are not wide enough to settle it: 0.24 points on the best benchmark, with peer numbers pulled from other people’s papers. The concrete thing to watch is whether the technical report lands with the training code and the generated data attached, because that is the only artifact that would let anyone check the loop rather than the picture of it.
References and where to dig further
github.com/SoMarkAI/OXR— the repo.docs/benchmark.mdhas the full 21-model accuracy and speed tables with the frozen 100-page workload.github.com/SoMarkAI/OXRoxr/pipeline/reading_order.py— the XY-Cut++ repair path and its tolerance.huggingface.co/SoMarkAI/OXR-1.0— the checkpoint, theconfig.json, thelayout_analysis/metadata.json, and the.eval_results/olmocrbench.yamlfile that independently records the 87.84.- arXiv:2504.10258 — the XY-Cut++ paper behind the vendored implementation.
github.com/Peterande/D-FINE— the layout detector that OXR adapts for inference only.github.com/liushuai35/PaddleXrc— the upstream for the vendored XY-Cut++ code.
Comments
Powered by GitHub Discussions via Giscus. Sign in with GitHub to leave a comment.