mcpbeat Sign in

Finetuning Agent Skill

Fine-tune models on Azure AI 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).

47k tokens
context cost
the whole folder, loaded on every use
34
files
ships runnable scripts
3
copies elsewhere
how many repositories repackaged it
116 d ago
last touched
this folder, not the whole repository

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/skills --skill finetuning

What comes with it

183 192 bytes besides the instruction
references/agentic-rft.md
references/dataset-formats.md
references/deployment.md
references/evaluation.md
references/grader-design.md
references/hyperparameters.md
references/large-file-uploads.md
references/platform-gotchas.md
references/reward-hacking.md
references/training-curves.md
references/training-types.md
references/vision-fine-tuning.md
scripts/calibrate_grader.py
scripts/check_training.py
scripts/cleanup.py
scripts/common.py
scripts/convert_dataset.py
scripts/deploy_model.py
scripts/evaluate_model.py
scripts/generate_distillation_data.py
scripts/monitor_training.py
scripts/score_dataset.py
scripts/submit_training.py
scripts/validate/__init__.py
scripts/validate/data_stats.py
scripts/validate/validate_dpo.py
scripts/validate/validate_rft.py
scripts/validate/validate_sft.py
workflows/dataset-creation.md
workflows/diagnose-poor-results.md
workflows/full-pipeline.md
workflows/iterative-training.md
workflows/quickstart.md

The instruction itself

8 sections, as written by the author

Fine-Tuning on Azure AI 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

| Stage | Guide |

|-------|-------|

| Quick start | workflows/quickstart.md |

| Full pipeline | workflows/full-pipeline.md |

| Create data | workflows/dataset-creation.md |

| Iterate | workflows/iterative-training.md |

| Diagnose | workflows/diagnose-poor-results.md |

References

| Topic | File |

|-------|------|

| SFT vs DPO vs RFT | references/training-types.md |

| Hyperparameters | references/hyperparameters.md |

| Data formats | references/dataset-formats.md |

| Grader design (RFT) | references/grader-design.md |

| Reward hacking | references/reward-hacking.md |

| Agentic RFT (tools) | references/agentic-rft.md |

| Deployment | references/deployment.md |

| Training curves | references/training-curves.md |

| Evaluation | references/evaluation.md |

| Vision fine-tuning | references/vision-fine-tuning.md |

| Large file uploads | references/large-file-uploads.md |

| Platform gotchas | references/platform-gotchas.md |

Scripts

| Script | Purpose |

|--------|---------|

| scripts/submit_training.py | Submit SFT/DPO/RFT jobs |

| scripts/monitor_training.py | Poll job until completion |

| scripts/calibrate_grader.py | Find optimal RFT pass_threshold |

| scripts/check_training.py | Analyze curves, list checkpoints |

| scripts/deploy_model.py | Deploy via ARM REST API |

| scripts/evaluate_model.py | LLM judge evaluation |

| scripts/convert_dataset.py | Convert between SFT/DPO/RFT formats |

| scripts/generate_distillation_data.py | Generate synthetic training data |

| scripts/score_dataset.py | Quality scoring on training data |

| scripts/cleanup.py | Delete old files and deployments |

| scripts/validate/ | Data validators (SFT, DPO, RFT) + stats |

Rules

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

Quick Reference

| Task | Command |

|------|---------|

| Validate SFT data | python scripts/validate/validate_sft.py data.jsonl |

| Submit SFT job | python scripts/submit_training.py --model gpt-4.1-mini --training-file train.jsonl --validation-file val.jsonl --type sft |

| Monitor job | python scripts/monitor_training.py --job-id ftjob-xxx |

| Analyze curves | python scripts/check_training.py --job-id ftjob-xxx |

| Deploy model | python scripts/deploy_model.py --model-id ft:gpt-4.1-mini:... --name my-eval |

| Evaluate model | python scripts/evaluate_model.py --deployment-name my-eval --test-file test.jsonl |

Error Handling

| Error | Cause | Fix |

|-------|-------|-----|

| "API version not supported" | Older openai SDK on /v1/ endpoint | Upgrade to openai>=1.0 |

| "does not support fine-tuning with Standard TrainingType" | OSS model needs globalStandard | Use --use-rest flag or script auto-falls back |

| Job stuck in post-training eval | Under-provisioned tool endpoint (RFT) | Scale to S2+, enable Always On |

| "DeploymentNotReady" after ARM succeeds | ARM/data-plane race condition | Delete and recreate deployment, wait 5 min |

| Content safety block at deployment | PII-dense training data | Remove problematic document types |

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Geo Database
by christophacham
×4

Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.

12k tokens
Pymc Bayesian Modeling
by christophacham
×4

Bayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.

24k tokens scripts
Pymoo
by christophacham
×4

Multi-objective optimization framework. NSGA-II, NSGA-III, MOEA/D, Pareto fronts, constraint handling, benchmarks (ZDT, DTLZ), for engineering design and optimization problems.

19k tokens scripts
Statsmodels
by ComeOnOliver
×4

Statistical modeling toolkit. OLS, GLM, logistic, ARIMA, time series, hypothesis tests, diagnostics, AIC/BIC, for rigorous statistical inference and econometric analysis.

41k tokens
Add Uint Support
by pytorch
vendor ×3

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

2k tokens
At Dispatch V2
by pytorch
vendor ×3

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

2k tokens
Docstring
by pytorch
vendor ×3

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

3k tokens

How to use it

Copy the folder

Take microsoft/finetuning from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.