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.
Instructions to use 13fragments/doc-decision-0.8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 13fragments/doc-decision-0.8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="13fragments/doc-decision-0.8b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("13fragments/doc-decision-0.8b") model = AutoModelForMultimodalLM.from_pretrained("13fragments/doc-decision-0.8b", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 13fragments/doc-decision-0.8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "13fragments/doc-decision-0.8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "13fragments/doc-decision-0.8b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/13fragments/doc-decision-0.8b
- SGLang
How to use 13fragments/doc-decision-0.8b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "13fragments/doc-decision-0.8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "13fragments/doc-decision-0.8b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "13fragments/doc-decision-0.8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "13fragments/doc-decision-0.8b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use 13fragments/doc-decision-0.8b with Docker Model Runner:
docker model run hf.co/13fragments/doc-decision-0.8b
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–2omitted or inserted lines on dense broadsheets or Kurrent manuscripts;fraktur_omit_2linesscores0.538AUROC at1024 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) |
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
Model tree for 13fragments/doc-decision-0.8b
Base model
Qwen/Qwen3.5-0.8B-BaseDatasets used to train 13fragments/doc-decision-0.8b
google/civil_comments
allenai/qasc
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-reported0.935
- Sideways 90 deg CW vs. CCW Top-1 (n=108) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)self-reported0.991
- ICFHR 2016 OOD orientation Top-1 (n=50) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)self-reported1.000
- Kurrent spread accuracy at 0.50 (n=324) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)self-reported0.997
- Fraktur wrong-page AUROC (n=134) on Held-out confirm and ICFHR 2016 OOD (5,613 probes)self-reported0.989

