TRL Jobs.
Project description
TRL Jobs
A convenient wrapper around hfjobs for running TRL (Transformer Reinforcement Learning) specific workflows on Hugging Face infrastructure.
Installation
pip install trl-jobs
Quick Start
trl-jobs sft --model_name Qwen/Qwen3-0.6B --dataset_name trl-lib/Capybara
Available Commands
For now only SFT (Supervised Fine-Tuning) is supported.
SFT (Supervised Fine-Tuning)
trl-jobs sft --flavor a100-large --model_name Qwen/Qwen3-0.6B --dataset_name trl-lib/Capybara
Required Arguments
--model_name: Model name (e.g.,Qwen/Qwen3-0.6B)--dataset_name: Dataset name (e.g.,trl-lib/Capybara)
Optional Arguments
--flavor: Hardware flavor (default:a100-large)-d, --detach: Run job in background and print job ID--token: Hugging Face access token
and any other arguments supported by trl sft. Please refer to the TRL documentation
Supported Configurations
OpenAI GPT-OSS with PEFT
| Model | Maximum context length | # of tokens per effective batch size | Command |
|---|---|---|---|
| openai/gpt-oss-20b | TODO | TODO | trl-jobs sft --model_name openai/gpt-oss-20b --peft --dataset_name ... |
Meta LLaMA 3
| Model | Maximum context length | # of tokens per effective batch size | Command |
|---|---|---|---|
| meta-llama/Meta-Llama-3-8B | 4096 | 262144 | trl-jobs sft --model_name meta-llama/Meta-Llama-3-8B --dataset_name ... |
| meta-llama/Meta-Llama-3-8B-Instruct | 4096 | 262144 | trl-jobs sft --model_name meta-llama/Meta-Llama-3-8B-Instruct --dataset_name ... |
Meta LLaMA 3 with PEFT
| Model | Maximum context length | # of tokens per effective batch size | Command |
|---|---|---|---|
| meta-llama/Meta-Llama-3-8B | 24576 | TODO | trl-jobs sft --model_name meta-llama/Meta-Llama-3-8B --peft --dataset_name ... |
| meta-llama/Meta-Llama-3-8B-Instruct | 24576 | TODO | trl-jobs sft --model_name meta-llama/Meta-Llama-3-8B-Instruct --peft --dataset_name ... |
Qwen3
| Model | Maximum context length | # of tokens per effective batch size | Command |
|---|---|---|---|
| Qwen/Qwen3-0.6B | 32768 | 65536 | trl-jobs sft --model_name Qwen/Qwen3-0.6B --dataset_name ... |
| Qwen/Qwen3-1.7B | 24576 | 98304 | trl-jobs sft --model_name Qwen/Qwen3-1.7B --dataset_name ... |
| Qwen/Qwen3-4B | 20480 | 163840 | trl-jobs sft --model_name Qwen/Qwen3-1.7B --dataset_name ... |
| Qwen/Qwen3-8B | 4096 | 262144 | trl-jobs sft --model_name Qwen/Qwen3-8B --dataset_name ... |
Qwen3 with PEFT
| Model | Maximum context length | # of tokens per effective batch size | Command |
|---|---|---|---|
| Qwen/Qwen3-8B | 24576 | TODO | trl-jobs sft --model_name Qwen/Qwen3-8B --peft --dataset_name ... |
| Qwen/Qwen3-14B | 20480 | TODO | trl-jobs sft --model_name Qwen/Qwen3-14B --peft --dataset_name ... |
| Qwen/Qwen3-32B | 4096 | TODO | trl-jobs sft --model_name Qwen/Qwen3-32B --peft --dataset_name ... |
Authentication
You can provide your Hugging Face token in several ways:
- Using
huggingface-hublogin:huggingface-cli login - Setting the
HF_TOKENenvironment variable - Using the
--tokenargument
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Run command to check and format code:
ruff check . --fix && ruff format . --line-length 119
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trl_jobs-0.1.9.tar.gz.
File metadata
- Download URL: trl_jobs-0.1.9.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6707c64beeeb1f177ee207c963405b4ee7c80d952aefba6a3e47c8b539c7f4a
|
|
| MD5 |
56db798e73cd9ba019c915d98b0a1678
|
|
| BLAKE2b-256 |
4196b01f37e755c0eff2ac5d198fa23716da9b2e130f2a77cfc613b0e6945b79
|
File details
Details for the file trl_jobs-0.1.9-py3-none-any.whl.
File metadata
- Download URL: trl_jobs-0.1.9-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
271deb2efc582edff426be94d11a177259579b6f9d55c590e52457af0f3b31ee
|
|
| MD5 |
13d7481f770bf95ba17fa6f8b73fa492
|
|
| BLAKE2b-256 |
914f834c27eb273bb01d8fb90783b50a15bf1e869f4cb90a4181695bfd776f8d
|