Skip to content
Back to skills

Inference

ASecurity

"Load Donut checkpoints, build prompts, run single-image inference,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolspythonapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill inference --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inference?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inference
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-inference-8278bb30/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-inference-8278bb30)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: inference
description: "Load Donut checkpoints, build prompts, run single-image inference,
  convert JSON tokens, and launch the Gradio demo."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Inference

Use this sub-skill for one-image Donut inference, prompt selection, JSON token round-trips, and the Gradio demo.

## Route First

- Start with [`references/demo-and-prediction.md`](references/demo-and-prediction.md) for command recipes, prompt templates, image preprocessing behavior, output shapes, and token round-trips.
- Use [`scripts/run_inference.py`](scripts/run_inference.py) for CLI inference and prompt-variant comparison.
- Use [`scripts/launch_demo.py`](scripts/launch_demo.py) for the Gradio demo launcher.
- Use [`references/troubleshooting.md`](references/troubleshooting.md) for model loading, download, prompt-token, CPU/CUDA, and Gradio failures.
- If you need dataset scoring, accuracy, or evaluation over a dataset, route to [`../training/SKILL.md`](../training/SKILL.md).
- If the image came from synthetic generation and the user is actually asking about synthetic-data creation, route to [`../synthdog/SKILL.md`](../synthdog/SKILL.md) instead.
- For the shared package API and cross-cutting troubleshooting, use the parent-tree references (`../../references/api-reference.md` and `../../references/troubleshooting.md`) once the root skill is in place.

## Boundaries

- Include: `DonutConfig`, `DonutModel`, `from_pretrained`, `inference`, `json2token`, `token2json`, prompt/task selection, image preprocessing behavior, CPU/CUDA inference behavior, demo launcher.
- Exclude: training loops, Lightning trainer setup, dataset evaluation metrics, SynthDoG generation.

## Quick Paths

- `python scripts/run_inference.py --help`
- `python scripts/launch_demo.py --help`

## What to do

- Load a local checkpoint or Hub checkpoint with the Donut runtime API.
- Build the exact task prompt the checkpoint expects.
- Run one image at a time, or compare several prompt variants against the same image.
- Convert structured JSON to Donut tokens and back when you need to inspect prompt/output formatting.
- Start the Gradio demo with a local model and a sample image if available.

Files in this skill

  • SKILL.md2.2 KB
  • references/demo-and-prediction.md6.3 KB
  • references/troubleshooting.md4.5 KB
  • scripts/launch_demo.py3.8 KB
  • scripts/run_inference.py5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.