hugging-apps/padoc-document-parser
0
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
- Upload a document image (or try one of the examples).
- Click Parse document — the model predicts layout bounding boxes in
[0, 1000]coordinates and decodes a content branch for each region. - 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
- Model: Longin-Yu/PaDoc (Qwen3-VL 2B base)
- Paper: arXiv:2608.06146
- Code: GitHub
License
Model weights are under CC-BY-NC-4.0. Example document images are generated for this demo.
