What it does
TRLoom configures the model, dataset, trainer, Weights & Biases logging and optional Modal GPU execution in one YAML file. Users then run one command, such as trloom run sft.yaml. TRLoom says that wiring model loading, datasets, trainer configs, logging and remote compute in TRL usually means writing a custom script every time. TRLoom keeps those settings in one configuration instead. The example configuration sets the method to sft, uses the model Qwen/Qwen2.5-0.5B-Instruct with PEFT enabled, and loads the trl-lib/Capybara dataset. It also sets the training output directory, learning rate and number of epochs. TRLoom is installed with pip install trloom.
Capabilities
- TRLoom discovers trainers from the installed TRL version, including SFT, DPO, GRPO, KTO, Reward, RLOO and experimental methods.
- Datasets can come from Hub repos, local files, saved datasets directories or mixtures.
- Weights & Biases logging can be enabled and configured from YAML.
- The same YAML file can run on remote GPUs through Modal, with volume-backed outputs.
- Jobs can run through the trloom run command or through FineTuneJob.from_yaml(...) in the Python API.
When to use it
- You want to run a Hugging Face TRL fine-tuning job without writing a custom script each time.
- You want model, dataset, training arguments, Weights & Biases and Modal settings kept in one YAML file.
- You want to run the same YAML configuration on remote GPUs through Modal.