Skip to main content
Use this when a public instruct model already works, but misses your tone, format, or domain. The run trains a LoRA adapter for a few steps and returns JSON metrics. The machine is gone when the function returns — adapters written under /tmp are not downloaded. Public self-service for this guide is MI300X. Stock can be tight. A 70B dense model can fit in 192 GB; the copy-paste below uses a small public model so the first run finishes. Need install and credit first? Install, sign in, then add credit.

Save the file

Save as mi300x_lora_finetune.py:
The decorator sets a 30-minute kill limit. That overrides the CLI’s 10-minute default. Image pull plus model download can use most of that budget on a one-step smoke.

Dry-run, then run

The homepage command is the same entrypoint without --wait --yes. Without --wait, the CLI prints a run id and exits; use compute logs <run_id> -f later. Defaults are one training step on 16 Alpaca rows. To do more work:
--timeout may go up to 24 hours. You are billed for started minutes while the machine exists. See Limits and Billing.

What you get back

JSON with train_loss, step counts, and the device name. There is no checkpoint-resume API and no artifact download in v0.1. If create is refused, send the request id to Support.

Reinforcement learning

Reward-driven LoRA (GRPO) on the same SKU.

Batch inference

Generate over a prompt list and return the texts.