Scope
- In scope: Pre-OCR page triage: blank detection, 4-way orientation (
0°, 90° CW, 180°, 90° CCW), two-page spreads, script routing (Kurrent, Fraktur, Antiqua, mixed), scan furniture, and modern layouts. Gross post-OCR checks: loops, page repeats, wrong-page alignment, and major block omission.
- Out of scope: Line-level OCR proofreading (
1–2 omitted or inserted lines on dense broadsheets or Kurrent manuscripts; fraktur_omit_2lines scores 0.538 AUROC at 1024 px). Returns option probabilities, not transcriptions.
Local speed and deployment
GGUF weights live in 13fragments/doc-decision-0.8b-GGUF. GPU confirm scores below use PyTorch BF16 on L40S. Quantized GGUF paths were parity-checked against BF16 on 200 dev probes, not re-scored on the full confirm split.
Table with columns: Backend / artifact, Disk size, Latency (1 decision / 5-task triage), Benchmark or parity status| Backend / artifact | Disk size | Latency (1 decision / 5-task triage) | Benchmark or parity status |
|---|
GGUF Q8_0 + mmproj-bf16 (M1 Pro Metal) | 1.02 GB | 1,220 ms / 3,388 ms | 200/200 (100.0%) vs. BF16 (0.0032 diff) |
GGUF Q8_0 + mmproj-bf16 (M1 Pro CPU) | 1.02 GB | 1,484 ms / 5,895 ms | Same weights; offline CPU-only (--ngl 0) |
GGUF Q4_K_M + mmproj-bf16 (M1 Pro Metal) | 0.74 GB | 1,251 ms / 3,457 ms | 199/200 (99.5%) vs. BF16 (0.0121 diff) |
GGUF Q4_K_M + mmproj-bf16 (M1 Pro CPU) | 0.74 GB | 1,972 ms / 7,878 ms | Same weights; smallest disk footprint |
| PyTorch BF16 (NVIDIA L40S) | 1.71 GB | — / 278 ms (6.3-task KV avg) | Full sealed confirm (5,613 probes) |

Pareto data: CSV · Footprint SVG · Latency SVG.
Usage
Zero-install CLI (triage_docs.py, auto-starts local llama-server with GGUF Q8_0; pass --ngl 0 for CPU):
uv run https://huggingface.co/13fragments/doc-decision-0.8b/resolve/main/triage_docs.py --example --jsonuv run https://huggingface.co/13fragments/doc-decision-0.8b/resolve/main/triage_docs.py input/ --ngl 0 --out report.json
Drop-in with flide (calibrated temperatures T_noul = 0.7, T_choice = 0.8 in calibration.json):
from PIL import Imagefrom flide import DecisionModel model = DecisionModel("13fragments/doc-decision-0.8b")res = model.choose( {"page": Image.open("page.jpg")}, "What is the orientation of the text on this page?", ["upright (0 degrees)", "rotated 90 degrees clockwise", "upside down (180 degrees)", "rotated 90 degrees counter-clockwise"],)print(res.best_option, res.probabilities)
transformers: load with AutoModelForImageTextToText and AutoProcessor (Qwen3_5ForConditionalGeneration).
Scores
Two independent LoRA seeds merged via WiSE-FT (alpha = 1.00), evaluated once in BF16 on 5,613 sealed confirm and outside OOD probes against davanstrien/ocr-decision-0.8b:
Table with columns: Check (sealed confirm / OOD), Stock 0.8B, This model| Check (sealed confirm / OOD) | Stock 0.8B | This model |
|---|
Archival triage macro (5,613 probes) | 0.8335 | 0.9346 |
Sideways 90° CW vs. CCW Top-1 (n = 108) | 0.4907 | 0.9907 |
Outside OOD ICFHR 2016 orientation (n = 50) | 0.6800 | 1.0000 |
Kurrent two-page spread acc@0.50 (n = 324) | 0.7346 | 0.9969 |
Blackletter detection acc@0.50 (n = 277) | 0.9422 | 0.9964 |
Fraktur wrong-page AUROC (gray-null 0.495) | 0.9449 | 0.9890 |
Modern DocLayNet mean AUROC delta (5 tasks) | baseline | +0.0120 |
All 28 tasks, 2,000-draw paired CIs, gray-null checks, and failure cases: eval/RESULTS.md.
Training data
Commercially permissive sources only (Apache-2.0, MIT, CC0, PDM 1.0, CC-BY 4.0, CDLA-Permissive): Kurrent archives, Austrian Newspapers, Reichsanzeiger, BSB DACH-GT, SBB blanks, DocLayNet v1.2, and text replay. Full inventory in PROVENANCE.md and NOTICE.
Collection: Historical German document triage.
Publisher: 13fragments