Skip to main content
Use this for evals, embeddings-style dumps, synthetic data, or overnight labeling: one cold machine, one model load, many prompts, JSON back. This is not an always-on endpoint. When generate returns, Compute terminates the VM. Public self-service for this guide is MI300X. Stock can be tight. The default model is public, so you do not need a Hub token. Need install and credit first? Install, sign in, then add credit.

Save the file

Save as batch_infer.py:
The decorator sets a 30-minute kill limit. That covers image install plus a small public model. Raise --timeout if the prompt list is large; the maximum is 24 hours.

Dry-run, then run

The homepage command is the same entrypoint without --wait --yes. Pass your own list:
You pay for the minutes the machine exists, including load time, not per token. See Billing.

What you get back

JSON with generations (prompt + text) and timing. This is the result — there is no leftover inference server. If create is refused, send the request id to Support.

Fine-tune a model

Supervised LoRA when labels exist.

Reinforcement learning

Improve outputs from a reward signal.