/mlops-skills:llmops-fine-tuning-and-deploymentfrom mlops-skills
Guides the decision between fine-tuning, RAG, and prompt engineering for LLM use cases, then executes fine-tuning safely with LoRA/QLoRA/PEFT, dataset curation, evaluation, and deployment.
Ships in mlops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fine-tuning an LLM is often reached for by default when the actual problem could be solved faster, cheaper, and more maintainably with better prompting or retrieval-augmented generation (RAG). This skill exists to make that decision deliberately rather than by default, and — when fine-tuning genuinely is the right tool — to run it with the same operational rigor as any other model training and deployment: versioned data, tracked experiments, gated evaluation, and a safe rollout path. The cost of getting this decision wrong is real: unnecessary fine-tuning burns significant compute and engineering time and produces an artifact that's harder to update than a prompt or a retrieval index, while under-using fine-tuning where it's genuinely warranted (e.g. a stable, narrow output format or domain vocabulary at high volume) leaves cost and latency on the table.
transformers, peft (≥ 0.7 for current
LoRA/QLoRA APIs), bitsandbytes for quantized training, trl if doing
DPO/RLHF-style preference tuning.from peft import LoraConfig, get_peft_model
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
import torch
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
base_model = AutoModelForCausalLM.from_pretrained(
"base-model-org/base-model-7b",
quantization_config=bnb_config,
device_map="auto",
)
lora_config = LoraConfig(
r=16,
lora_alpha=32,
target_modules=["q_proj", "k_proj", "v_proj", "o_proj"],
lora_dropout=0.05,
bias="none",
task_type="CAUSAL_LM",
)
model = get_peft_model(base_model, lora_config)
model.print_trainable_parameters()
# trainable params: ~0.1-0.5% of total params for r=16 on a 7B model
Symptom: A team fine-tunes a model to "teach it about our internal product catalog," but the model still gives outdated answers whenever the catalog changes, requiring a full retrain for every catalog update. Fix: This is a knowledge-freshness problem, which fine-tuning solves poorly — use RAG instead so catalog updates are reflected by updating the retrieval index, not by retraining.
Symptom: A fine-tuned model performs well on the curated eval set but degrades on general instructions it used to handle fine before tuning (catastrophic forgetting), discovered only after deployment when users complain about unrelated regressions. Fix: Maintain and run a general-capability sentinel eval set (not just the target-task eval set) before promoting any fine-tune, and prefer PEFT/LoRA techniques, which are markedly less prone to this than full fine-tuning.
Symptom: Two different training runs on "the same" dataset produce meaningfully different quality, and the team can't determine why weeks later (non-reproducible fine-tuning experiments). Fix: Version the exact training dataset (content hash or a dataset registry entry), log all hyperparameters and the base model's exact revision/commit to the experiment tracker, and fix random seeds — treat this with the same rigor as training-pipeline-orchestration recommends for any training pipeline.
Symptom: A fine-tuned model deployed straight to 100% of production traffic turns out to have a subtle format regression that breaks a downstream parser, causing an incident before anyone notices via manual review. Fix: Always canary a newly fine-tuned model behind a small traffic percentage with automated output-format/quality checks before full cutover, and never overwrite the previous working deployment configuration until the canary has been validated — keep it one rollback away.
A support-ticket triage team wants an LLM to output a structured JSON
classification (category, priority, suggested_team) from free-text
tickets.
r=16, lora_alpha=32, 3 epochs) is run and tracked as
experiment run sft-triage-014; format compliance reaches 99.2% and
category accuracy reaches 91% on the held-out eval set, with the sentinel
general-capability eval set showing no regression.triage-classifier-v1.0.0, paired
explicitly with the base model revision it was tuned against, and
deployed behind a 10% canary for three days, monitored for format
validity rate and latency, before full rollout.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
22 skills in this plugin
/complete-mlops-platform-deployment-on-aws-from-scratchSequences a complete, end-to-end MLOps platform deployment on AWS from a bare AWS Organization to a production-ready platform serving a first retrained model — AWS landing zone, the SageMaker-vs-EKS+Kubeflow platform decision (EKS+Kubeflow is the worked path here), GPU node pools via the NVIDIA GPU Operator, MLflow experiment tracking on S3, a Kubeflow Pipelines retraining DAG, model registry/packaging with gated promotion, KServe canary/shadow serving, and drift monitoring. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "stand up an MLOps platform on AWS from scratch," "build the full ML training-to-serving pipeline on EKS/SageMaker," "give me the end-to-end sequence from AWS account to a retrained, monitored production model," or "decide between SageMaker and EKS+Kubeflow for our ML platform."
/complete-mlops-platform-deployment-on-azure-from-scratchSequences a complete, end-to-end MLOps platform deployment on Azure from a bare tenant to a production-ready platform serving a first retrained model — Azure landing zone, the Azure-ML-vs-AKS+Kubeflow platform decision (Azure ML is the worked path), GPU compute clusters/quota, MLflow-compatible experiment tracking, an Azure ML pipeline retraining DAG, Model Registry with gated promotion, managed online endpoints with traffic-split canary rollout, and data-drift monitoring. An integration/ orchestration skill that sequences existing tool-specific skills in the right order and flags handoff points — it does not restate their internals. Use when a user asks to "stand up an MLOps platform on Azure from scratch," "build the full ML training-to-serving pipeline on Azure ML/AKS," "give me the end-to-end sequence from Azure tenant to a retrained, monitored production model," or "decide between Azure ML and AKS+Kubeflow for our ML platform."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin mlops-skillsOther plugins' skills for the same job