Run this model with HF Jobs

Run 13fragments/doc-decision-0.8b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/13fragments/doc-decision-0.8b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/13fragments/doc-decision-0.8b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/13fragments/doc-decision-0.8b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/13fragments/doc-decision-0.8b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

doc-decision-0.8b

0.8B document decision model for historical German (Kurrent, Fraktur) and modern PDFs. Drop-in for davanstrien/ocr-decision-0.8b with the same onejev-slot-v2 prompt format. Returns calibrated option probabilities in one forward pass via flide, transformers, or llama.cpp. Licensed under Apache-2.0.

uv run https://huggingface.co/13fragments/doc-decision-0.8b/resolve/main/triage_docs.py --example --json

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.

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)

Accuracy vs. footprint Accuracy vs. latency

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 --json
uv 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 Image
from 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:

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

Downloads last month
21
Safetensors
Model size
0.9B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for 13fragments/doc-decision-0.8b

Finetuned
(1)
this model
Quantizations
1 model

Datasets used to train 13fragments/doc-decision-0.8b

Collection including 13fragments/doc-decision-0.8b

Evaluation results

  • Archival triage macro (2-seed WiSE-FT soup, BF16) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)
    self-reported
    0.935
  • Sideways 90 deg CW vs. CCW Top-1 (n=108) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)
    self-reported
    0.991
  • ICFHR 2016 OOD orientation Top-1 (n=50) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)
    self-reported
    1.000
  • Kurrent spread accuracy at 0.50 (n=324) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)
    self-reported
    0.997
  • Fraktur wrong-page AUROC (n=134) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)
    self-reported
    0.989