YolowOCR-Suite v2 (BF16)
Clean-room, from-scratch trained BF16 safetensors OCR suite for yolowpdf (yolowpdf-ocr >= 0.2.0), running in pure Rust on CPU or NVIDIA CUDA with zero Python or C++ runtime dependencies.
All five models are initialized from scratch and released under the MIT License.
Models
| Directory | Task | Architecture | Input | Format / Size | Highlights |
|---|---|---|---|---|---|
det_v2/ |
Text Detection | LCNetV4 + RepLKFPN + DB Head | Dynamic (min side 736) | BF16 · 5.05 MB | 2.48M params; drop-in compatible with yolowpdf-ocr::det::Det |
rec_v2_multi/ |
Multilingual Text Recognition | LCNetV4 + 2L SVTR + CTC | 3×48×W |
BF16 · 10.74 MB | 5.29M params, 18,710-char multilingual vocab |
rec_v2_latin/ |
Fast Latin/English Text Recognition | LCNetV4 + 2L SVTR + CTC | 3×48×W |
BF16 · 6.24 MB | 3.05M params, 254-char Latin/math/European vocab |
layout_s_v2/ |
Document Layout Analysis | HGNetV2 + 1L HybridEncoder + 3L 150-Query Deformable Decoder | 640×640 |
BF16 · 26.81 MB | 13.22M params, 25 document classes + reading order (draw_threshold: 0.45) |
formula_v2_rect_mtp/ |
LaTeX Formula Recognition | 8L Rectangular SAM-ViT + 6L mBART Decoder + 4× MTP Heads | 224×672 |
BF16 · 66.99 MB | 34.3M params, 1,842-vocab ByteLevel BPE, lossless MTP-4 self-speculative decoding (~3.1–3.5 ms/token on CPU) |
Total full-suite footprint: 109.59 MB (multilingual) / 105.09 MB (Latin) — 8.1× smaller than the 892 MB upstream FP32 reference stack.
Benchmark Summary (olmOCR-bench, 134 scanned pages)
Measured on one machine (i7-10700, 15 GB RAM, GTX 1070) with yolowpdf 0.2.0 (YOLOWPDF_FAST_MATH=1 scoring). Higher throughput and score are better; lower wall time and peak worker memory are better.
| Configuration | Completed ↑ | Wall s ↓ | Pages/s ↑ | Peak MB ↓ | Score ↑ | No-baseline ↑ |
|---|---|---|---|---|---|---|
yolowpdf-ocr v2 Latin (GPU, text only) |
134/134 | 37.562 | 3.567 | 628.2 | 0.3891 | 0.0837 |
yolowpdf-ocr v2 Multi (GPU, text only) |
134/134 | 46.548 | 2.879 | 665.2 | 0.3897 | 0.0846 |
yolowpdf-ocr v2 Multi (CPU, text only) |
134/134 | 106.580 | 1.257 | 592.7 | 0.3897 | 0.0846 |
yolowpdf-ocr v2 Multi (GPU, layout + formula) |
134/134 | 367.664 | 0.364 | 938.5 | 0.4799 | 0.2199 |
yolowpdf-ocr v2 Multi (CPU, layout + formula) |
134/134 | 388.367 | 0.345 | 831.2 | 0.4799 | 0.2199 |
Quick Start with yolowpdf-ocr
huggingface-cli download YOLOW92/yolowocr-v2 --local-dir ./yolowocr-v2
use std::sync::Arc;
use yolowpdf_ocr::device::Device;
use yolowpdf_ocr::pdf::PdfOcr;
let engine = Arc::new(PdfOcr::from_dirs(
"yolowocr-v2/det_v2".into(),
"yolowocr-v2/rec_v2_multi".into(), // or rec_v2_latin
Some((
"yolowocr-v2/layout_s_v2".into(),
"yolowocr-v2/formula_v2_rect_mtp".into(),
)),
Device::Gpu { index: 0 }, // or Device::Cpu
)?);
Pinned file sizes and SHA-256 digests are also available in yolowpdf_ocr::models::{V2_DET, V2_REC_MULTI, V2_REC_LATIN, V2_LAYOUT, V2_FORMULA}.
License
MIT.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support