Report index

A 2B parser that outperforms its 30B teacher on retrieval

A model-engineering account of how 4,501 teacher-generated pages became a 2,667-page training set, a single-GPU 2B parser, and a student that beat its 30B teacher on all four retrieval metrics in the released 564-query evaluation.

Harrison Kim 김형섭
AI Research Engineer, WIGTN
WigtnOCR on Hugging Face
01Problem

The task was not OCR alone. It was structure-preserving parsing under a serving budget

Korean public documents combine scans, multi-column layouts, forms, charts, official seals and dense tables. Recovering characters was not enough: headings, rows, formulas and reading order had to survive long enough for a retrieval pipeline to use them.

A 30B vision-language model could generate useful structured Markdown, but its dual-GPU serving footprint did not fit the intended production path. WigtnOCR moves that cost offline: the large model creates supervision once, while a LoRA-tuned 2B student handles inference on one GPU.

This report is about that engineering transfer. OmniDocBench measures what the student learned about text, tables, formulas and reading order. KoGovDoc-Bench then holds semantic chunking and retrieval fixed to test whether the released parser output remains useful downstream.

WigtnOCR benchmark highlights
FIG.Highlights from the released WigtnOCR v1 evaluation. OmniDocBench measures parsing; the separate 564-query KoGovDoc-Bench evaluation measures downstream retrieval. Lower is better for NED; higher is better for TEDS and retrieval metrics.
02Alternatives

The alternatives exposed four different trade-offs

The deployment target was defined by what existing approaches preserved, what they lost and what they cost to serve.

Plain OCRReads characters, not documents

PaddleOCR supplies a pure-OCR baseline. It recovers characters but does not natively preserve the Markdown hierarchy the application uses for headings, tables and downstream chunking.

Rule-basedStrong text extraction, uneven element quality

Marker leads the released comparison on text NED and reading-order NED. WigtnOCR instead leads table TEDS and slightly exceeds Marker on formula CDM, so neither family wins every document element.

Recent VLM parsersDo not target this document mix

Most public parsing benchmarks emphasize English and Chinese. The target corpus combines Korean government layouts with English academic papers, including legal numbering, tables, formulas and mixed-language content.

A 30B VLMHigh quality, wrong serving footprint

The 30B teacher is useful for offline pseudo-label generation, but its tensor-parallel deployment uses two high-memory GPUs. The 2B student can be served through vLLM on one GPU; this release does not publish a controlled latency or cost comparison.

03Architecture

Three model roles separate generation, quality control and serving

The 30B teacher and 122B judge run only in the offline data pipeline. Production inference belongs to the 2B student; the architecture spends large-model compute once rather than on every parsed page.

Stage 01Render and generate

PyMuPDF renders each source page at 200 DPI. Qwen3-VL-30B-A3B-Instruct then converts 4,501 page images from 49 Korean and English documents into structured Markdown.

Stage 02Validate trainable quality

Qwen3.5-122B-A10B-NVFP4 scores structure, table quality, completeness, hallucination and formatting consistency from the generated Markdown alone.

Stage 03Clean, balance and split

Pages scoring below three in the judged subset are rejected, 277 contaminated samples are manually cleaned, and a 0.25 per-document cap limits the dominant source. The final split contains 2,667 training and 294 held-out samples.

Stage 04Distill

Qwen3-VL-2B-Instruct is fine-tuned for three epochs with LoRA rank 8 / alpha 32 using ms-swift and DeepSpeed ZeRO-2. The vision encoder and aligner stay frozen.

WigtnOCR offline distillation and online serving architecture
FIG.WigtnOCR v1 architecture. PyMuPDF renders pages at 200 DPI; a 30B Instruct teacher generates Markdown; a text-only 122B judge supports filtering; the curated data tunes 8.7M parameters of a 2B student that serves on one GPU.

Pseudo-label source pool before filtering and balancing

SourceDocumentsPagesLanguage and role
KoGovDoc103,637Korean government layouts
arXiv papers39864English academic layouts
Total494,50130B teacher generation
04Supervision

The text-only judge filters trainability, not visual fidelity

The judge scores five properties on a one-to-five scale: heading structure, table quality, completeness, hallucination signals and formatting consistency. The preserved v1 method records a 30% KoGovDoc sample—1,047 of 3,637 pages—and all 864 arXiv pages as judged; unjudged KoGovDoc pages were eligible before balancing rather than silently assigned a score.

This is a text-quality gate. Repetition loops, abrupt truncation, leaked reasoning and malformed Markdown are visible without the source image. Pixel-level omissions or transcription mistakes are not, so a score of three or above means usable supervision, not verified visual ground truth.

The published pass rates are 75.1% for the judged Korean-government sample and 73.8% for arXiv. These rates describe the judged subsets; they should not be presented as human accuracy or as a score over every one of the 4,501 source pages.

05Data

Curation mattered more than keeping every generated page

  • 01One document accounted for 53% of the pages. A model trained on that learns that document rather than the domain, so a per-document ratio cap of 0.25 was applied.
  • 02Earlier reasoning-model trials left English thought processes inside some generated Markdown. The public dataset card reports 277 contaminated samples as manually reviewed and cleaned; it does not break that total into separate deletion and repair counts.
  • 03The final split contains 2,667 training samples and 294 held-out benchmark samples. The released benchmark spans 38 source documents: nine Korean government documents and 29 arXiv papers.
06Training

Only 8.7 million parameters moved

The student keeps the pretrained vision path fixed and adapts the language model's linear layers. The released configuration changes 0.4% of the 2B model rather than fine-tuning it end to end.

The 31-minute figure describes this hardware and configuration only. It is not an end-to-end cost for teacher generation, judging or data cleaning, and it should not be compared with production serving latency.

The Hugging Face release includes the model weights, tokenizer, configuration and machine-readable training arguments. Where prose metadata and the arguments file differ, the report avoids the disputed field rather than choosing a convenient value.

Published WigtnOCR v1 training configuration

DecisionPublished valueEngineering purpose
BaseQwen3-VL-2B-InstructCompact dense deployment model
AdapterLoRA r=8, α=32, all linear LLM layers8.7M trainable parameters
FrozenVision encoder and alignerPreserve visual features and alignment
Optimisation3 epochs · LR 1e-4 · bf16Released v1 checkpoint
Systemms-swift · DeepSpeed ZeRO-2Two-GPU training
Hardware and time2 × RTX PRO 6000 98GB · 31 minReported training run
07Intrinsic evaluation

The student improves tables without winning every metric

Across OmniDocBench's 1,355 pages and nine document types, WigtnOCR matches the teacher on text NED and substantially improves table TEDS, while the teacher remains stronger on formula CDM.

WigtnOCR produces evaluable output for 1,276 pages and skips 79, a 5.8% skip rate. The 2B base skips 18.8%, while the 30B teacher skips 5.5%; specialization closes most of the base model's reliability gap without eliminating it.

Relative to the 2B base, fine-tuning improves every selected intrinsic metric: text NED falls from 0.364 to 0.288, table TEDS rises from 0.561 to 0.649, formula CDM rises from 0.865 to 0.884 and reading-order NED falls from 0.300 to 0.211.

OmniDocBench comparison chart
FIG.Released OmniDocBench comparison across the 30B teacher, base 2B, Marker and WigtnOCR. The benchmark contains 1,355 pages; each model's skip rate remains part of the result.

OmniDocBench · 1,355 pages across nine document types

ParserText NED ↓Table TEDS ↑Formula CDM ↑Order NED ↓Skip ↓
Qwen3-VL-30B0.2890.5230.9390.2275.5%
Qwen3-VL-2B0.3640.5610.8650.30018.8%
Marker0.2180.5860.8630.1650.4%
WigtnOCR-2B0.2880.6490.8840.2115.8%
08Ablation

A bigger adapter made the tables worse

At this data size, rank 8 beat rank 32. The larger adapter improved formula CDM slightly and regressed the structure preservation the model exists for.

Rank 32 costs 4.9 points of Table TEDS and 2.1 points of text NED, which is an error metric, so that is a regression too. Five epochs overfits: validation loss turns up, and the table metric does not return to rank 8's level.

The tempting row is v2 at five epochs, which reaches a 0% skip rate while regressing text and table quality. Preserved experiment notes also record different tensor-parallel footprints for the v1 and v2 evaluations, so memory headroom may contribute to the skip-rate gap. The release therefore selects v1 for its parsing quality rather than attributing every reliability change to adapter rank.

LoRA configuration against OmniDocBench

ConfigRankEpochsText NED ↓Table TEDS ↑TEDS-S ↑CDM F1 ↑RO NED ↓Skip % ↓
v1, deployed830.2880.6490.7320.8840.2115.8%
v2, best3230.3090.6000.697not run0.2150.7%
v2, last3250.3060.6100.6950.8920.2140.0%
09Released downstream evaluation

The 2B student beats its 30B teacher on all four retrieval metrics

The released evaluation applies one semantic-chunking policy, BGE-M3 embeddings and FAISS retrieval to six parser outputs over 294 KoGovDoc-Bench pages and 564 queries.

WigtnOCR exceeds the 30B teacher on Hit@1 (0.739 versus 0.716), Hit@5 (0.855 versus 0.839), MRR@10 (0.788 versus 0.771) and nDCG@10 (0.437 versus 0.411). It ranks first among all six parsers on Hit@1, Hit@5 and MRR@10, which is the evidence behind this report's title.

It does not lead every metric in the six-parser grid: the untuned 2B base reaches the highest nDCG@10 at 0.444. The release prioritizes Hit@1 and MRR because the first answer-bearing chunk matters directly in a RAG pipeline without a reranker; the full table remains visible so that choice is auditable.

Boundary Clarity compared with retrieval Hit at 1
FIG.Released v1 comparison. MinerU has the strongest Boundary Clarity but ranks fifth on Hit@1, so intrinsic chunk cleanliness is not a substitute for the downstream retrieval check.
KoGovDoc retrieval results
FIG.Six-parser KoGovDoc-Bench comparison using the same semantic chunking, BGE-M3 embeddings and FAISS retrieval pipeline.

Released KoGovDoc-Bench retrieval · 294 pages · 564 queries · six parsers

ParserHit@1 ↑Hit@5 ↑MRR@10 ↑nDCG@10 ↑
WigtnOCR-2B0.7390.8550.7880.437
Qwen3-VL-30B0.7160.8390.7710.411
Marker0.7110.8530.7710.412
Qwen3-VL-2B0.7090.8140.7560.444
MinerU0.6080.7890.6820.384
PaddleOCR0.5120.6930.5920.293
10Failure analysis

What did not transfer cleanly

  • 01Formula CDM remains below the 30B teacher, so the compact model should not be presented as uniformly better.
  • 02Five of 294 KoGovDoc-Bench pages failed in the released Korean-document NED evaluation. Separately, WigtnOCR skips 5.8% of OmniDocBench; the two denominators should not be conflated.
  • 03Qualitative examples still contain character-level OCR errors even when chart and table structure improves.
  • 04The published model card reports its best results at 200 DPI and warns that lower-resolution inputs degrade quality.
  • 05Training and evaluation cover Korean and English documents; quality in other languages is not established.
  • 06The retrieval result uses one generated query set, semantic chunking, BGE-M3 and FAISS. It does not establish the same ranking under other retrieval stacks.
  • 07No controlled throughput, energy or serving-cost comparison has been released.
11Artifacts

The model and held-out benchmark are public; the release boundary is still explicit

WigtnOCR is more than a README release. The Hugging Face model and dataset repositories expose the deployable artifact, training metadata and the held-out parsing frame.

  • 01The model repository publishes the weights, tokenizer, processor and generation configuration, machine-readable training arguments, English and Korean model cards, result figures and an inference example.
  • 02KoGovDoc-Bench publishes val.jsonl plus all 294 referenced page images and pseudo-ground-truth Markdown, covering nine Korean government documents and 29 arXiv papers.
  • 03The GitHub repository provides the bilingual project overview, evaluation figures, example output, citation record and Apache 2.0 license.
  • 04The current public file lists do not include the full 2,667-sample training split, teacher-generation outputs, judge records, 564 retrieval queries or per-query retrieval results. The released numbers can be inspected against the cards and held-out pages, but the complete training-and-retrieval chain is not a clean-room reproduction package.
12Limitations

Where the claim stops

  • L01Training and evaluation cover Korean government documents and English academic papers; other languages and document domains may perform differently.
  • L02Pseudo-labels come from one 30B teacher, and the text-only 122B judge is not cross-validated against human or image-based fidelity judgments.
  • L03Formula CDM remains below the teacher, 5.8% of OmniDocBench pages are skipped and the released model card reports sensitivity below 200 DPI.
  • L04The 564-query result belongs to one generated query set, semantic chunker, BGE-M3 embedder and FAISS retrieval configuration.
  • L05The published training run does not isolate every hyperparameter, and the v1/v2 skip comparison is confounded by different tensor-parallel footprints.
  • L06Single-GPU serving is demonstrated as a deployment mode, but no controlled latency, throughput, energy or total-cost comparison with the 30B teacher is published.
  • L07Public weights and the 294-page benchmark support inspection and reuse, but the full training set and per-query retrieval artifacts are not part of the current public file lists.