Skip to content

Examples

All example configs live in the repository examples/ folder.

Path What it shows
examples/sft_hub.yaml SFT from a Hub dataset with LoRA
examples/sft_local.yaml SFT from local JSONL
examples/sft_formatted.yaml Custom map_fn + user_code bundling
examples/formatters.py Sample formatter callables for YAML import paths
examples/data/sample_sft.jsonl Tiny local chat-style sample
examples/data/sample_instruction.jsonl Instruction/response rows for formatting demos
examples/dpo_wandb.yaml DPO with Weights & Biases
examples/grpo_modal.yaml GRPO on Modal with rewards and secrets
examples/sft_kaggle.yaml SFT notebook / inline run on Kaggle GPUs
examples/modal_smoke/ Complete tiny Modal walkthrough

Run patterns

# Local SFT from the Hub
trloom validate examples/sft_hub.yaml
trloom run examples/sft_hub.yaml

# Local JSONL
trloom run examples/sft_local.yaml

# DPO + W&B (needs trloom[wandb] and wandb login)
trloom run examples/dpo_wandb.yaml

# Tiny Modal smoke (needs trloom[modal] and modal setup)
python -m modal run examples/modal_smoke/run.py
# or
trloom run examples/modal_smoke/config.yaml --modal

# Kaggle notebook export (needs trloom[kaggle] only for API push)
trloom kaggle-notebook examples/sft_kaggle.yaml -o ./kaggle_job/job.ipynb
trloom run examples/sft_kaggle.yaml --kaggle

Suggested learning path

  1. Start with sft_hub.yaml or sft_local.yaml locally
  2. Add W&B using dpo_wandb.yaml as a template
  3. Prove remote execution with modal_smoke/ or sft_kaggle.yaml
  4. Scale up with grpo_modal.yaml (GPU, secrets, rewards)

Keep the first remote run tiny (max_steps, small split, small model) before spending money on a full training job.