Skip to content
Skillpedia
Machine learning15k · #11068

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.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-pretraining/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

“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.

repo: aiming-lab/AutoResearchClaw

Popularity

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

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills