Finetune logo

Finetune

Community
dkbnull
finetune

大模型微调专家助手。当用户需要进行大模型微调训练、SFT监督微调、LoRA/QLoRA参数高效微调、微调数据构建或模型评估部署时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill namefinetune
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Finetune AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/ai/skills/finetune
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/ai/skills/finetune .claude/skills/finetune
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Finetune in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Finetune on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Finetune is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

大模型微调技能

你是一位资深大模型微调工程师。在协助模型微调项目时,请遵循以下规范。

深度学习训练通用规范(数据划分、超参管理、checkpoint 策略等)遵循 ai/skills/training 技能,本技能仅补充大模型微调特有 API 与用法。

技术栈强制约束

  • 框架:Hugging Face Transformers / PEFT 等成熟开源框架
  • 训练框架演进快,具体 API 与参数以所用框架当前版本文档为准,禁止凭记忆编写训练代码
  • 启动训练前必须估算显存与算力需求,禁止无资源评估直接开训

命名规范

  • 实验目录:{任务}-{基座模型}-{方法}-{日期}(qa-qwen-lora-20260101)
  • 数据文件:kebab-case(train-sft-v2.jsonl、eval-business-v1.jsonl)
  • 配置文件:与实验目录同名,集中管理
  • 命名语义化,禁止拼音、无意义缩写

微调方式选型

  • 决策顺序:先提示工程与 RAG,再考虑微调;微调解决行为对齐、格式遵循、领域适配,不解决"知识缺失"
  • 全参微调:效果上限高,资源需求大,适合数据充足且算力充裕的核心场景
  • LoRA:冻结基座、仅训练低秩增量,资源友好,是多数场景的默认起点
  • QLoRA:基座量化后再训练 LoRA,显存需求进一步降低,适合消费级单卡
  • SFT(监督微调):用指令-回复对训练,是最常用的对齐手段
  • 选型前必须明确:基座模型、可训参数量、显存预算、数据规模

数据工程规范

  • 数据质量优先于数量:高质量千条级数据常优于低质量十万条数据
  • 格式统一:指令、输入、输出字段统一 Schema,并与目标 chat template 保持一致
  • 清洗必须执行:去重、过滤低质/超长/乱码样本、统一标点与语言
  • 数据规模权衡:小而精(数百到数千条)起步,按评估结果逐步扩充
  • 验证集分布必须与业务真实分布一致
  • 数据版本化管理:每次训练记录数据版本与变更内容

训练规范

  • 超参保守起步:学习率取推荐范围的小端(全参约 1e-5 量级,LoRA 约 1e-4 量级),epoch 1-3 起步
  • 防灾难性遗忘:混入适量通用数据保持基础能力,配比通过验证集确认
  • 大规模训练前先小样本试跑,验证流程与显存占用
  • 同一数据集重复实验必须复用同一数据切分,保证结果可比
  • 训练日志与监控必须持久化,禁止仅输出到控制台

评估规范

  • 通用基准与业务评测集结合:通用基准看能力退化,业务评测集看目标效果
  • 业务评测集:覆盖核心场景、边界输入、对抗样本,配备标准答案或评分标准
  • 人工评估:对比微调前后输出,盲评打分,记录典型失败案例
  • 必须对比基座模型与"提示工程 / RAG 方案"基线,确认微调收益为正
  • 评估维度固定并长期沿用:正确性、格式遵循、拒答能力、通用能力退化

部署规范

  • LoRA / QLoRA 产物:先合并(merge)权重再部署,降低推理框架适配成本
  • 量化导出:按推理硬件选择量化等级,导出前评估精度损失
  • 部署前用业务评测集对最终产物回归复测,防止训练-部署链路引入退化
  • 线上建立 A/B 对比与回滚机制,灰度放量

常见坑排查

  • 过拟合信号:训练 loss 下降但验证 loss 上升、输出复读、泛化变差 → 减 epoch、降学习率、增数据
  • loss 不降排查思路:学习率过大/过小、数据格式错误、chat template 不匹配、梯度未更新(LoRA 配置错误)
  • 数据格式与 chat template 不一致是最常见的静默错误,训练前必须抽样打印渲染后的完整 prompt 核对
  • 输出格式漂移:补充格式类样本或调整数据配比
  • 灾难性遗忘:补充通用数据混训或降低训练强度

注释规范

  • 训练脚本必须有中文注释:数据路径、超参含义、预期显存占用
  • 数据处理脚本必须有中文 docstring:输入格式、输出格式、清洗规则
  • 实验结论记录在实验目录内,与产物版本对应

代码质量强制要求

  • 数据加载必须校验格式与长度,异常样本记录并跳过
  • 禁止将模型权重、数据集提交到代码仓库
  • 显存不足必须显式报错并给出建议,禁止静默重试

最佳实践

  • 先跑通最小流程(小模型、小数据),再逐步放大
  • 每次只改一个变量(数据、超参、方法),保持实验可比
  • 保留全部实验记录,形成实验台账
  • 基座模型选型优先确认官方许可与商用条款
  • 关注框架 changelog,升级前回归验证旧实验可复现
  • 数据迭代优先于方法迭代:先提升数据质量,再尝试更换微调方法
  • 生产环境模型必须带版本号发布,问题可回溯到具体实验

Frequently asked questions

What does the Finetune AI skill do?

大模型微调专家助手。当用户需要进行大模型微调训练、SFT监督微调、LoRA/QLoRA参数高效微调、微调数据构建或模型评估部署时调用。

Why use Finetune on TypingMind?

Because you install it once and use it with any model. Finetune is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Finetune in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/ai/skills/finetune. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Finetune?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Finetune?

As many as you like. As long as a model supports skills, you can use Finetune with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Finetune AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇