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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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.
Popularity
- GitHub stars
- 15k
- Ranking position
- #11067
- License
- MIT
- Updated
- 8/19/2026
Comments
- …
More skills from this repository
a-evolve
15kHelps your agent improve over repeated runs by diagnosing failures, creating targeted skills from error patterns, and recording lessons for later use.
biology-biopython
15kHelps your agent work with DNA, RNA, and protein sequences using Biopython, including file parsing, sequence calculations, BLAST searches, and database access.
chemistry-rdkit
15kHelps your agent analyze molecules written as SMILES strings with RDKit, including descriptors, fingerprints, similarity, and substructure search.
hypothesis-formulation
15kHelps your agent turn an observation into testable hypotheses, with competing explanations and clear predictions that could prove them wrong.
Similar skills
pytorch-patterns
280kHelps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
evm-token-decimals
280kHelps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
ito-inference
280kLets your agent check the availability of AI models for use. It connects the compute request with the ready model service.