跳到正文
Skillpedia
智能体9.8k · #12212

kev-finetune

它能做什么

这个技能会用你自己的示例训练 Kev 决策模型,使其回答符合你的具体问题,然后进行部署和评估。适合希望让决策模型适应自身数据的团队。

适用场景

  • ✓当你手上有已标注结果的决策示例,并希望将其自动化时。
  • ✓当现有的托管模型与你的数据不太匹配时。
  • ✓当你想进行可量化的对比,判断微调是否真正有效时。

技能链接

https://github.com/jaredpalmer/kev/blob/main/skills/kev-finetune/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/jaredpalmer/kev/blob/main/skills/kev-finetune/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我有一个文件夹,里面是按结果标注的过往客服工单。请用它们微调 Kev,并告诉我它是否优于默认版本。”

每周 5 个新技能,1 分钟读完。

工作原理

这个技能会找到你现有的问题或标注数据,并将其转换为训练记录,也可以选择生成更多示例。它在 Modal 上完成训练和校准,将结果与已发布的模型进行评分对比,部署一个端点,然后进行清理。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Fine-tune Kev on the user's workload

Jev (TypeSafe's System One model) answers typed questions about a text without generating tokens, but it is a fixed hosted model: on the user's data it is out of distribution and its probabilities cannot be recalibrated. Kev is the open reconstruction; because it can be trained, you can fine-tune it on a few hundred to a few thousand labelled examples of the user's exact questions and fit its temperature on a held-out slice, so the probabilities it serves are calibrated for their data. This skill takes a user from "I have this decision to automate" to a deployed, measured endpoint, then cleans up. Nothing needs a local GPU or a clone of the Kev repo.

Scripts (scripts/) are short, standard-library Python plus one Modal app. If the user's case does not fit them, read the script and change it; they are meant to be edited, not worked around.

Script Purpose
extract_workload.py scan a codebase for Jev / TypeSafe / System One calls and labelled data; draft workload.json
convert_data.py CSV / JSONL of existing labelled examples -> Kev records (column mapping)
generate_data.py workload spec -> balanced labelled records via any OpenAI-compatible model; --dry-run prints the prompt
plan_size.py how many records make the fine-tune vs baseline comparison statistically meaningful
split_data.py validate records, split by state into train / calibration / development
kev_modal.py Modal: validate, train, evaluate, compare, pull, publish, teardown, and the Serve endpoint

Run modal as uvx modal ... if it is not installed. Commands below run from the skill directory.

Phase 0: interview

Do not generate anything before you can answer these. Ask what you cannot infer; keep it to one round if possible.

  1. The decision. What is being decided, about what input, and what happens with the answer (route, escalate, score, block)? One sentence each. If they mention automating a share of the volume, note the error rate they can tolerate: that becomes the coverage-at-error target.
  2. Where it lives today. Run python3 scripts/extract_workload.py <their repo> --out workload.json. It lists files that call Jev / TypeSafe / /v1/systemone (Python SDK Noul/Choice/Score, AI SDK experimental_evaluate, raw request bodies), extracts question literals with _source file:line, and lists CSV/JSON/JSONL files that look labelled. Read the sources it points at and fix every _todo. If there is no such code, write the questions with the user in the System One shape (assets/workload.example.json, rules in references/data-format.md).
  3. Labelled data they already have. Tickets with their routing, logs with outcomes, a spreadsheet of judgments. Even 50 real rows matter: they become the development set or the style reference for generation. If yes, plan to use convert_data.py.
  4. Data source for the rest. Offer, in this order: (a) convert existing labels; (b) an LLM writes records from the spec (generate_data.py; ask which endpoint and key they want to use: OpenAI, Vercel AI Gateway, Ollama, or any OpenAI-compatible URL); (c) you write records yourself from the --dry-run prompt in batches of 20 (fine for the first 100, slow beyond).
  5. Base size. Recommend jaredpalmer/kev-4b (~12 min and ~$1 per run for 400 records, ~15 min for 1000). kev-0.8b for fast loops, kev-9b for the final model. Same recipe on all three; a run transfers unchanged.
  6. Deployment and money. Modal account ready (modal setup)? Budget: each train prints a cost bound before it starts. Where will the model be called from (so you can wire the endpoint in at the end)? Should the checkpoint stay on the Modal volume (default), be pulled locally, or be published to a private Hub repo?

Record the answers in workload.json (domain, state, state_example if inputs are objects, questions, guidance with the labelling rules, variety). The questions must be the exact instructions and option names production will send: the fine-tune binds those strings.

Phase 1: data

python3 scripts/plan_size.py workload.json --baseline-acc 0.75 --min-gain 0.05        # how many records
python3 scripts/convert_data.py workload.json their.csv --state body --label team=dept --out data/x.real.jsonl   # if they have labels
export KEV_GEN_API_KEY=...   # or OPENAI_API_KEY / A
常见问题

我需要多少示例?

技能说明需要几百到几千条带标签的示例,并可以计算出进行公平对比所需的数量。

我需要 GPU 或 Kev 的代码吗?

不需要。训练在 Modal 上运行,你不需要本地 GPU,也不需要复制代码仓库。

它会让概率更准确吗?

会。它会在保留数据集上拟合一个温度参数,因此概率会针对你的数据进行校准。

详情

作者的原始描述

Fine-tune a Kev decision model (open Jev-style System One model) on a user's own workload and serve it with calibrated probabilities. Interviews the user, finds existing Jev/TypeSafe questions or labelled data in their codebase, generates enough synthetic training data to measure a gain, trains and calibrates on Modal, scores against the released checkpoint, deploys a TypeSafe-compatible endpoint, and tears everything down. Use when someone wants noul/choice/score questions answered on their own domain (routing, triage, moderation, classification, scoring), wants calibrated confidence for auto

repo: jaredpalmer/kev

热度

GitHub 星标
9.8k
排名
#12212
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能