nlp-pretraining
What it does
The skill guides fine-tuning of existing language models. It is for practitioners who adapt pre-trained models to their own tasks.
When to use it
- ✓When you want to fine-tune a pre-trained language model on your task.
- ✓When you want a parameter-efficient method such as LoRA.
- ✓When you need evaluation advice for classification or text generation.
Skill link
https://github.com/aiming-lab/AutoResearchClaw/blob/main/researchclaw/skills/builtin/domain/nlp-pretraining/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
“Fine-tune a pre-trained model on my support tickets with LoRA, and tell me how to evaluate it.”
5 new skills a week. 1 minute to read.
How it works
The agent recommends starting from a pre-trained checkpoint, using AdamW with a warmup and decay schedule, and choosing LoRA or adapter settings for efficient tuning. It also suggests metrics and several seeds for reporting.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
NLP Pretraining/Fine-tuning Best Practice
Fine-tuning recipe:
- Use pre-trained checkpoints (HuggingFace hub)
- AdamW optimizer, lr=2e-5 to 5e-5
- Linear warmup (6% of total steps) + linear decay
- Batch size: 16-32 (use gradient accumulation for larger effective batch)
- 3-5 epochs for classification, 1-2 for generation
- Weight decay: 0.01
Parameter-efficient methods:
- LoRA: r=8-64, alpha=16-128, apply to q/v projections
- Prefix tuning: 10-20 prefix tokens
- Adapters: bottleneck dimension 64-256
Evaluation:
- Classification: accuracy, F1 (macro for imbalanced)
- Generation: perplexity, BLEU/ROUGE, human evaluation
- Use multiple seeds and report mean +/- std
FAQ
What is LoRA?
A method that trains small added layers instead of the whole model, which saves memory and time.
How many epochs should I train?
The skill suggests about three to five epochs for classification and one to two for generation.
Why use multiple seeds?
Results vary between runs, so the skill suggests reporting the mean and spread across seeds.
Details
Original description by the author
Best practices for language model pretraining and fine-tuning. Use when generating or reviewing NLP training code.
Popularity
- GitHub stars
- 15k
- Ranking position
- #11068
- 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.