A tiny model that reads diagrams, packaged for llama.cpp. It runs on a CPU or a GPU, and you don't need Python to run it.
Show it a flowchart, a UML diagram, a BPMN process or a logic circuit, hand-drawn or digital. It writes every box, label and arrow as DGM, a compact text format that converts losslessly to JSON, YAML or XML.
Tadpole's answer for a photo of a hand-drawn BPMN diagram (hdBPMN test split, CC BY 4.0), with its boxes drawn back onto the photo.
| File | Size | Use |
|---|---|---|
tadpole-0.8b-Q4_K_M.gguf |
529 MB | smallest; recommended |
tadpole-0.8b-Q8_0.gguf |
812 MB | near-lossless |
tadpole-0.8b-bf16.gguf |
1.5 GB | reference quality |
mmproj-tadpole-0.8b-f16.gguf |
205 MB | vision encoder; needed with every size |
These were measured on 60 validation images. Quantization costs essentially nothing:
You need llama.cpp b11577 or newer, for Qwen3.5 support.
llama-mtmd-cli -hf Srinjoy99/tadpole-0.8b-GGUF:Q4_K_M --jinja \
--image diagram.png -p "Convert this diagram to DGM." \
--temp 0 -n 1536 --image-min-tokens 64 --image-max-tokens 1225
-m tadpole-0.8b-Q4_K_M.gguf --mmproj mmproj-tadpole-0.8b-f16.gguf instead of -hf.--jinja turns it on.-ngl 99.-p "Convert this diagram to DGM with boxes.".Example answer for a hand-drawn UML activity diagram:
diagram activity dir=TB
node n1 initial
node n2 action "Sign Contract"
node n3 fork
node n4 action "IT: Provision Laptop"
...
edge n3 n4
edge n3 n5
edge n3 n6
...
To get JSON, YAML or XML, use the converter from the GitHub repo:
python -m diagram_ir convert diagram.dgm --to json,yaml,xml -o exports/
Test-set edge F1 is 0.846 and node F1 is 0.930 over 580 images from 12 sources. Per-source results are on the main model card. The weakest areas are large logic circuits (11 or more gates) and arrows into collapsed pools in hand-drawn BPMN.
Apache-2.0. The training data and its attribution are listed on the main model card.
Srinjoy99/tadpole-0.8b