slime RL Post-Training
Orchestra-Research/AI-Research-SKILLs
Guides reinforcement-learning post-training of LLMs with slime, which pairs Megatron-LM training with SGLang rollouts, including GRPO runs on GLM, Qwen3 and Llama 3 models.
SFT training reference for the ART framework. An agent skill from OpenPipe/ART.
$ npx skills add OpenPipe/ART --skill train-sft -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install OpenPipe/ART train-sft --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/OpenPipe/ART.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/train-sft .claude/skills/train-sft && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "train-sft" agent skill from https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sft into .claude/skills/train-sft/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "train-sft", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sftType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add OpenPipe/ART --skill train-sft -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install OpenPipe/ART train-sft --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenPipe/ART.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/train-sft .agents/skills/train-sft && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "train-sft" agent skill from https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sft into .agents/skills/train-sft/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "train-sft", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OpenPipe/ART --skill train-sft -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install OpenPipe/ART train-sft --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenPipe/ART.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/train-sft .cursor/skills/train-sft && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "train-sft" agent skill from https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sft into .cursor/skills/train-sft/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "train-sft", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/OpenPipe/ART.git --path .agents/skills/train-sft--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add OpenPipe/ART --skill train-sft -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install OpenPipe/ART train-sft --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenPipe/ART.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/train-sft .gemini/skills/train-sft && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "train-sft" agent skill from https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sft into .gemini/skills/train-sft/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "train-sft", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install OpenPipe/ART train-sftInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add OpenPipe/ART --skill train-sft -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/OpenPipe/ART.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/train-sft .github/skills/train-sft && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "train-sft" agent skill from https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sft into .github/skills/train-sft/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "train-sft", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add OpenPipe/ART --skill train-sft -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install OpenPipe/ART train-sft --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/OpenPipe/ART.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/train-sft .opencode/skills/train-sft && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "train-sft" agent skill from https://github.com/OpenPipe/ART/tree/main/.agents/skills/train-sft into .opencode/skills/train-sft/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "train-sft", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
train-sftSFT training reference for the ART framework. An agent skill from OpenPipe/ART.
Train Sft is an agent skill from OpenPipe/ART. SFT training reference for the ART framework. Use when the user asks to create, write, or help with an SFT training script, fine-tune a model, train from a JSONL dataset, do distillation, or anything related to supervised fine-tuning.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Fine-tuning. It works with Qwen. The repository describes itself as: Agent Reinforcement Trainer: train multi-step agents for real-world tasks using GRPO. Give your agents on-the-job training. Reinforcement learning for Qwen3.6, GPT-OSS, Llama… The licence is Apache-2.0.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 12162f2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
uvFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
wandb.aiFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
WANDB_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Train Sft loads about 2.9k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 876 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from OpenPipe/ART at commit 12162f2, republished under its Apache-2.0 licence (© OpenPipe). 876 words, ~2,897 tokens.
.claude/skills/train-sft/SKILL.md (or your agent's skills folder).You are guiding the user through setting up Supervised Fine-Tuning (SFT) for a language model using the ART framework. Act as an interactive wizard: ask questions, validate inputs, and generate a complete runnable script.
Important: Ask ONE question at a time. Wait for the user's response before asking the next question. Never bundle multiple questions into a single message.
Adaptability note: Some steps reference tools like AskUserQuestion, Glob, or Bash. If you don't have access to these tools, simply ask the user the same questions as plain text and skip any steps that require running code (e.g., file search, dataset validation, hyperparameter computation). Do NOT fabricate results — never pretend you ran a tool or searched for files when you didn't.
Ask the user ONE question at a time. Wait for their response before moving to the next question.
Training scenario:
Backend:
IMPORTANT: Do NOT assume a dataset. Do NOT make up or hallucinate file paths. Never pretend you searched for files if you didn't actually run a search tool.
If you have access to file system tools (Glob) and can actually execute them, search for .jsonl files using Glob (**/*.jsonl). Present real results as options. Always include "Provide my own file path" as the last option.
Otherwise, ask the user: "What is the path to your JSONL training file?" — nothing more.
Once the user has provided a file path, validate it if you can run code using the script below. If you cannot run code, skip validation and move on.
import json, sys
ROLES = {"system", "user", "assistant", "developer", "tool", "function"}
errors = []
for i, line in enumerate(open(sys.argv[1]), 1):
try:
r = json.loads(line)
msgs = r.get("input", r).get("messages", [])
assert isinstance(msgs, list) and msgs, "no messages"
for j, m in enumerate(msgs):
assert m.get("role") in ROLES, f"messages[{j}]: invalid role {m.get('role')!r}"
assert m.get("content") or m.get("function_call") or m.get("tool_calls"), f"messages[{j}]: no content"
if "input" not in r:
assert msgs[-1]["role"] == "assistant", "last message must be from assistant"
tools = r.get("tools")
if tools is not None:
assert isinstance(tools, list), "tools must be a list"
except Exception as e:
errors.append(f" Line {i}: {e}")
print(f"{len(errors)} error(s):\n" + "\n".join(errors) if errors else f"Valid! {i} rows")
sys.exit(1 if errors else 0)The JSONL format supports these fields per row:
messages (required): List of chat messagestools (optional): List of tool/function definitions for tool-call trainingresponse_format (optional): Structured output schema (not used during training, but useful as metadata)Report the row count and validation result to the user. Do NOT read the whole dataset file. Do NOT name the dataset. If the format is wrong, help them fix it or convert their data.
Do NOT ask the user to review or confirm their answers after collecting them — just proceed to the next step.
OpenPipe/Qwen3-14B-InstructQwen/Qwen3-30B-A3B-Instruct-2507meta-llama/Llama-3.1-8B-Instructsft-project)agent-001, pii-redactor-001, math-tutor-001). Ask the user for a meaningful name. Do NOT generate random names.For distillation also ask:
This step only applies if you can run code AND know the row count from validation. If you cannot run code, skip this step entirely — do NOT make up or guess hyperparameter values. The train_sft_from_file function has sensible built-in defaults.
Run this Python snippet via Bash to compute defaults (replace NUM_ROWS with the actual row count). Do NOT show any formulas or calculation steps to the user — only show the final values.
import math, sys
n = int(sys.argv[1])
epochs = max(1, min(10, round(10000 / n)))
batch_size = 2
total_steps = math.ceil(n * epochs / batch_size)
steps_per_epoch = math.ceil(n / batch_size)
warmup_steps = max(10, min(1000, round(steps_per_epoch * 0.05)))
warmup_ratio = round(warmup_steps / total_steps, 4)
print(f"epochs={epochs} batch_size={batch_size} lr=2e-4 schedule=linear warmup_ratio={warmup_ratio}")Present the output values to the user, then ask:
If they choose "Customize", ask which parameters to change.
Use the same defaults computation as JSONL (replace NUM_ROWS with the number of trajectories). create_sft_dataset_iterator handles the LR schedule automatically.
Write a complete, runnable Python script. Use the patterns below. Every script MUST:
await backend.close() at the end so the process doesn't hangbackend.close()): # --- Training complete ---
step = await model.get_step()
inference_name = model.get_inference_name()
client = model.openai_client()
print("\n" + "=" * 60)
print("SFT TRAINING COMPLETE")
print("=" * 60)
print(f" Model: {inference_name}")
print(f" Base model: <BASE_MODEL>")
print(f" Training step: {step}")
print(f" Inference URL: {client.base_url}")
print(f" W&B run: https://wandb.ai/<YOUR_TEAM>/<PROJECT_NAME>/runs/<RUN_NAME>")
print("=" * 60)
print("\n--- Python usage (openai SDK) ---\n")
print(f'''\
from openai import OpenAI
client = OpenAI(
base_url="{client.base_url}",
api_key="not-needed",
)
response = client.chat.completions.create(
model="{inference_name}",
messages=[
{{"role": "user", "content": "Your prompt here"}},
],
)
print(response.choices[0].message.content)
''')
print("--- curl usage ---\n")
print(f'''\
curl {client.base_url}chat/completions \\
-H "Content-Type: application/json" \\
-d '{{
"model": "{inference_name}",
"messages": [
{{"role": "user", "content": "Your prompt here"}}
]
}}'
''')
await backend.close()Use the appropriate backend based on the user's choice:
LocalBackend:
from art.local import LocalBackend
backend = LocalBackend()
model = art.TrainableModel(
name="<RUN_NAME>",
project="<PROJECT_NAME>",
base_model="<BASE_MODEL>",
_internal_config=art.dev.InternalModelConfig(
engine_args={"gpu_memory_utilization": 0.7},
),
)
await model.register(backend)ServerlessBackend:
from art.serverless.backend import ServerlessBackend
backend = ServerlessBackend() # uses WANDB_API_KEY env var
model = art.TrainableModel(
name="<RUN_NAME>",
project="<PROJECT_NAME>",
base_model="<BASE_MODEL>",
)
await model.register(backend)Note: _internal_config with gpu_memory_utilization is only used with LocalBackend. Do NOT include it for ServerlessBackend.
If hyperparameters were computed in Step 5, pass them explicitly. If Step 5 was skipped, omit them — train_sft_from_file has sensible defaults.
"""SFT training script generated by /train-sft wizard."""
import asyncio
import art
<BACKEND_IMPORT>
from art.utils.sft import train_sft_from_file
async def main():
<BACKEND_SETUP>
await train_sft_from_file(
model=model,
file_path="<FILE_PATH>",
# Only include these if hyperparameters were computed:
# epochs=<EPOCHS>,
# batch_size=<BATCH_SIZE>,
# peak_lr=<PEAK_LR>,
# schedule_type="<SCHEDULE_TYPE>",
# warmup_ratio=<WARMUP_RATIO>,
verbose=True,
)
# ... post-training block + backend.close() ...
if __name__ == "__main__":
asyncio.run(main())"""Distillation SFT script generated by /train-sft wizard."""
import asyncio, os
from dotenv import load_dotenv
from openai import AsyncOpenAI
import art
<BACKEND_IMPORT>
from art.utils.sft import create_sft_dataset_iterator
load_dotenv()
async def main():
teacher_client = AsyncOpenAI(
api_key=os.environ["<API_KEY_ENV_VAR>"],
base_url="<TEACHER_API_BASE>",
)
prompts = ["<PROMPT_1>", "<PROMPT_2>"]
trajectories = []
for prompt in prompts:
completion = await teacher_client.chat.completions.create(
model="<TEACHER_MODEL>",
messages=[{"role": "user", "content": prompt}],
)
trajectories.append(
art.Trajectory(
messages_and_choices=[
{"role": "user", "content": prompt},
{"role": "assistant", "content": completion.choices[0].message.content},
],
tools=<TOOLS_OR_NONE>,
)
)
<BACKEND_SETUP>
for chunk in create_sft_dataset_iterator(
trajectories,
epochs=<EPOCHS>,
batch_size=<BATCH_SIZE>,
peak_lr=<PEAK_LR>,
schedule_type="<SCHEDULE_TYPE>",
warmup_ratio=<WARMUP_RATIO>,
):
await model.train_sft(chunk.trajectories, chunk.config, verbose=True)
# ... post-training block + backend.close() ...
if __name__ == "__main__":
asyncio.run(main())sft_train.py)uv run python <script_path>gpu_memory_utilization in the existing _internal_config (e.g. from 0.7 to 0.5).nvidia-smi to check, and if needed kill leftover processes with kill <pid> to free memory.WANDB_API_KEY environment variable.© OpenPipe, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/train-sft of OpenPipe/ART.
Open the folder on GitHubat commit 12162f2
Train Sft next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Train Sft this skillOpenPipe/ART | 11k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| slime RL Post-TrainingOrchestra-Research/AI-Research-SKILLs | 13k | 5 repos | ~2.8k | Automated safety check: Pass | MIT | |
| Finetuning Model Onboardingovermind-core/overmind | 544 | — | ~3.1k | Automated safety check: Pass | AGPL-3.0 | |
| Qwen21sorryhyun/anima_lora | 125 | — | ~1.9k | Automated safety check: Notes | MIT | |
| LlamafactoryPrism-Shadow/penguin-harness | 2.5k | — | ~855 | Automated safety check: Pass | Apache-2.0 | |
| Flux Txt2imgartokun/comfyui-mcp | 793 | — | ~3k | Automated safety check: Pass | MIT |
Orchestra-Research/AI-Research-SKILLs
Guides reinforcement-learning post-training of LLMs with slime, which pairs Megatron-LM training with SGLang rollouts, including GRPO runs on GLM, Qwen3 and Llama 3 models.
overmind-core/overmind
Rules for adding a new model or model family to the finetuning pipeline, or changing finetuning behavior for an existing one — engine-agnostic customization via family hooks instead of if/else in…
sorryhyun/anima_lora
Qwen-Image-2.1 LoRA line (NOT Anima) — running cache/train through the daemon, make gui-qwen, the CacheRequest/TrainRequest flag surface and how to add a field, model-dir resolution, cache layout…
Prism-Shadow/penguin-harness
Fine-tune LLMs with LlamaFactory — register datasets, train via YAML configs, merge LoRA adapters and serve the result.
artokun/comfyui-mcp
Build Flux txt2img workflows with Flux.1 Dev (SRPO), Flux 2 Klein 9B, Turbo LoRAs, FluxGuidance, and DualCLIPLoader patterns
artokun/comfyui-mcp
Build Qwen Image Edit workflows covering model loading, conditioning, LoRAs, prompt patterns, and XY plot testing
OpenPipe/ART
Fix a GitHub issue on OpenPipe/ART and open a PR. An agent skill from OpenPipe/ART.
OpenPipe/ART
RL training reference for the ART framework. An agent skill from OpenPipe/ART.
Works with
Categories
SFT training reference for the ART framework. An agent skill from OpenPipe/ART. Train Sft is an agent skill from OpenPipe/ART. SFT training reference for the ART framework.
Train Sft fits situations like: the user asks to create; help with an SFT training script; fine-tune a model; train from a JSONL dataset.
Run `npx skills add OpenPipe/ART --skill train-sft -a claude-code`. Or copy the skill folder (.agents/skills/train-sft in OpenPipe/ART) into .claude/skills/train-sft in your project. Claude Code loads it when a task matches its description.
Run `npx skills add OpenPipe/ART --skill train-sft -a codex`. Or copy the skill folder (.agents/skills/train-sft in OpenPipe/ART) into .agents/skills/train-sft in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenPipe/ART --skill train-sft -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/train-sft, .gemini/skills/train-sft, .github/skills/train-sft and .opencode/skills/train-sft in your project.
Going by SKILL.md and its folder, Train Sft needs the command-line tools its instructions call (uv) and credentials named WANDB_API_KEY. Our summary lists: Python 3; A credential in WANDB_API_KEY.
SKILL.md names 1 domain. In commands or code: wandb.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Train Sft is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Train Sft: slime RL Post-Training (Orchestra-Research/AI-Research-SKILLs, 13k stars), Finetuning Model Onboarding (overmind-core/overmind, 544 stars), Qwen21 (sorryhyun/anima_lora, 125 stars) and Llamafactory (Prism-Shadow/penguin-harness, 2.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
OpenPipe (a GitHub organization) maintains it in OpenPipe/ART, which has 10,786 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 5, 2026.
Source: OpenPipe/ART on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.