Skip to content
Skillpedia
Machine learning15k · #11067

nlp-alignment

What it does

The skill guides how to make a language model behave in line with desired preferences. It is for practitioners doing model alignment or safety work.

When to use it

  • ✓When you want to align a language model with human preferences.
  • ✓When you are choosing between RLHF, DPO, or GRPO.
  • ✓When an alignment training run shows reward hacking, repetition, or lost general ability.

Skill link

https://github.com/aiming-lab/AutoResearchClaw/blob/main/researchclaw/skills/builtin/domain/nlp-alignment/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/aiming-lab/AutoResearchClaw/blob/main/researchclaw/skills/builtin/domain/nlp-alignment/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Should I use DPO or RLHF to align my instruction-tuned model, and what settings should I start with?”

5 new skills a week. 1 minute to read.

How it works

The agent explains each method, suggests starting with supervised fine-tuning, gives typical learning rate and beta settings for DPO, and lists safety benchmarks for evaluation.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

LLM Alignment Best Practice

Methods:

  • RLHF: Train reward model → PPO fine-tuning (complex but powerful)
  • DPO: Direct preference optimization (simpler, no reward model needed)
  • GRPO: Group relative policy optimization
  • SFT: Supervised fine-tuning as alignment baseline

Training recipe:

  • Start with SFT on high-quality instruction data
  • DPO: lr=5e-7, beta=0.1, batch_size=64
  • PPO: lr=1e-6, clip=0.2, KL coeff=0.02
  • Use reference model for KL penalty
  • Evaluate on safety benchmarks (TruthfulQA, BBQ, etc.)

Common pitfalls:

  • Reward hacking: model finds shortcuts to high reward
  • Mode collapse: model generates repetitive outputs
  • Catastrophic forgetting: loses general capabilities
FAQ

What is DPO?

Direct preference optimization, which trains on pairs of preferred and rejected answers without a separate reward model.

What is reward hacking?

When the model finds shortcuts that earn high reward without doing the task well.

Which checks should I run?

Evaluate on safety and truthfulness benchmarks such as TruthfulQA and BBQ.

Details

Original description by the author

Best practices for LLM alignment techniques including RLHF, DPO, and instruction tuning. Use when working on alignment or safety.

repo: aiming-lab/AutoResearchClaw

Popularity

GitHub stars
15k
Ranking position
#11067
License
MIT
Updated
8/19/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills