Expert guidance for fine-tuning LLMs with parameter-efficient methods and production optimization.
Works with
Covers LoRA, QLoRA, and full fine-tuning workflows with Hugging Face PEFT, including dataset validation, hyperparameter configuration, and adapter merging for deployment
Provides a complete minimal working example with LoRA setup, training loop, and quantization variants for memory-constrained environments
Includes five-stage workflow: dataset preparation, method selection, training wit
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionfine-tuning-expertExecute the skills CLI command in your project's root directory to begin installation:
Fetches fine-tuning-expert from jeffallan/claude-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate fine-tuning-expert. Access via /fine-tuning-expert in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
7.9K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
7.9K
stars
Senior ML engineer specializing in LLM fine-tuning, parameter-efficient methods, and production model optimization.
python validate_dataset.py --input data.jsonl — fix all errors before proceedingLoad 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 |
from datasets import load_dataset
from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments
from peft import LoraConfig, get_peft_model, TaskType
from trl import SFTTrainer
import torch
# 1. Load base model and tokenizer
model_id = "meta-llama/Llama-3-8B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
# 2. Configure LoRA adapter
lora_config = LoraConfig(
task_type=TaskType.CAUSAL_LM,
r=16, # rank — increase for more capacity, decrease to save memory
lora_alpha=32, # scaling factor; typically 2× rank
target_modules=["q_proj", "v_proj"],
lora_dropout=0.05,
bias="none",
)
model = get_peft_model(model, lora_config)
model.print_trainable_parameters() # verify: should be ~0.1–1% of total params
# 3. Load and format dataset (Alpaca-style JSONL)
dataset = load_dataset("json", data_files={"train": "train.jsonl", "test": "test.jsonl"})
def format_prompt(example):
return {"text": f"### Instruction:\n{example['instruction']}\n\n### Response:\n{example['output']}"}
dataset = dataset.map(format_prompt)
# 4. Training arguments
training_args = TrainingArguments(
output_dir="./checkpoints",
num_train_epochs=3,
per_device_train_batch_size=4,
gradient_accumulation_steps=4, # effective batch size = 16
learning_rate=2e-4,
lr_scheduler_type="cosine",
warmup_ratio=0.03, # always use warmup
fp16=False,
bf16=True,
logging_steps=10,
eval_strategy="steps",
eval_steps=100,
save_steps=200,
load_best_model_at_end=True,
)
# 5. Train
trainer = SFTTrainer(
model=model,
args=training_args,
train_dataset=dataset["train"],
eval_dataset=dataset["test"],
dataset_text_field="text",
max_seq_length=2048,
)
trainer.train()
# 6. Save adapter weights only
model.save_pretrained("./lora-adapter")
tokenizer.save_pretrained("./lora-adapter")
QLoRA variant — add these lines before loading the model to enable 4-bit quantization:
from transformers import BitsAndBytesConfig
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
)
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config, device_map="auto")
Merge adapter into base model for deployment:
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16)
merged = PeftModel.from_pretrained(base, "./lora-adapter").merge_and_unload()
merged.save_pretrained("./merged-model")
When implementing fine-tuning, always provide:
TrainingArguments + LoraConfig block, commented)Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
erichowens/some_claude_skills
sickn33/antigravity-awesome-skills
erichowens/some_claude_skills
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
Solid pick for teams standardizing on skills: fine-tuning-expert is focused, and the summary matches what you get after install.
fine-tuning-expert reduced setup friction for our internal harness; good balance of opinion and flexibility.
We added fine-tuning-expert from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
I recommend fine-tuning-expert for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
fine-tuning-expert fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Useful defaults in fine-tuning-expert — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for fine-tuning-expert matched our evaluation — installs cleanly and behaves as described in the markdown.
fine-tuning-expert reduced setup friction for our internal harness; good balance of opinion and flexibility.
fine-tuning-expert reduced setup friction for our internal harness; good balance of opinion and flexibility.
Registry listing for fine-tuning-expert matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 35