Skip to content
Back to skills

Trlx

ASecurity

"Guides trlX LLM post-training, RLHF, Accelerate, configuration,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
businesspythongobashnodeapibackend

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 16 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill trlx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Trlx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Trlx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-trlx/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-trlx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: trlx
description: "Guides trlX LLM post-training, RLHF, Accelerate, configuration,
  sweeps, and optional NeMo/Megatron workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# trlX repo skill

Use this skill when a task involves trlX (`trlx`), the CarperAI Transformer Reinforcement Learning X package for fine-tuning language models with RLHF-style workflows.

## Read this skill for

- `trlx.train` usage, signatures, argument modes, callbacks, and trainer return objects.
- PPO, ILQL, SFT, and RFT post-training recipes for causal or seq2seq language models.
- Reward-function training, reward-labeled sample training, prompt/completion SFT, PEFT, checkpoints, logging, and generation evaluation.
- `TRLConfig`/YAML/default config editing, trainer/method/pipeline matching, optimizer/scheduler names, and data pipeline contracts.
- Hugging Face Accelerate and DeepSpeed launch planning for trlX training scripts.
- Ray Tune sweeps with `python -m trlx.sweep` and trlX dot-path config updates.
- Optional NVIDIA NeMo/Megatron workflows, `.nemo` or rank-sharded checkpoints, and NeMo config wiring.

## Do not use this skill for

- General RL libraries such as Gymnasium, Stable-Baselines3, CleanRL, or Tianshou unless the task explicitly uses trlX.
- Generic NeMo workflows that do not touch trlX trainer/model wrappers.
- Long maintainer benchmark/report workflows that clone branches, run full GPU examples, and publish W&B reports; those were excluded from runtime guidance.
- Training execution itself when dependencies, datasets, credentials, or hardware are unavailable; first use the checks and troubleshooting references.

## Fast route map

| If the task mentions... | Go to |
| --- | --- |
| `trlx.train`, `reward_fn`, `prompts`, `samples`, `rewards`, PPO, ILQL, SFT, RFT, PEFT, checkpoints, Accelerate, DeepSpeed, or sweeps | [training sub-skill](sub-skills/training/SKILL.md) |
| NeMo, Megatron, Apex, `.nemo`, `NeMoPPOTrainer`, `NeMoILQLTrainer`, `NeMoSFTTrainer`, `PPOGPT`, `ILQLGPT`, `SFTGPT`, `mp_rank_XX`, or NeMo YAMLs | [nemo sub-skill](sub-skills/nemo/SKILL.md) |
| Package purpose, install shape, supported algorithms/backends, root route selection, or verified inspection facts | [package overview](references/package-overview.md) |
| Import failures, dependency conflicts, CUDA/DeepSpeed setup, missing NeMo, W&B/Ray import behavior, or launcher environment mismatch | [root troubleshooting](references/troubleshooting.md) |
| Staleness, source commit, package version, evidence paths, or whether to refresh this skill | [repo provenance](references/repo-provenance.md) |

## Minimal install and import check

For full training stacks, use a Python 3.9-3.11 environment. Install a CUDA-capable PyTorch matching the host hardware when GPU training is needed, then install trlX from a public source or a current checkout. A typical source-checkout path is:

```bash
python -m pip install -r requirements.txt
python -m pip install -e .
```

When installing directly from the public repository, install the appropriate PyTorch wheel first because trlX's package metadata does not fully replace the repository's pinned runtime requirements.

After installation, run the bundled safe helper from this skill tree:

```bash
python scripts/check_trlx_install.py
python scripts/check_trlx_install.py --cuda
python scripts/check_trlx_install.py --json
```

The helper imports trlX, prints the `trlx.train` signature, registries, default config summaries, and optionally performs a tiny CUDA allocation. It does not download models or start training.

## Backend notes

- Accelerate-backed trlX APIs and CUDA-capable PyTorch import were verified for this skill's source snapshot.
- NeMo/Apex/Megatron was intentionally not installed in the minimum inspection environment. The NeMo sub-skill is source-backed and must not be treated as verified backend coverage until a NeMo/Apex environment is prepared.
- Many public examples require Hugging Face model/dataset downloads, W&B, Triton, Ray, large GPU memory, or multi-node launchers. The skill distills their patterns instead of making future agents run original source examples.

Files in this skill

  • SKILL.md4.1 KB
  • references/package-overview.md3.7 KB
  • references/repo-provenance.md1.8 KB
  • references/repo-routing-metadata.json552 B
  • references/troubleshooting.md5.2 KB
  • scripts/check_trlx_install.py5.1 KB
  • sub-skills/nemo/SKILL.md2.3 KB
  • sub-skills/nemo/references/configuration.md6.6 KB
  • sub-skills/nemo/references/troubleshooting.md5.4 KB
  • sub-skills/nemo/references/workflows.md7.3 KB
  • sub-skills/training/SKILL.md3.8 KB
  • sub-skills/training/references/api-reference.md11.7 KB
  • sub-skills/training/references/configuration.md10.1 KB
  • sub-skills/training/references/troubleshooting.md11.6 KB
  • sub-skills/training/references/workflows.md17.7 KB
  • sub-skills/training/scripts/inspect_training_config.py11.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.