plugins/sagemaker-ai/skills/finetuning/SKILL.md
Generates a Jupyter notebook that fine-tunes a base model using SageMaker serverless training jobs. Use when the user says "start training", "fine-tune my model", "I'm ready to train", or when the plan reaches the finetuning step. Supports SFT, DPO, and RLVR trainers, including RLVR Lambda reward function creation.
npx skillsauth add awslabs/agent-plugins finetuningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before starting this workflow, verify:
A use_case_spec.md file exists
use-case-specification skill first, then resumeA fine-tuning technique (SFT, DPO, or RLVR) and base model have already been selected
finetuning-setup skill to collect what's missing, then resumeA base model name available on SageMakerHub has been identified
finetuning-setup skill to get itfinetuning-setup retrieves, as it may differ from other commonly used names for the same model.ipynb file with the complete notebook JSON, OR use notebook MCP tools (e.g., create_notebook, add_cell) if availableecho/cat piping to generate notebooks<project-dir>/notebooks/<project-name>.ipynb
## Fine-Tuning as a section divider before the new cells⏸ Wait for user.
Read the example notebook matching the finetuning strategy:
references/sft_example.mdreferences/dpo_example.mdreferences/rlvr_example.mdmeta-):
ACCEPT_EULA = False line from the config cellaccept_eula=ACCEPT_EULA, line from the trainer callmax_epochs and lr_warmup_ratioIn the 'Setup & Credentials' cell, populate:
BASE_MODEL
MODEL_PACKAGE_GROUP_NAME
use_case_spec.md if needed)[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}customer-support-chatbot-v1Save notebook
references/rlvr_reward_function.md section "Helping Users Create Lambda Functions"CUSTOM_REWARD_FUNCTION in the Notebook with the ARN of the reward function (either given directly by the user, or from the function generation code as evaluator.arn).meta-)
ACCEPT_EULA to True in the notebook after reviewing the license. NEVER set ACCEPT_EULA to True yourself for Meta/Llama models.ACCEPT_EULA variable and accept_eula parameter should already be omitted from the notebook (see Step 1.3).Display the following to the user:: I have updated your Jupyter Notebook with the finetuning code. If you run it cell by cell, you should be able to launch your SageMaker Training job. Training takes a while. Please monitor the progress and let me know when it's complete so I can help you get to the next step in your plan.
Wait for user's confirmation about training completion. Once the user has confirmed, you are free to move to the next step of the plan.
CRITICAL:
If the user wants to finetune a model they had already customized, follow the instructions in references/continuous_customization.md
rlvr_reward_function.md - Lambda reward function creation guide (RLVR only)templates/rlvr_reward_function_source_template.py - Lambda reward function source template for open-weights models (RLVR only)templates/nova_rlvr_reward_function_source_template.py - Lambda reward function source template for Nova 2.0 Lite (RLVR only)sft_example.md - Complete notebook template for Supervised Fine-Tuningdpo_example.md - Complete notebook template for Direct Preference Optimizationrlvr_example.md - Complete notebook template for Reinforcement Learning from Verifiable Rewardscontinuous_customization.md - Instructions on fine-tuning an already fine-tuned model.development
Deploy to AWS Elastic Beanstalk. Triggers on: elastic beanstalk, EB, managed EC2 platform, web app with managed patching, worker on EC2, Heroku alternative, don't want to manage servers or containers, migrate from Heroku, managed operational lifecycle. Covers Elastic Beanstalk on EC2 for web and worker applications.
testing
Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for Lambda, Lambda cost optimization with Reserved Instances or Savings Plans. Also trigger when users describe high-volume predictable workloads seeking cost savings, or compare Lambda vs EC2 for steady-state traffic. For standard Lambda without LMI, use the aws-lambda skill instead.
development
Deploy applications to AWS. Triggers on phrases like: deploy to AWS, host on AWS, run this on AWS, AWS architecture, estimate AWS cost, generate infrastructure. Analyzes any codebase and deploys to optimal AWS services.
development
Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, load data, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL migration, DDL operations, query plan explainability, SQL compatibility validation, and bulk data loading. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow, aurora-dsql-loader, load CSV into DSQL.