multimodalart's picture
multimodalart HF Staff
Upload folder using huggingface_hub
414b4fe verified
|
Raw
History Blame Contribute Delete
1.65 kB
metadata
title: PaDoc Document Parser
emoji: πŸ“„
colorFrom: indigo
colorTo: pink
sdk: gradio
sdk_version: 6.22.0
app_file: app.py
short_description: Parse document layout regions and content with PaDoc
python_version: '3.12'
startup_duration_timeout: 1h

PaDoc: Layout-Grounded Parallel Decoding for Document Parsing

This Space demonstrates 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. Upload a document image (or try one of the examples).
  2. Click Parse document β€” the model predicts layout bounding boxes in [0, 1000] coordinates and decodes a content branch for each region.
  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.