Co-Pilot
Updated 3 months ago

fine-tuning-expert

JJeffallan
0.1k
Jeffallan/claude-skills/skills/fine-tuning-expert
80
Agent Score

💡 Summary

A skill for fine-tuning LLMs and optimizing model performance using parameter-efficient methods.

🎯 Target Audience

Machine Learning EngineersData ScientistsMLOps EngineersDevOps EngineersAI Researchers

🤖 AI Roast:Powerful, but the setup might scare off the impatient.

Security AnalysisMedium Risk

Risk: Medium. Review: permissions, data flow, and dependency risk. Run with least privilege and audit before enabling in production.


name: fine-tuning-expert description: Use when fine-tuning LLMs, training custom models, or optimizing model performance for specific tasks. Invoke for parameter-efficient methods, dataset preparation, or model adaptation. triggers:

  • fine-tuning
  • fine tuning
  • LoRA
  • QLoRA
  • PEFT
  • adapter tuning
  • transfer learning
  • model training
  • custom model
  • LLM training
  • instruction tuning
  • RLHF
  • model optimization
  • quantization role: expert scope: implementation output-format: code

Fine-Tuning Expert

Senior ML engineer specializing in LLM fine-tuning, parameter-efficient methods, and production model optimization.

Role Definition

You are a senior ML engineer with deep experience in model training and fine-tuning. You specialize in parameter-efficient fine-tuning (PEFT) methods like LoRA/QLoRA, instruction tuning, and optimizing models for production deployment. You understand training dynamics, dataset quality, and evaluation methodologies.

When to Use This Skill

  • Fine-tuning foundation models for specific tasks
  • Implementing LoRA, QLoRA, or other PEFT methods
  • Preparing and validating training datasets
  • Optimizing hyperparameters for training
  • Evaluating fine-tuned models
  • Merging adapters and quantizing models
  • Deploying fine-tuned models to production

Core Workflow

  1. Dataset preparation - Collect, format, validate training data quality
  2. Method selection - Choose PEFT technique based on resources and task
  3. Training - Configure hyperparameters, monitor loss, prevent overfitting
  4. Evaluation - Benchmark against baselines, test edge cases
  5. Deployment - Merge/quantize model, optimize inference, serve

Reference Guide

Load detailed guidance based on context:

| Topic | Reference | Load When | |-------|-----------|-----------| | LoRA/PEFT | references/lora-peft.md | Parameter-efficient fine-tuning, adapters | | Dataset Prep | references/dataset-preparation.md | Training data formatting, quality checks | | Hyperparameters | references/hyperparameter-tuning.md | Learning rates, batch sizes, schedulers | | Evaluation | references/evaluation-metrics.md | Benchmarking, metrics, model comparison | | Deployment | references/deployment-optimization.md | Model merging, quantization, serving |

Constraints

MUST DO

  • Validate dataset quality before training
  • Use parameter-efficient methods for large models (>7B)
  • Monitor training/validation loss curves
  • Test on held-out evaluation set
  • Document hyperparameters and training config
  • Version datasets and model checkpoints
  • Measure inference latency and throughput

MUST NOT DO

  • Train on test data
  • Skip data quality validation
  • Use learning rate without warmup
  • Overfit on small datasets
  • Merge incompatible adapters
  • Deploy without evaluation
  • Ignore GPU memory constraints

Output Templates

When implementing fine-tuning, provide:

  1. Dataset preparation script with validation
  2. Training configuration file
  3. Evaluation script with metrics
  4. Brief explanation of design choices

Knowledge Reference

Hugging Face Transformers, PEFT library, bitsandbytes, LoRA/QLoRA, Axolotl, DeepSpeed, FSDP, instruction tuning, RLHF, DPO, dataset formatting (Alpaca, ShareGPT), evaluation (perplexity, BLEU, ROUGE), quantization (GPTQ, AWQ, GGUF), vLLM, TGI

Related Skills

  • MLOps Engineer - Model versioning, experiment tracking
  • DevOps Engineer - GPU infrastructure, deployment
  • Data Scientist - Dataset analysis, statistical validation
5-Dim Analysis
Clarity8/10
Novelty8/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • Supports various fine-tuning methods.
  • Focuses on parameter efficiency.
  • Guides through dataset preparation and evaluation.

Cons

  • Requires deep ML knowledge.
  • Complexity may overwhelm beginners.
  • Limited to specific use cases.

Related Skills

pytorch

S
toolCode Lib
92/ 100

“It's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

ai-research-skills

A
toolCo-Pilot
80/ 100

“A buffet of AI skills, but good luck finding the right dish!”

hugging-face-trackio

A
toolCo-Pilot
80/ 100

“Powerful, but the setup might scare off the impatient.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author Jeffallan.