🐸 Tadpole Nano 258M — GGUF
The baby tadpole, packaged for llama.cpp: a very small model that reads diagrams (flowcharts, UML, BPMN, logic circuits) and writes their boxes, labels and arrows as text that converts to JSON, YAML or XML. It runs on a CPU, and you don't need Python to run it.
Nano is smaller and faster than Tadpole 0.8B, but gets only about half the arrows right. On 580 test images its edge F1 is 0.444, against 0.846 for Tadpole 0.8B. It reads boxes and text well: node F1 0.834. Pick it when size and speed matter most. The full comparison is on the main Nano card.
Files
| File | Size | Use |
|---|---|---|
tadpole-nano-258m-Q8_0.gguf |
178 MB | recommended |
tadpole-nano-258m-bf16.gguf |
332 MB | reference quality |
mmproj-tadpole-nano-258m-f16.gguf |
190 MB | vision encoder; needed with either file |
Measured on 60 validation images:
- Q8_0: edge F1 0.418, against 0.428 for the PyTorch model. Valid output 100%.
- Speed: about 4.8 s per diagram on a desktop CPU (16 threads), including loading the model for each image. Tadpole 0.8B Q4_K_M takes 7.2 s on the same images.
- No Q4 file: quantizing to Q4_K_M dropped edge F1 to 0.27, so it is not provided.
Run it
You need llama.cpp b11577 or newer.
llama-mtmd-cli -hf Srinjoy99/tadpole-nano-258m-GGUF:Q8_0 --jinja \
--image diagram.png -p "Convert this diagram to DGM." --temp 0 -n 1536
- Don't add image-token flags. Unlike Tadpole 0.8B, don't pass
--image-min-tokensor--image-max-tokens. The model reads 512-px tiles at the size stored in the file (longest edge 1536 px), and changing it hurts accuracy. - Prompt template:
--jinjauses the prompt template stored in the file. - Boxes: to get element boxes, use
-p "Convert this diagram to DGM with boxes.". - JSON, YAML or XML: convert the answer with the converter from the GitHub repo:
python -m diagram_ir convert diagram.dgm --to json,yaml,xml -o exports/.
License
Apache-2.0. Base model: Granite-Docling-258M. Training data and attribution are listed on the Tadpole 0.8B card.