CoolFace
Apppublic

hugging-apps/padoc-document-parser

sourceHugging Faceupdated 1mo agoView on Hugging Face
0likes
App README

PaDoc: Layout-Grounded Parallel Decoding for Document Parsing

This Space demonstrates [PaDoc](https://huggingface.co/Longin-Yu/PaDoc), an end-to-end document parser that leverages parallel decoding. A single image-text model emits a compact main sequence of layout boxes and starts independent content branches at learned fork tokens — no draft model or additional prediction head is required.

How it works

  1. 1.Upload a document image (or try one of the examples).
  2. 2.Click Parse document — the model predicts layout bounding boxes in [0, 1000] coordinates and decodes a content branch for each region.
  3. 3.The annotated image shows detected regions; the markdown output lists each region's category and extracted text.

Execution modes

  • Sequential (default): batch=1 reference decoding — finishes each branch before resuming the main stream.
  • Parallel: prefills the prompt once, snapshots the parent KV cache at each fork, and advances the main stream plus all active branches together in one lockstep GPU batch.

Model

License

Model weights are under CC-BY-NC-4.0. Example document images are generated for this demo.