finetuning-technique

$npx mdskill add awslabs/agent-plugins/finetuning-technique

Selects and validates a fine-tuning technique for the user's model.

  • User needs to choose a fine-tuning technique for their use case.
  • Depends on model-selection skill and use_case_spec.md file.
  • Consults finetune_technique_selection_guide.md to recommend best technique.
  • Validates technique against model's available recipes and confirms with user.

SKILL.md

.github/skills/finetuning-techniqueView on GitHub ↗
---
name: finetuning-technique
description: Selects a fine-tuning technique (SFT, DPO, RLVR, or RLAIF) for the user's use case and validates it against the selected model's available recipes. Use when the user has decided to finetune and needs to choose a technique, or when the technique needs to be validated against a model. Requires a base model to already be selected (via model-selection skill).
metadata:
  version: "1.0.0"
---

# Finetuning Technique

Guides the user through selecting a fine-tuning technique based on their use case and validates compatibility with the selected model.

## When to Use

- User has decided to finetune and needs to choose a technique
- User wants to change their finetuning technique
- Technique needs to be validated against a selected model

## Prerequisites

- A base model has been selected (via model-selection skill). The model name and hub must be known.
- A `use_case_spec.md` file exists. If not, activate the use-case-specification skill to generate it first.

## Workflow

### Step 1: Determine Finetuning Technique

Consult `references/finetune_technique_selection_guide.md` to recommend the best-fit technique based on the use case and the user's needs (SFT, DPO, RLVR, RLAIF).

Present the recommendation and reasoning to the user. Ask if they'd like to go with the recommendation or prefer a different technique.

### Step 2: Validate Technique Availability

1. Once the user confirms a technique, retrieve the finetuning techniques available for the selected model by running: `python finetuning-technique/scripts/get_recipes.py <model-name> <hub-name>`
   - This returns only the techniques the model actually supports, filtered to SFT, DPO, RLVR, and RLAIF. Only these four techniques are supported — ignore any other techniques even if the model's recipes include them.
2. If the chosen technique is available for the model, proceed to Step 3.
3. If the chosen technique is not available for the model, explain that the selected model does not support it on SageMaker and offer to go back to model-selection to pick a different model that supports the chosen technique.

### Step 3: Confirm Selections

Present a summary to the user:

```
Here's what we've selected:
- Base model: [model name]
- Fine-tuning technique: [SFT/DPO/RLVR/RLAIF]
```

## References

- `references/finetune_technique_selection_guide.md` — Technique guidance (SFT/DPO/RLVR/RLAIF)

More from awslabs/agent-plugins

SkillDescription
amazon-location-serviceIntegrates Amazon Location Service APIs for AWS applications. Use this skill when users want to add maps (interactive MapLibre or static images); geocode addresses to coordinates or reverse geocode coordinates to addresses; calculate routes, travel times, or service areas; find places and businesses through text search, nearby search, or autocomplete suggestions; retrieve detailed place information including hours, contacts, and addresses; monitor geographical boundaries with geofences; or track device locations. Covers authentication, SDK integration, and all Amazon Location Service capabilities.
amplify-workflow'Build and deploy full-stack web and mobile apps with AWS Amplify Gen2
aws-architecture-diagramGenerate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to visualize existing infrastructure from CloudFormation, CDK, or Terraform code. Supports two modes: analyze an existing codebase to auto-generate diagrams, or brainstorm interactively from scratch. Exports .drawio files with optional PNG/SVG/PDF export via draw.io desktop CLI.
aws-lambdaDesign, build, deploy, test, and debug serverless applications with AWS Lambda. Triggers on phrases like: Lambda function, event source, serverless application, API Gateway, EventBridge, Step Functions, serverless API, event-driven architecture, Lambda trigger. For deploying non-serverless apps to AWS, use deploy-on-aws plugin instead.
aws-lambda-durable-functions>
aws-lambda-managed-instances>
aws-lambda-microvms>
aws-serverless-deploymentAWS SAM and AWS CDK deployment for serverless applications. Triggers on phrases like: use SAM, SAM template, SAM init, SAM deploy, CDK serverless, CDK Lambda construct, NodejsFunction, PythonFunction, SAM and CDK together, serverless CI/CD pipeline. For general app deployment with service selection, use deploy-on-aws plugin instead.
aws-step-functionsBuild workflows with AWS Step Functions state machines using the JSONata query language. Covers Amazon States Language (ASL) structure, state types, variables, data transformation, error handling, AWS service integration, and migrating from the JSONPath to the JSONata query language.
aws-transformMigrate, modernize, and upgrade codebases to AWS. Run analysis on repos for tech debt, security vulnerabilities, and modernization opportunities. Transforms .NET Framework to .NET 8/10, mainframe COBOL to Java, VMware VMs to EC2, SQL Server to Aurora, and upgrades Java/Python/Node.js versions and AWS SDKs. Use when the user says "migrate .NET to AWS", "upgrade Java to 17/21", "modernize COBOL", "modernize mainframe", "move VMware to EC2", "convert SQL Server to Aurora", "upgrade Python version", "migrate AWS SDK", "transform this codebase", "analyze for issues", "find tech debt", "what tech debt", "security vulnerabilities", "CVEs", "what's wrong with my code", "assess my repos", "where do I start", "find what's outdated", "analyze my repos", "AWS Transform - continuous modernization", "continuous modernization" or "continuous-modernization". Don't use for infrastructure provisioning, CI/CD pipelines, or general coding tasks.