Data & AnalyticsOfficial · microsoft

Finetuning skill for Claude

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation.

When Claude uses it

USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

Finetuning SKILL.md

The full skill file from microsoft/skills (MIT).

Fine-Tuning on Microsoft Foundry

Fine-tune models using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset prep, training, deployment, and evaluation.

When to Use

Use this sub-skill when the user asks about:

  • Fine-tuning a model (SFT, DPO, or RFT)
  • Preparing, validating, or formatting training data
  • Submitting, monitoring, or diagnosing training jobs
  • Calibrating graders or pass thresholds for RFT
  • Deploying or evaluating a fine-tuned model
  • Choosing between training types (SFT vs DPO vs RFT)
  • Distillation, synthetic data generation, or dataset quality scoring
  • Large file uploads for training data
  • Cleaning up fine-tuning resources (files, deployments)

Do NOT use for: General model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

Workflows

StageGuide
Quick startworkflows/quickstart.md
Full pipelineworkflows/full-pipeline.md
Create dataworkflows/dataset-creation.md
Iterateworkflows/iterative-training.md
Diagnoseworkflows/diagnose-poor-results.md

References

TopicFile
SFT vs DPO vs RFTreferences/training-types.md
Hyperparametersreferences/hyperparameters.md
Data formatsreferences/dataset-formats.md
Grader design (RFT)references/grader-design.md
Reward hackingreferences/reward-hacking.md
Agentic RFT (tools)references/agentic-rft.md
Deploymentreferences/deployment.md
Training curvesreferences/training-curves.md
Evaluationreferences/evaluation.md
Vision fine-tuningreferences/vision-fine-tuning.md
Large file uploadsreferences/large-file-uploads.md
Platform gotchasreferences/platform-gotchas.md

Scripts

ScriptPurpose
scripts/submit_training.pySubmit SFT/DPO/RFT jobs
scripts/monitor_training.pyPoll job until completion
scripts/calibrate_grader.pyFind optimal RFT pass_threshold
scripts/check_training.pyAnalyze curves, list checkpoints
scripts/deploy_model.pyDeploy via ARM REST API
scripts/evaluate_model.pyLLM judge evaluation
scripts/convert_dataset.pyConvert between SFT/DPO/RFT formats
scripts/generate_distillation_data.pyGenerate synthetic training data
scripts/score_dataset.pyQuality scoring on training data
scripts/cleanup.pyDelete old files and deployments
scripts/validate/Data validators (SFT, DPO, RFT) + stats

Rules

  1. Always baseline first — evaluate the base model before fine-tuning
  2. Validate data before submitting — run scripts/validate/validate_sft.py
  3. Calibrate RFT graders — target 25-50% failure rate on the base model
  4. Evaluate checkpoints — don't blindly deploy the final one
  5. Measure token cost alongside accuracy when comparing models

Quick Reference

TaskCommand
Validate SFT datapython scripts/validate/validate_sft.py data.jsonl
Submit SFT jobpython scripts/submit_training.py --model gpt-4.1-mini --training-file train.jsonl --validation-file val.jsonl --type sft
Monitor jobpython scripts/monitor_training.py --job-id ftjob-xxx
Analyze curvespython scripts/check_training.py --job-id ftjob-xxx
Deploy modelpython scripts/deploy_model.py --model-id ft:gpt-4.1-mini:... --name my-eval
Evaluate modelpython scripts/evaluate_model.py --deployment-name my-eval --test-file test.jsonl

Error Handling

ErrorCauseFix
"API version not supported"Older openai SDK on /v1/ endpointUpgrade to openai>=1.0
"does not support fine-tuning with Standard TrainingType"OSS model needs globalStandardUse --use-rest flag or script auto-falls back
Job stuck in post-training evalUnder-provisioned tool endpoint (RFT)Scale to S2+, enable Always On
"DeploymentNotReady" after ARM succeedsARM/data-plane race conditionDelete and recreate deployment, wait 5 min
Content safety block at deploymentPII-dense training dataRemove problematic document types

How to install Finetuning

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit microsoft/skills/.github/plugins/azure-skills/skills/microsoft-foundry/finetuning#main ~/.claude/skills/finetuning

Codex

npx degit microsoft/skills/.github/plugins/azure-skills/skills/microsoft-foundry/finetuning#main ~/.codex/skills/finetuning

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Finetuning skill do?

Fine-tune models on Microsoft Foundry using SFT (supervised), DPO (preference), or RFT (reinforcement with graders). Covers dataset preparation, training job submission, deployment, and evaluation. USE FOR: fine-tune, SFT, DPO, RFT, training data, grader, distillation, fine-tuned model, training job, large file upload, calibrate grader, deploy fine-tuned model, evaluate fine-tuned model. DO NOT USE FOR: general model deployment without fine-tuning (use deploy-model), agent creation (use agents), prompt optimization without training (use prompt-optimizer).

+How do I install Finetuning in Claude Code?

Copy the skill folder into ~/.claude/skills/finetuning, for example with "npx degit microsoft/skills/.github/plugins/azure-skills/skills/microsoft-foundry/finetuning#main ~/.claude/skills/finetuning". Claude Code loads it automatically and uses it when a task matches.

+Does Finetuning work with ChatGPT or Codex?

Yes. Finetuning uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/finetuning. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Finetuning free?

Finetuning is published on GitHub by microsoft under the MIT license, which allows free use.

Related data & analytics skills

  1. Analytics

    When the user wants to set up or audit analytics, or asks whether a metric or number is calculated right, what to track, or how to name…

    coreyhaines31/marketingskills★ 61k
  2. Statistical Analysis

    Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives,…

    K-Dense-AI/scientific-agent-skills★ 58k
  3. Dashboard Chat Best Practices

    Apply dashboard-grade chat UX patterns in the Eve chat template.

    thedotmack/claude-mem★ 118k
  4. Aeon

    This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly…

    K-Dense-AI/scientific-agent-skills★ 58k
  5. Bulk Rnaseq

    Prepares bulk RNA-seq FASTQ, Salmon, STAR or featureCounts output for gene-level differential expression.

    K-Dense-AI/scientific-agent-skills★ 58k
  6. Datalad

    Retrieves, versions, and publishes scientific datasets with DataLad and git-annex, and captures computational provenance with datalad run,…

    K-Dense-AI/scientific-agent-skills★ 58k
  7. Depmap

    Retrieves and analyzes Cancer Dependency Map (DepMap) release data, including CRISPR Chronos gene effects, cancer model annotations, omics…

    K-Dense-AI/scientific-agent-skills★ 58k
  8. Hypogenic

    Plans and audits use of ChicagoHAI HypoGeniC/HypoRefine for LLM-assisted hypothesis generation from labeled text datasets.

    K-Dense-AI/scientific-agent-skills★ 58k
  9. Imaging Data Commons

    Queries and downloads public cancer imaging data from NCI Imaging Data Commons.

    K-Dense-AI/scientific-agent-skills★ 58k

See all data & analytics skills →

More skills from microsoft

  1. Foundry Iq

    Official

    Use for Azure AI Search, Foundry IQ, document-grounded agents and graphs built over documents.

    microsoft/skills★ 3.2k
  2. Frontend Design Review

    Official

    Review and create distinctive, production-grade frontend interfaces with high design quality and design system compliance.

    microsoft/skills★ 3.2k
  3. Frontend Ui Dark Ts

    Official

    Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.

    microsoft/skills★ 3.2k

All skills by microsoft →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.