Image-Text-to-Text
Transformers
Safetensors
qwen3_5
decision-model
system-one
flide
ocr
pdf
document-understanding
hf_jobs
conversational
davanstrien HF Staff commited on
Commit
3cbbad7
·
verified ·
1 Parent(s): 7924d24

Add OmniDocBench/historic/paraphrase evals and L4 vs RTX PRO 6000 throughput tables

Browse files
Files changed (1) hide show
  1. README.md +44 -6
README.md CHANGED
@@ -83,13 +83,50 @@ Evaluated on real embedded `pypdfium2` text layers compared against VLM OCR grou
83
  | — `missing` text layer vs. clean | 0.679 | **0.998** | — |
84
  | — `partial` text layer vs. clean | 0.472 | **0.658** | — |
85
 
86
- ### 4. Throughput
87
 
88
- Measured on a single NVIDIA RTX PRO 6000 via `flide serve` (which shares the image + `<state>` prefix across all questions on a page via `ForkAttention`):
89
 
90
- - **Pre-OCR triage** (~9 questions/page, 1,088 pages): **14.8 pages/sec**
91
- - **31-question curation batch** (851 pages × 31 questions = 26,381 decisions): **5.4 pages/sec** (169 decisions/sec)
92
- - **Full-page OCR verification** (1 question + full page image + transcription): **7.4–30 pages/sec** depending on transcription length
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
  ## Usage
95
 
@@ -208,7 +245,8 @@ print({"yes": round(probs[0], 4), "no": round(probs[1], 4)})
208
  ## Limitations
209
 
210
  - **Single-page scope:** evaluates one page image (plus optional transcription) at a time; it does not compare across pages or generate transcriptions/bounding boxes.
211
- - **Partial omissions on dense or non-Latin pages:** detects missing text layers (`0.998`) and large dropped blocks reliably, but subtle 5–15% partial omissions remain harder (`0.658` on modern PDF partial text layers, `0.823` overall on 19th-century books).
 
212
  - **Handwriting & script balance:** historical manuscript training data is weighted toward 19th-century Latin-script archival letters and Ukrainian Cyrillic; `hand` top-1 accuracy on held-out archives is `0.642`, and Greek/Hebrew/Devanagari coverage is thin.
213
  - **Calibration for downstream linear heads:** `calibration.json` sets `noul` temperature `T=2.5` so probabilities remain well-spread rather than saturating near 0/1; if you load the weights outside `flide`, apply `T=2.5` to `noul` slot logits when using probabilities as continuous features.
214
 
 
83
  | — `missing` text layer vs. clean | 0.679 | **0.998** | — |
84
  | — `partial` text layer vs. clean | 0.472 | **0.658** | — |
85
 
86
+ ### 4. Modern pre-OCR triage & multilingual OCR (`opendatalab/OmniDocBench`, 240 OOD pages, EN + ZH)
87
 
88
+ Evaluated zero-shot on unseen modern layout schemas (English & Chinese academic papers, slides, exams, textbooks, reports, magazines, and newspapers):
89
 
90
+ | Unseen modern triage question | Pos / N | `OneJev1.6-0.8B` (base) AUC / BalAcc | `doc-decision-0.8b` AUC / BalAcc |
91
+ |---|---:|---:|---:|
92
+ | `has_table` | 65 / 240 | 0.992 / 0.961 | **0.996 / 0.959** |
93
+ | `is_chinese` | 133 / 240 | 0.979 / 0.945 | **0.994 / 0.959** |
94
+ | `is_slide` | 30 / 240 | 0.996 / 0.957 | **0.992 / 0.914** |
95
+ | `has_equation` | 40 / 240 | 0.983 / 0.965 | **0.982 / 0.968** |
96
+ | `has_figure` | 105 / 240 | 0.968 / 0.897 | **0.980 / 0.952** |
97
+ | `is_exam_paper` | 30 / 240 | 0.886 / 0.764 | **0.886 / 0.764** |
98
+ | `is_multi_column` | 50 / 240 | 0.748 / 0.682 | **0.852 / 0.781** |
99
+ | `has_footnote` | 46 / 240 | 0.840 / 0.672 | **0.831 / 0.598** |
100
+
101
+ OCR verification on `OmniDocBench` (EN + ZH human-annotated blocks) and harder historic domains (**Chronicling America** dense multi-column newspapers & **BPL Card Catalog** archival cards):
102
+
103
+ | Domain (OOD) | `extra` AUC (base → tuned) | `loop` AUC (base → tuned) | `omission` AUC (base → tuned) |
104
+ |---|---:|---:|---:|
105
+ | `OmniDocBench` — English | 0.290 → **1.000** | 0.957 → **1.000** | 0.519 → **0.837** |
106
+ | `OmniDocBench` — Chinese | 0.452 → **1.000** | 0.978 → **1.000** | 0.568 → **0.816** |
107
+ | BPL Archival Catalogue Cards (57 cards) | 0.163 → **1.000** | 1.000 → **1.000** | 0.438 → **1.000** |
108
+ | Chronicling America Newspapers (48 dense pages) | 0.919 → **1.000** | 0.926 → **1.000** | 0.568 → **0.726** |
109
+
110
+ ### 5. Prompt phrasing robustness
111
+
112
+ Tested across 3–4 unseen natural user phrasings per criterion (including flipped-polarity questions) on BHL and 2026 PDFs:
113
+
114
+ - **`extra`:** `0.980–0.989` AUROC on BHL (`Δ = 0.009`), `1.000` across all 4 phrasings on 2026 PDFs.
115
+ - **`loop`:** `1.000` across all 3 phrasings (including flipped polarity).
116
+ - **`omission`:** `0.820–0.838` on BHL and `0.800–0.826` on 2026 PDFs across casual, standard, and flipped-polarity phrasings. Avoid phrasing omission questions around *"readable printed content"* (which dropped AUROC to `0.62–0.67` by partially overlapping with pre-OCR readability).
117
+
118
+ ### 6. Throughput & cost
119
+
120
+ Measured via `flide serve` (BF16, `max_side=1024`, pre-encoded real 2026 PDF pages with an average OCR text length of 2,076 characters). `flide`'s `ForkAttention` shares the cached image + `<state>` prefix across all questions on a page — asking 9 triage questions instead of 1 adds only **~2.6 ms** at `c=1` on an RTX PRO 6000:
121
+
122
+ | Workload (`flide serve`, BF16, `1024px`) | NVIDIA L4 (24 GB, ~$0.80/hr) | NVIDIA RTX PRO 6000 (96 GB, ~$2.75/hr) |
123
+ |---|---:|---:|
124
+ | **Pre-OCR triage (1 question)** (`c=1` → peak) | 18.8 → **20.6 p/s** (~$10.80 / 1M pages) | 47.3 → **107.1 p/s** (~$7.10 / 1M pages) |
125
+ | **Pre-OCR triage (9 questions: 8 `noul` + 1 `choice`)** | 14.2 → **15.5 p/s** (`139 dec/s`, ~$14.40 / 1M) | 43.5 → **87.5 p/s** (`787 dec/s`, ~$8.70 / 1M) |
126
+ | **OCR verification (3 questions: `extra` + `omission` + `loop`)** | 12.3 → **12.8 p/s** (`38 dec/s`, ~$17.40 / 1M) | 36.2 → **73.1 p/s** (`219 dec/s`, ~$10.40 / 1M) |
127
+ | **Single-page latency (`c=1` p50)** — 1q / 9q / 3q-OCR | 50.5 / 69.0 / 75.1 ms | 19.6 / 22.2 / 26.8 ms |
128
+
129
+ Default **BF16 is recommended**: `--quantize fp8` adds only ~5–6% on RTX PRO 6000 (`92.8 p/s` 9q triage, `76.9 p/s` 3q OCR) with a slight dip on partial omissions (`0.655 → 0.642`), and is ~25% slower than BF16 on L4 due to quantization overhead at 0.8B scale.
130
 
131
  ## Usage
132
 
 
245
  ## Limitations
246
 
247
  - **Single-page scope:** evaluates one page image (plus optional transcription) at a time; it does not compare across pages or generate transcriptions/bounding boxes.
248
+ - **Partial omissions on dense pages:** detects missing text layers (`0.998`) and large dropped blocks reliably across English and Chinese (`0.837` / `0.816`), but subtle 5–15% partial omissions remain harder — especially on dense multi-column historical newspapers (`0.726`), long 19th-century prose pages (`0.823`), and modern tables/spec sheets (`0.658` partial text layers).
249
+ - **Custom `choice` taxonomies vs binary `noul`:** on brand-new document-type taxonomies far from training (e.g. a 6-way modern `OmniDocBench` split), zero-shot `choice` accuracy (`0.600`) lags targeted binary `noul` questions (`0.85–0.996`). For custom modern routing schemas, prefer crisp binary `noul` questions.
250
  - **Handwriting & script balance:** historical manuscript training data is weighted toward 19th-century Latin-script archival letters and Ukrainian Cyrillic; `hand` top-1 accuracy on held-out archives is `0.642`, and Greek/Hebrew/Devanagari coverage is thin.
251
  - **Calibration for downstream linear heads:** `calibration.json` sets `noul` temperature `T=2.5` so probabilities remain well-spread rather than saturating near 0/1; if you load the weights outside `flide`, apply `T=2.5` to `noul` slot logits when using probabilities as continuous features.
252