GPU Compute / Recipe

Fine-tune / LoRA

Run a LoRA fine-tuning job on a GPU without managing infrastructure. Pass your Hugging Face token and dataset, then serve the adapter once training is complete.

Run a LoRA fine-tune

badgr run python finetune.py --gpu A100 \
  --env HF_TOKEN=$HF_TOKEN \
  --env BASE_MODEL=meta-llama/Llama-3.1-8B-Instruct \
  --env DATASET=my-org/my-dataset \
  --env OUTPUT_DIR=/app/output

Your finetune.py handles the training loop. Badgr provides the GPU and streams logs.

Use a training framework image

Use a pre-built image with Axolotl, TRL, or LLaMA-Factory to skip the setup:

badgr run \
  --image winglian/axolotl:main-latest \
  --gpu A100 \
  --env HF_TOKEN=$HF_TOKEN \
  python -m axolotl.cli.train config.yml

Detach for long runs

# Start the job and return immediately
badgr run python finetune.py --gpu A100 --env HF_TOKEN=$HF_TOKEN --detach

# Check progress
badgr logs <deployment-id>

Serve the fine-tuned model

After training, push the adapter to Hugging Face and serve it:

badgr serve my-org/my-finetuned-model --gpu L40S

Check cost

badgr receipts

Shows provider, GPU hours used, and total cost.