← 返回列表
全部 Skill›商业 Business›cookbook-migrate-model

cookbook-migrate-model

作者 @sgl-project · 语言 en
Migrate a legacy-template SGLang cookbook page (monolithic per-model generator under docs/src/snippets/autoregressive/) onto the config-driven template (shared _deployment.jsx / _playground.jsx engines + per-model config). Use when asked to migrate, convert, or port an existing cookbook page — NOT for brand-new models (use cookbook-add-model for those). Run with /cookbook-migrate-model <Model page name, e.g. GLM-5.1>.
商业 Business房地产与法律通用待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
39,028
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Cookbook Migrate Model

Convert one legacy cookbook page to the config-driven format, faithfully. The

legacy page — its generator widget and its measured benchmark blocks — is the

single source of truth. You are transcribing it into the new data model,

not improving it.

Reuses the cookbook-add-model skill's assets (read them on demand):

  • ../cookbook-add-model/templates/config.jsx.tmpl, page.mdx.tmpl, benchmarks.jsx.tmpl
  • ../cookbook-add-model/references/authoring-reference.md (config/cells/playground contract)
  • ../cookbook-add-model/references/mintlify-authoring.md (MDX rules)

Migration-specific references in this skill:

  • references/dimension-mapping.md — legacy-control → new-dimension mapping rules, command rewrite table, per-family strategy sets, and the Qwen3.5 pilot as a worked example (PR #27848).

The round's per-model inventory (scope, batch order, quirks, measured-data

survey) is tracked by the migration maintainer outside the repo — expect it in

your dispatch prompt, or ask for it.

Hard rules (non-negotiable)

  1. Never modernize. Env vars, flags, TP values, docker tags, version strings

are copied verbatim from the legacy page — even when today's defaults differ

(e.g. a flag whose behavior has since become the default; keep it anyway). The recipe

that was verified is the recipe as written. Allowed normalizations are ONLY

the five alias rewrites in dimension-mapping.md §2 (launch_server→`sglang

serve, --model→--model-path, --tp-size→--tp`, abbreviated

--speculative-algo→--speculative-algorithm,

--expert-parallel-size→--ep). Accuracy-degrading flags

(--kv-cache-dtype fp8_e4m3, W4A4-style runtime quant) follow a

deterministic rule — enforced in migration, no asking: offered as a

legacy selectable option → never select it (cells mirror the

accuracy-safe side), and the option survives as a Playground axis —

an existing one where it fits, else add one via a separate prior engine

PR (rule 4); a legacy choice never degrades to a tips mention. Baked

into the recipe's default/unconditional command → keep it verbatim

(the recipe was measured with it, and fp8 KV halves KV memory —

stripping could OOM it). See dimension-mapping.md §2 caveats.

  1. Never invent versions or numbers. Benchmark numbers only from the

legacy page's measured blocks, and a result migrates ONLY when its

sglang_version is a reproducible anchor — the bar is reproducibility,

not "must be a release":

  • ✅ release tag/version (v0.5.9 / 0.5.9), commit hash, OR — for

Day-0 support (the enabling PR isn't merged and no release is cut

yet) — a specific PR (PR #27944) or commit you can gh pr checkout

/ git checkout <sha>. Commit is most precise; a PR pin is fine for day-0.

  • ❌ a moving ref — "main branch", "main (2026-06-11)", open-ended

"0.5.8+" — is NOT reproducible: **drop the WHOLE result (speed AND

accuracy)**, not just speed. Keep benchmarkCommands so ⚡Reproduce still

guides re-measurement against a pinned build.

Never inherit cross-model numbers — measurements the legacy page

attributes to a *different model* (e.g. a K2.6 page carrying K2.5-measured

speed) are dropped regardless of version. When kept, sglang_version is the

legacy page's string verbatim. Docker tags only the ones the legacy page

pinned (unmapped hw falls back to :dev).

  1. Verified policy (strictest tier). verified: true ONLY when (a) the

legacy page has concrete measured data for that exact 5-dim combo AND

(b) the cell's flags equal the deployment command used for that measurement

— modulo {{HOST_IP}}/{{PORT}}, the five alias rewrites, and **parser

flags**: --reasoning-parser/--tool-call-parser are stripped from every

cell (Playground-only feature; when the measured run had them on, say so in

the benchmarks file header). When the measured command diverges from the

generator default, the verified cell follows the measured command; the

generator default stays as the sibling strategy/cell or a tips note. Everything else is unverified (yellow) —

including combos that look memory-infeasible; keep them verbatim and list

them in the PR body for the re-verification track.

  1. Engines are read-only. _deployment.jsx / _playground.jsx must not

change in a migration PR. Model-specific features are config DATA consumed

by generic axis handlers (MegaMoE precedent), so they need NO engine change.

A titled single-select that strips a flag family — KV Cache DType

(--kv-cache-dtype), mamba (--mamba-radix-cache-strategy), … — is already

covered by the merged generic flagSelects axis: declare it in the

config (a list of { id, title, stripPrefixes, options }; see the Qwen3.5

mamba example), no engine PR. Only a genuinely new control *shape* that

flagSelects can't express would need a one-time generic primitive (never a

model-named handler) on a separate prior PR (engine-axis.md).

  1. github.cookbookModel must be set (<hf-org>/<page-slug>, e.g.

qwen/qwen3.5) and the block never pruned — without it Submit ↗ mislabels

as deepseek-v4. The issue template itself needs NO edits (free-form input).

  1. Strategy tiers are signal-driven. A cell goes under low-latency /

high-throughput ONLY on a signal present in the legacy source (an

explicit perf

评论
Ssgl-project
sgl-project
sgl-project/sglang
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@sgl-project
所属大类商业 Business / 房地产与法律
国内可用性通用
最近源活动—
风险提示无
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。