community-fine-tuning-with-trl
Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward…
Skill by ArgentAIOS
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/argentaios-community-fine-tuning-with-trl
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/community-fine-tuning-with-trl
What's inside
- Skill name
community-fine-tuning-with-trl- Description
- Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers.
- License
- MIT
- Instructions
- 466 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: "community-fine-tuning-with-trl" does not match folder "trl-fine-tuning"
Files (7)
- SKILL.md
- dpo-variants.md · references/
- grpo-training.md · references/
- online-rl.md · references/
- reward-modeling.md · references/
- sft-training.md · references/
- basic_grpo_training.py · templates/
SKILL.md (first lines)
# TRL - Transformer Reinforcement Learning
## Quick start
TRL provides post-training methods for aligning language models with human preferences.
**Installation**:
```bash
pip install trl transformers datasets peft accelerate
```
**Supervised Fine-Tuning** (instruction tuning):
```python
from trl import SFTTrainer
trainer = SFTTrainer(
model="Qwen/Qwen2.5-0.5B",
train_dataset=dataset, # Prompt-completion pairs
)
trainer.train()
```
**DPO** (align with preferences):
```python
from trl import DPOTrainer, DPOConfig
config = DPOConfig(output_dir="model-dpo", beta=0.1)
trainer = DPOTrainer(
model=model,
args=config,
train_dataset=preference_dataset, # chosen/rejected pairs
processing_class=tokenizer
)
trainer.train()
```
## Common workflows
### Workflow 1: Full RLHF pipeline (SFT → Reward Model → PPO)
Complete pipeline from base model to human-aligned model.
Copy this checklist:
```
RLHF Training:
- [ ] Step 1: Supervised fine-tuning (SFT)
- [ ] Step 2: Train reward model
- [ ] Step 3: PPO reinforcement learning
- [ ] Step 4: Evaluate aligned model
```
**Step 1: Supervised fine-tuning**
Train base model on instruction-following data:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from trl import SFTTrainer, SFTConfig
from datasets import load_dataset
# Load model
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B")
# Load instruction dataset
dataset = load_dataset("trl-lib/Capybara", split="train")
# Configure training
training_args = SFTConfig(
output_dir="Qwen2.5-0.5B-SFT",
per_device_train_batch_size=4,
num_train_epochs=1,
learning_rate=2e-5,
logging_steps=10,
save_strategy="epoch"
)
# Train
trainer = SFTTrainer(
model=model,
args=training_args,
train_dataset=dataset,
tokenizer=tokenizer
)
trainer.train()
trainer.save_model()
```
**Step 2: Train reward model**
Train model to predict human preferences:
```python
from transformers import AutoModelForSequenceClassification
from trl import RewardTrainer, RewardConfig
# Load SFT model as base
model = AutoModelForSequenceClassification.from_pretrained(
"Qwen2.5-0.5B-SFT",
num_labels=1 # Single reward score
)
tokenizer = AutoTokenizer.from_pretrained("Qwen2.5-0.5B-SFT")
# Load preference data (chosen/rejected pairs)
dataset = load_dataset("trl-lib/ultrafeedback_binarized", split="train")
# Configure training
training_args = RewardConfig(
output_dir="Qwen2.5-0.5B-Reward",
per_device_train_batch_size=2,
num_train_epochs=1,
learning_rate=1e-5
)
# Train reward modelFrom ArgentAIOS/argentos-core, MIT.
More from ArgentAIOS/argentos-core
- 0.528score
argentos-baoyu-comic
ArgentAIOS
Knowledge comic creator supporting multiple art styles and tones.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
argentos-baoyu-infographic
ArgentAIOS
Generate professional infographics with 21 layout types and 21 visual styles.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-serving-llms-vllm
ArgentAIOS
Serves LLMs with high throughput using vLLM's PagedAttention and continuous batching.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-godmode
ArgentAIOS
Jailbreak API-served LLMs using G0DM0D3 techniques — Parseltongue input obfuscation (33 techniques), GODMODE CLASSIC system prompt templates, ULTRAPLINIAN…
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-maps
ArgentAIOS
Location intelligence — geocode a place, reverse-geocode coordinates, find nearby places (46 POI categories), driving/walking/cycling distance + time…
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-segment-anything-model
ArgentAIOS
Foundation model for image segmentation with zero-shot transfer.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-obliteratus
ArgentAIOS
Remove refusal behaviors from open-weight LLMs using OBLITERATUS — mechanistic interpretability techniques (diff-in-means, SVD, whitened SVD, LEACE, SAE…
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
argentos-fine-tuning-with-trl
ArgentAIOS
Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward…
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-ideation
ArgentAIOS
Generate project ideas through creative constraints.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-baoyu-infographic
ArgentAIOS
Generate professional infographics with 21 layout types and 21 visual styles.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-baoyu-comic
ArgentAIOS
Knowledge comic creator supporting multiple art styles and tones.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
argentos-ideation
ArgentAIOS
Generate project ideas through creative constraints.
SkillCFreshness: C★ 127Claude Code +9
Signals
- Stars
- 127
- Forks
- 23
- Open issues
- 25
- Last commit (this folder)
- Apr 27, 2026 (6 months ago)
- Last release
- Jul 9, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ArgentAIOS/argentos-core
- Website
- argentos.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ArgentAIOS
- 0.528score
community-ideation
ArgentAIOS
Generate project ideas through creative constraints.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-obliteratus
ArgentAIOS
Remove refusal behaviors from open-weight LLMs using OBLITERATUS — mechanistic interpretability techniques (diff-in-means, SVD, whitened SVD, LEACE, SAE…
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-baoyu-infographic
ArgentAIOS
Generate professional infographics with 21 layout types and 21 visual styles.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
argentos-fine-tuning-with-trl
ArgentAIOS
Fine-tune LLMs using reinforcement learning with TRL - SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward…
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-baoyu-comic
ArgentAIOS
Knowledge comic creator supporting multiple art styles and tones.
SkillCFreshness: C★ 127Claude Code +9 - 0.528score
community-serving-llms-vllm
ArgentAIOS
Serves LLMs with high throughput using vLLM's PagedAttention and continuous batching.
SkillCFreshness: C★ 127Claude Code +9
Cite this page
community-fine-tuning-with-trl skill. Agent Mart. https://agentmart.dev/skills/argentaios-community-fine-tuning-with-trl (last updated 2026-10-24)