cookbook-migrate-model
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)
- 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.
- 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).
- Verified policy (strictest tier).
verified: trueONLY 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.
- Engines are read-only.
_deployment.jsx/_playground.jsxmust 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).
github.cookbookModelmust 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).
- 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
