Token导航 LogoToken导航TokenDH.com
开发执行命令github未标认证来源可访问许可证需确认审计通过

finetuningfinetuning 命令行

Agent Skill

finetuning 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

955

周安装

39

GitHub Stars

634

下载量

309
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:finetuning(finetuning 命令行)
来源仓库:https://github.com/awslabs/agent-plugins
仓库路径:skills/finetuning
安装命令:
npx skills add https://github.com/awslabs/agent-plugins --skill finetuning
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/awslabs/agent-plugins --skill finetuning

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕代码变更、仓库状态或协作事项进行整理。
  • 安装方式:通过 npx 从 GitHub 仓库添加,支持 Codex、Claude 等宿主环境。
  • 使用前建议确认权限范围和维护状态,避免触发不必要的命令执行。
  • 注意文件读写边界,确保操作符合仓库访问策略。

SKILL.md

Prerequisites

Before starting this workflow, verify:

  1. A use_case_spec.md file exists

- If missing: Activate the use-case-specification skill first, then resume - DON'T EVER offer to create a use case spec without activating the use-case-specification skill.

  1. A fine-tuning technique (SFT, DPO, or RLVR) and base model have already been selected

- If missing: Activate the finetuning-setup skill to collect what's missing, then resume - Don't make recommendations on the spot. You MUST activate the finetuning-setup skill.

  1. A base model name available on SageMakerHub has been identified

- If missing: Activate the finetuning-setup skill to get it - Important: Only use the model name that finetuning-setup retrieves, as it may differ from other commonly used names for the same model

Critical Rules

Code Generation Rules

  • ✅ Use EXACTLY the imports shown in each cell template
  • ❌ Do NOT add additional imports even if they seem helpful
  • ❌ Do NOT create variables before they're needed in that cell
  • 📋 Copy the code structure precisely - no improvisation
  • 🎯 Follow the minimal code principle strictly
  • ✅ When writing a notebook cell, make sure the indentation and f strings are correct
  • ✅ Write notebooks using your standard file write tool to create the .ipynb file with the complete notebook JSON, OR use notebook MCP tools (e.g., create_notebook, add_cell) if available
  • ❌ Do NOT use bash commands, shell scripts, or echo/cat piping to generate notebooks

User Communication Rules

  • ❌ NEVER offer to run the notebook for the user (you don't have the tools)
  • ❌ NEVER offer to move on to a downstream skill while training is in progress (logically impossible)
  • ❌ NEVER set ACCEPT_EULA to True yourself for Meta/Llama models (user must read and agree)
  • ✅ Always mention both the number AND title of cells you reference
  • ✅ If user asks how to run: Tell them to run cells one by one, mention ipykernel requirement

Workflow

1. Notebook Setup

1.1 Directory Setup

  1. Identify project directory from conversation context

- If unclear (multiple relevant directories exist) → Ask user which folder to use - If no project directory exists → activate the directory-management skill to set one up

  1. Check if the project notebook already exists at <project-dir>/notebooks/<project-name>.ipynb

- If it exists → ask: *"Would you like me to append the fine-tuning cells to the existing notebook, or create a new one?"* - If it doesn't exist → create it

  1. When appending, add a markdown header cell ## Fine-Tuning as a section divider before the new cells

⏸ Wait for user.

1.2 Select Reference Template

Read the example notebook matching the finetuning strategy:

  • SFT → references/sft_example.md
  • DPO → references/dpo_example.md
  • RLVR → references/rlvr_example.md

1.3 Copy Notebook Structure

  1. Write the exact cells from the example to the project notebook
  2. Use same order, dependencies, and imports as the example
  3. DO NOT improvise or add extra code
  4. If the model is NOT a Meta/Llama model (model ID does NOT start with meta-):

- Omit the ACCEPT_EULA = False line from the config cell - Omit the accept_eula=ACCEPT_EULA, line from the trainer call

  1. If the model is in the Nova family, exclude print and override statements for the following hyperparameters: max_epochs and lr_warmup_ratio

1.4 Auto-Generate Configuration Values

In the 'Setup & Credentials' cell, populate:

  1. BASE_MODEL

- Use the exact SageMakerHub model name from context

  1. MODEL_PACKAGE_GROUP_NAME

- Generate from use case (read use_case_spec.md if needed) - Format rules: - Lowercase, alphanumeric with hyphens only - 1-63 characters - Pattern: [a-zA-Z0-9](-*[a-zA-Z0-9]){0,62} - Example: "Customer Support Chatbot" → customer-support-chatbot-v1

  1. Save notebook

2. RLVR Reward Function (for RLVR only, skip this section if technique is SFT or DPO)

2.1 Check Reward Function Status

  • Ask if user has a reward function already, or would like help creating one.

- If user says they have one → Ask for the SageMaker Hub Evaluator ARN. Only proceed to Section 2.3 once the user provides a valid Evaluator ARN. If they don't have it registered as a SageMaker Hub Evaluator, continue to 2.2. - If user says they do not have one → Continue to 2.2

2.2 Generate Reward Function From Template

  1. Follow workflow in references/rlvr_reward_function.md section "Helping Users Create Lambda Functions"

2.3 Set CUSTOM_REWARD_FUNCTION value

  1. Set the value for 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).

3. EULA review and acceptance

  1. Look up the official license link for the selected base model from references/eula_links.md
  2. Display the license to the user following the phrasing in references/eula_links.md. For OSS models: "This model is licensed under {License}. Please review the license terms here: {URL}." For Nova models: "This model is subject to the AWS Service Terms: {URL}."
  3. Check if the selected base model is a Meta/Llama model (model ID starts with meta-)

- If Meta/Llama: Tell the user they must read and agree to the EULA before using this model. Ask them to manually change ACCEPT_EULA to True in the notebook after reviewing the license. NEVER set ACCEPT_EULA to True yourself for Meta/Llama models. - If non-Meta: Inform the user of the license for their awareness. No code-level action needed — the ACCEPT_EULA variable and accept_eula parameter should already be omitted from the notebook (see Step 1.3).

4. Notebook Execution

  1. 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.
  2. 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:

  • DON'T suggest moving to next steps before training completes
  • DON'T elaborate on the next steps unless the user specifically asks you about them.

5. Continuous Customization

If the user wants to finetune a model they had already customized, follow the instructions in references/continuous_customization.md


References

  • 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-Tuning
  • dpo_example.md - Complete notebook template for Direct Preference Optimization
  • rlvr_example.md - Complete notebook template for Reinforcement Learning from Verifiable Rewards
  • continuous_customization.md - Instructions on fine-tuning an already fine-tuned model.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.93%
按下载量换算102

Claude

29.95%
按下载量换算93

Cursor

18.42%
按下载量换算57

Gemini CLI

9.11%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/awslabs/agent-plugins --skill finetuning 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills