CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

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 model training. Use when need RLHF, align model with preferences, or train from human feedback. Works with HuggingFace Transformers. Also covers GRPO with TRL and SimPO (guides in references/).

Quality

85%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

68%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is highly actionable with complete, executable code for all major TRL methods plus CLI alternatives and concrete troubleshooting. Its weaknesses are moderate redundancy (checklist blocks, quick-start/workflow duplication) and uneven validation — one workflow's evaluation step is promised but missing and another has none. Progressive disclosure is solid, with verified, well-signaled reference files carrying the advanced material.

Suggestions

Remove the 'Copy this checklist' blocks (or the immediately following step headers) — they duplicate the same step list twice per workflow and cost tokens without adding guidance.

Add the missing Step 4 evaluation content to Workflow 2 (its checklist promises 'Evaluate alignment' but no section follows) and an evaluation step to Workflow 3, ideally with a concrete check (e.g., reward-trend inspection via logging_steps or a generation comparison) rather than generate-and-print.

Trim the Quick start to minimal pointer snippets since Workflows 1–2 immediately restate the SFT/DPO code in full, and drop noise comments like '# Load model' and '# Train'.

DimensionReasoningScore

Conciseness

Mostly efficient with no concept-teaching padding, but includes repeated overhead: 'Copy this checklist' blocks that duplicate the step headers immediately following them, a Quick start that re-states the SFT/DPO code later shown in full in Workflows 1–2, and obvious comments like '# Load model' and '# Train'. This fits 'mostly efficient but could be tightened' rather than score 2, since there is no explanation of concepts Claude already knows.

3 / 5

Actionability

Fully executable, copy-paste-ready code throughout: complete SFT/reward-model/DPO/GRPO scripts with configs, CLI alternatives ('python -m trl.scripts.ppo ...', 'trl dpo ...'), dataset formats, and concrete troubleshooting snippets (OOM fix, beta tuning). Specific examples cover the common cases for each method, matching anchor 5.

5 / 5

Workflow Clarity

Sequences are clearly numbered with checklists, but validation is weak or missing: Workflow 2's checklist promises 'Step 4: Evaluate alignment' that the body never delivers (it ends at Step 3 + CLI alternative), Workflow 3 (GRPO) has no evaluation step at all, and Workflow 1's 'Evaluate' is just generate-and-print with no success criteria or error-recovery loop. This matches 'steps listed but validation gaps; checkpoints missing or implicit' rather than score 4, where most checkpoints would be present.

3 / 5

Progressive Disclosure

Good structure: core workflows inline, an 'Advanced topics' section with well-signaled one-level-deep references (sft-training.md, dpo-variants.md, reward-modeling.md, online-rl.md — all verified to exist) each with a description of what it covers, plus a clear 'Related tools' table for the merged GRPO/Simpo guides. Not score 5 because the main file is on the heavy side (~450 lines with three full workflows) and the simpo sub-bundle nests a second reference level (simpo/references/*.md), adding a minor organization layer beyond the clean one-level pattern.

4 / 5

Total

15

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is strong across all dimensions: it enumerates concrete capabilities, includes an explicit and natural 'Use when' trigger clause with synonyms, and is firmly niched to TRL. The only nit is slightly rough grammar ('Use when need RLHF') and mild redundancy ('Also covers GRPO with TRL' repeats GRPO), neither of which affects scoring dimensions.

DimensionReasoningScore

Specificity

Lists multiple specific concrete actions with their purposes: 'SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training' — comprehensive coverage of TRL's main methods, matching the anchor-5 example structure. It is not score 4 because coverage of the domain's capabilities is essentially complete rather than having minor gaps.

5 / 5

Completeness

Clearly answers 'what' (fine-tune LLMs with TRL via SFT/DPO/PPO/GRPO/reward-model training) and an explicit 'when': 'Use when need RLHF, align model with preferences, or train from human feedback' with concrete trigger phrases. The 'when' clause is explicit and specific, so it exceeds the score-4 anchor where 'when' could be more specific.

5 / 5

Trigger Term Quality

Natural trigger phrases users would actually say are present with synonyms: 'RLHF', 'align model with preferences', 'train from human feedback', 'fine-tune', plus method names (SFT, DPO, PPO, GRPO). It is not score 4 because both the jargon terms and the natural-language variants ('human feedback' alongside 'RLHF') are covered.

5 / 5

Distinctiveness Conflict Risk

Clear niche (TRL-based preference/RL fine-tuning) with distinct triggers (RLHF, DPO, GRPO, human feedback) that no generic fine-tuning or document skill would claim. Minor overlap with adjacent HuggingFace training skills exists ('Works with HuggingFace Transformers'), but the method-specific triggers keep conflict risk minimal, matching anchor 5.

5 / 5

Total

20

/

20

Passed

Validation

81%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 13 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

relative_links

Relative link issues: 2 deeper-than-1-level

Warning

referenced_paths_exist

Referenced path issues: 4 deeper-than-1-level

Warning

Total

13

/

16

Passed

Repository

OpenLAIR/dr-claw

Path

skills/post-training/trl-fine-tuning/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.