Reads a whole page Image end-to-end with an OCR-free Donut encoder-decoder and decodes the document type directly, emitting a single Classification whose confidence is the mean per-token probability of the generated label.
Typical backends
Triage page images from a file source and publish the document type as JSON.
Classify pages rasterized from a PDF source so multi-page documents can be typed per page.
Caveats
- I/O contractExactly one verdict is produced per page; the model decodes a single class token, so there is no ranked list of alternative types.
- Parameter interactionThe checkpoint and the decoder start token must agree, because the start token selects the fine-tuned classification head and has to be the one the checkpoint was trained with.
- AccuracyConfidence is the mean per-token softmax probability of the decoded sequence, which is a real signal but not a calibrated class posterior.
- FallbackRequesting a GPU on a host with none falls back to CPU, where per-page latency rises sharply.
- Hard constraintOne page is classified per call, and each input is clamped to a bounded pixel range before inference so very large or degenerate images do not blow up the pre-resize step; multi-page PDFs must be split into per-page images upstream.