Skip to content
FunCoding

nlp-pretraining

Best practices for language model pretraining and fine-tuning. Use when generating or reviewing NLP training code.

Star
14,635
License
MIT
Last commit
Aug 19, 2026

researchclaw/skills/builtin/domain/nlp-pretraining/SKILL.md

View on 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

Similar Skills

subagent-driven-development

OBobra/superpowers298k2,631 new stars in the last 7 days

chief-of-staff

MAmattpocock/skills288k10,178 new stars in the last 7 days

setup-matt-pocock-skills

MAmattpocock/skills288k10,178 new stars in the last 7 days

ask-matt

MAmattpocock/skills288k10,178 new stars in the last 7 days

agent-eval

AFaffaan-m/ECC278k4,046 new stars in the last 7 days

autonomous-agent-harness

AFaffaan-m/ECC278k4,046 new stars in the last 7 days