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.
npm install -g badgr-cli then badgr login. Setup guide →Shortcut: badgr train
If you have an Axolotl, Unsloth, or TRL config file, badgr train auto-detects the framework and picks the right image and GPU:
badgr train config.yaml \ --env HF_TOKEN=$HF_TOKEN
Framework is detected from config content. Prefers A100, H100, L40S, or A6000. Use badgr run below for full control over the image and command.
Run a LoRA fine-tune
badgr run . --cmd "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 \ --max-cost 30
Badgr zips your project folder, installs deps, and streams logs. Your finetune.py handles the training loop. Outputs are stored for 48 hours after the job finishes.
Custom image (escape hatch)
For Axolotl, TRL, or LLaMA-Factory with pinned versions, bring your own image:
badgr run . --cmd "python -m axolotl.cli.train config.yml" \ --image winglian/axolotl:main-latest \ --gpu A100 \ --env HF_TOKEN=$HF_TOKEN \ --max-cost 30
Detach for long runs
# Start the job and return immediately badgr run . --cmd "python finetune.py" --gpu A100 --env HF_TOKEN=$HF_TOKEN --max-cost 30 --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 --max-cost 10
Check cost
badgr receipts
Shows provider, GPU hours used, and total cost.
Options
--gpu <type>GPU type: A100, A100_80GB, H100, L40S, A6000. Omit to let Badgr Auto select.--cmd <command>Command to run inside the uploaded project (required for folder/GitHub flows).--image <img>Custom Docker image — bypasses the runner. Mutually exclusive with auto-detection.--env KEY=VALUEEnvironment variable — repeatable (HF_TOKEN, WANDB_API_KEY, etc.)--region US|EU|AURegion preference. Omit for global best-capacity search.--tier 1|21 = managed providers (default), 2 = marketplace budget providers--max-price 3.00Hard hourly cap — won't start if no GPU is under this price--max-cost 50.00Auto-stop when total spend reaches this amount--max-runtime 480Auto-stop after N minutes (recommended for long runs)--detachReturn immediately — use badgr logs <id> to follow training--save <name>Save this job as a workload for re-running with different configs