[Docs] Rename docs_new/ to docs/ (#32123)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
zijiexia
2026-08-03 16:51:00 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent c949e91f18
commit b819d2fb5b
491 changed files with 122 additions and 102 deletions
+1 -1
View File
@@ -670,7 +670,7 @@ cd test && python3 run_suite.py --hw cuda --suite base-b-kernel-benchmark-test-1
## References
- `docs_new/docs/developer_guide/development_jit_kernel_guide.mdx`
- `docs/docs/developer_guide/development_jit_kernel_guide.mdx`
- `test/run_suite.py` — suite names, discovery of `test/registered/`, execution entrypoint for CI
- `python/sglang/test/ci/ci_register.py` — `register_cuda_ci` and AST registration rules
- `python/sglang/kernels/jit/utils/compile.py` — `load_jit`, `make_cpp_args`
+13 -13
View File
@@ -1,6 +1,6 @@
---
name: cookbook-add-model
description: Add a new model to the SGLang Cookbook (docs_new/, Mintlify), config-driven format — instantiate the model-agnostic template into a per-model config (+ benchmarks) JSX under src/snippets/configs/, an MDX page, the docs.json nav entry, NEW-tag hygiene, and the homepage vendor card. Interactive, multi-phase. Run with /cookbook-add-model.
description: Add a new model to the SGLang Cookbook (docs/, Mintlify), config-driven format — instantiate the model-agnostic template into a per-model config (+ benchmarks) JSX under src/snippets/configs/, an MDX page, the docs.json nav entry, NEW-tag hygiene, and the homepage vendor card. Interactive, multi-phase. Run with /cookbook-add-model.
disable-model-invocation: true
---
@@ -12,16 +12,16 @@ disable-model-invocation: true
> page (not the user) is the source of truth.
The cookbook is **config-driven**: two shared engines contain NO model-specific code —
`docs_new/src/snippets/_deployment.jsx` (the 5-dim deploy matrix) and
`docs/src/snippets/_deployment.jsx` (the 5-dim deploy matrix) and
`_playground.jsx` (the diff-based override Playground). Adding a model = adding **data**:
a per-model `config` (+ optional `benchmarks`) consumed by both engines, plus an MDX page
that imports them. No engine edits.
**Instantiate the model-agnostic template** (NOT a clone of any live cookbook — the
template is decoupled and covers all hardware + all axes):
- `templates/config.jsx.tmpl` → `docs_new/src/snippets/configs/<hf-org>/<model-slug>.jsx`
- `templates/config.jsx.tmpl` → `docs/src/snippets/configs/<hf-org>/<model-slug>.jsx`
- `templates/benchmarks.jsx.tmpl` → `…/<model-slug>-benchmarks.jsx` (skip if no numbers)
- `templates/page.mdx.tmpl` → `docs_new/cookbook/<category>/<Vendor>/<ModelName>.mdx`
- `templates/page.mdx.tmpl` → `docs/cookbook/<category>/<Vendor>/<ModelName>.mdx`
The template uses explicit `__TOKEN__` placeholders; you fill them, prune what the model
lacks, and replace the EXAMPLE cells with verified recipes. DeepSeek-V4 is a populated
@@ -156,26 +156,26 @@ this table (RTX PRO 6000, GH200, future chips) goes in the model's own `config.h
### Site-wiring (do all three)
- **`docs_new/docs.json`** — add the page under Cookbook → `<category>` → `<Vendor>`, at
- **`docs/docs.json`** — add the page under Cookbook → `<category>` → `<Vendor>`, at
the **top** of that vendor's `pages` (root-relative, no `.mdx`:
`cookbook/<category>/<Vendor>/<Model>`). New vendor group → insert in the section's
local ordering.
- **NEW-tag hygiene** — the new page keeps `tag: NEW` (from the template). Scan the
vendor dir for existing NEW and strip it from siblings; verify ≤1:
`grep -rn 'tag: NEW' docs_new/cookbook/<category>/<Vendor>/` → at most one result. (Scan
`grep -rn 'tag: NEW' docs/cookbook/<category>/<Vendor>/` → at most one result. (Scan
files; don't assume the first `docs.json` entry holds NEW.)
- **Homepage card** — `docs_new/cookbook/<category>/intro.mdx`: if the org already has a
- **Homepage card** — `docs/cookbook/<category>/intro.mdx`: if the org already has a
`<Card>`, update only its `href` (keep `img`). If the org is **new**, add a `<Card>`
(title = nav-group name; keep card order aligned with `docs.json`) **and create its logo**:
ask the user for the brand logo, then generate the conforming **icon-only 940×525 RGBA
transparent** PNG → `docs_new/cards/logos/<org-slug>.png` per
transparent** PNG → `docs/cards/logos/<org-slug>.png` per
[references/vendor-logo.md](references/vendor-logo.md) (track with `git add -f` — `*.png`
is gitignored repo-wide). Never invent or copy a logo.
## Phase 3 — Validate
```bash
cd docs_new
cd docs
mint validate # frontmatter, missing nav entries, MDX/JSX errors
mint broken-links
mint dev # visual smoke test at http://localhost:3000/cookbook/<category>/<Vendor>/<Model>
@@ -218,10 +218,10 @@ Always branch — never commit to main directly.
```bash
git checkout -b add-<model>-cookbook
git add docs_new/src/snippets/configs/<hf-org>/<slug>.jsx \
docs_new/src/snippets/configs/<hf-org>/<slug>-benchmarks.jsx \
docs_new/cookbook/<category>/<Vendor>/<Model>.mdx \
docs_new/docs.json docs_new/cookbook/<category>/intro.mdx
git add docs/src/snippets/configs/<hf-org>/<slug>.jsx \
docs/src/snippets/configs/<hf-org>/<slug>-benchmarks.jsx \
docs/cookbook/<category>/<Vendor>/<Model>.mdx \
docs/docs.json docs/cookbook/<category>/intro.mdx
git commit -m "Add <Display-Name> cookbook"
git push -u origin add-<model>-cookbook
gh pr create --title "Add <Display-Name> cookbook" --body "..."
@@ -4,8 +4,8 @@ Loaded on demand by the `cookbook-add-model` skill. This is the field-by-field
contract for when the clone needs more than a rename. The two engine files are
the canonical specs — read their headers first:
- [`_deployment.jsx`](../../../../docs_new/src/snippets/_deployment.jsx) — the matrix widget; its header lists every config field. Dimensions are the legacy fixed five by default, or config-declared via `matchDims` / `overlayDims` (§2.1b).
- [`_playground.jsx`](../../../../docs_new/src/snippets/_playground.jsx) — the diff-based override widget; lists the `playgroundFeatures` axes + the `AXIS_HANDLERS` interface.
- [`_deployment.jsx`](../../../../docs/src/snippets/_deployment.jsx) — the matrix widget; its header lists every config field. Dimensions are the legacy fixed five by default, or config-declared via `matchDims` / `overlayDims` (§2.1b).
- [`_playground.jsx`](../../../../docs/src/snippets/_playground.jsx) — the diff-based override widget; lists the `playgroundFeatures` axes + the `AXIS_HANDLERS` interface.
Engine extension (adding a new playground axis) lives in [engine-axis.md](engine-axis.md).
@@ -13,7 +13,7 @@ Engine extension (adding a new playground axis) lives in [engine-axis.md](engine
## 2.1 Create the config file
**Path**: `docs_new/src/snippets/configs/<vendor>/<model>.jsx`. The vendor folder is
**Path**: `docs/src/snippets/configs/<vendor>/<model>.jsx`. The vendor folder is
the HuggingFace org (`deepseek-ai`, `Qwen`, `moonshotai`, ...); the file
name is a short hyphenated model id (`deepseek-v4`, `qwen3.5`, ...).
@@ -217,7 +217,7 @@ schemas (full reference in the `_playground.jsx` header):
## 2.4 Create the MDX page
Path: `docs_new/cookbook/<category>/<Vendor>/<Model>.mdx`. Import both widgets and
Path: `docs/cookbook/<category>/<Vendor>/<Model>.mdx`. Import both widgets and
the per-model config, render them inside the relevant sections:
```mdx
@@ -1,7 +1,7 @@
# Vendor card logo (new brand only)
A new vendor/brand in the cookbook landing grid needs a card logo at
`docs_new/cards/logos/<org-slug>.png`. **Ask the user for the brand's logo, then generate
`docs/cards/logos/<org-slug>.png`. **Ask the user for the brand's logo, then generate
the conforming PNG** — never invent, copy, or hallucinate one, and never ship a
non-conforming file. Reference: PR #27400 (added `tencent.png` + `poolside.png`).
@@ -11,7 +11,7 @@ If the org already has a card/logo, do nothing here — only update the `<Card h
| Property | Value |
|---|---|
| Path | `docs_new/cards/logos/<org-slug>.png` — lowercase, matches the `img=` in the `<Card>` |
| Path | `docs/cards/logos/<org-slug>.png` — lowercase, matches the `img=` in the `<Card>` |
| Canvas | **940 × 525** px |
| Mode | **RGBA**, fully **transparent** background |
| Content | **Icon-only** — the brand glyph/mark (the "swirl"), **no wordmark text** |
@@ -47,7 +47,7 @@ scale = target_h / src.height
glyph = src.resize((round(src.width * scale), target_h), Image.LANCZOS)
canvas = Image.new("RGBA", (W, H), (0, 0, 0, 0)) # transparent
canvas.paste(glyph, ((W - glyph.width) // 2, (H - glyph.height) // 2), glyph)
canvas.save("docs_new/cards/logos/<org-slug>.png")
canvas.save("docs/cards/logos/<org-slug>.png")
```
Notes:
@@ -60,7 +60,7 @@ Notes:
## 3. Verify
```bash
sips -g pixelWidth -g pixelHeight -g hasAlpha docs_new/cards/logos/<org-slug>.png
sips -g pixelWidth -g pixelHeight -g hasAlpha docs/cards/logos/<org-slug>.png
# → pixelWidth: 940 pixelHeight: 525 hasAlpha: yes
```
@@ -71,6 +71,6 @@ sips -g pixelWidth -g pixelHeight -g hasAlpha docs_new/cards/logos/<org-slug>.pn
# <Card title="<NavGroup>" mode="card"
# href="/cookbook/<category>/<Vendor>/<Model>"
# img="/cards/logos/<org-slug>.png" />
git add -f docs_new/cards/logos/<org-slug>.png # root .gitignore ignores *.png repo-wide
cd docs_new && mint validate && mint broken-links # confirms the card href + img resolve
git add -f docs/cards/logos/<org-slug>.png # root .gitignore ignores *.png repo-wide
cd docs && mint validate && mint broken-links # confirms the card href + img resolve
```
@@ -1,5 +1,5 @@
// TEMPLATE — instantiate via the cookbook-add-model skill. NOT a live cookbook.
// Copy to docs_new/src/snippets/configs/<hf-org>/<model-slug>-benchmarks.jsx and
// Copy to docs/src/snippets/configs/<hf-org>/<model-slug>-benchmarks.jsx and
// fill measured numbers — OR delete this file entirely if you have none yet (the
// MDX simply omits the `benchmarks` import/prop).
//
@@ -1,5 +1,5 @@
// TEMPLATE — instantiate via the cookbook-add-model skill. NOT a live cookbook.
// Copy to docs_new/src/snippets/configs/<hf-org>/<model-slug>.jsx, then:
// Copy to docs/src/snippets/configs/<hf-org>/<model-slug>.jsx, then:
// 1. replace every __TOKEN__,
// 2. fill cells[] with your verified recipes (the examples below show the shape),
// 3. DELETE the hardware / playground axes / quantizations your model lacks.
@@ -1,6 +1,6 @@
---
name: cookbook-migrate-model
description: Migrate a legacy-template SGLang cookbook page (monolithic per-model generator under docs_new/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>.
description: 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>.
---
# Cookbook Migrate Model
@@ -93,7 +93,7 @@ your dispatch prompt, or ask for it.
## Workflow (one model = one PR)
### 1. Inventory the legacy assets
- Read the legacy generator (`docs_new/src/snippets/autoregressive/<slug>-deployment.jsx`)
- Read the legacy generator (`docs/src/snippets/autoregressive/<slug>-deployment.jsx`)
end-to-end: every option dimension (radio vs checkbox vs dynamic), every
gate/SUPPORT matrix, the full emitted command per reachable combo (env
prefixes, `# Error` pseudo-commands included).
@@ -102,7 +102,7 @@ your dispatch prompt, or ask for it.
Output Examples verbatim); §5 benchmark blocks → transcribe each measured
block: deploy command used, bench command (dataset/isl/osl/num-prompts/
concurrency), P50 (median) TTFT/TPOT, output tok/s, hardware, version string.
- Inbound-anchor sweep: `grep -rn "<PageName>" docs_new/ --include='*.mdx'` —
- Inbound-anchor sweep: `grep -rn "<PageName>" docs/ --include='*.mdx'` —
find links/`#fragments` into this page (`mint broken-links` does NOT check
fragments). Fix referrers or add `<a id="old-anchor" />` shims in the same PR.
- Check the maintainer-provided inventory notes for this model's known quirks —
@@ -205,14 +205,14 @@ collapsible (required, DeepSeek-V4 pattern): code in an
`<Accordion title="Example Output">`; legacy pages kept them inline.
### 6. Delete the legacy generator
Remove `docs_new/src/snippets/autoregressive/<slug>-deployment.jsx` and its
import. `grep -rn "<slug>-deployment" docs_new/` must return nothing (config
Remove `docs/src/snippets/autoregressive/<slug>-deployment.jsx` and its
import. `grep -rn "<slug>-deployment" docs/` must return nothing (config
provenance comments must not name the deleted path). Site wiring needs **no
changes**: docs.json path/title unchanged, vendor card + logo already exist.
### 7. Validate
- `grep -rn '__[A-Z_]*__'` on the new files (no template tokens).
- `cd docs_new && mint validate && mint broken-links` (pre-existing breaks on
- `cd docs && mint validate && mint broken-links` (pre-existing breaks on
main are not yours — say so in the PR).
- `mint dev` browser smoke: initial selection = the verified cell (first in
`cells[]`) with green badge; multi-node cells show the injected trio +
+10 -10
View File
@@ -1,6 +1,6 @@
---
name: cookbook-review-pr
description: Review a pull request against the SGLang Cookbook (docs_new/, Mintlify) contribution checklist — the config-driven format (per-model config + benchmarks JSX consumed by the shared _deployment.jsx / _playground.jsx engines). Run with /cookbook-review-pr <PR number>.
description: Review a pull request against the SGLang Cookbook (docs/, Mintlify) contribution checklist — the config-driven format (per-model config + benchmarks JSX consumed by the shared _deployment.jsx / _playground.jsx engines). Run with /cookbook-review-pr <PR number>.
---
# Cookbook Review PR
@@ -29,9 +29,9 @@ than restating.
## Checklist
### 1. File hygiene
- A cookbook PR should only touch: `docs_new/src/snippets/configs/<vendor>/*.jsx`
(config + benchmarks), `docs_new/cookbook/**/*.mdx`, `docs_new/docs.json`,
`docs_new/cookbook/<category>/intro.mdx` (vendor card), `docs_new/cards/logos/<vendor>.png`
- A cookbook PR should only touch: `docs/src/snippets/configs/<vendor>/*.jsx`
(config + benchmarks), `docs/cookbook/**/*.mdx`, `docs/docs.json`,
`docs/cookbook/<category>/intro.mdx` (vendor card), `docs/cards/logos/<vendor>.png`
(new vendor only). Flag stray files (`settings.local.json`, lockfiles, IDE configs).
- Pages must be `.mdx`, not `.md`. Files end with a trailing newline. Check commit history
for unrelated commits accidentally included.
@@ -162,20 +162,20 @@ than restating.
other model page has. Leave `mode` unset (the Deploy/Playground panels self-cap at 900px, so
the default column holds them fine). `mode: wide` belongs only on category `intro.mdx` grids.
- `tag: NEW` only for genuine new launches; when one is added, stale `tag: NEW` on older
pages should be dropped in the same PR (`grep -RlE "^tag: NEW" docs_new/cookbook/`).
pages should be dropped in the same PR (`grep -RlE "^tag: NEW" docs/cookbook/`).
- MDX imports BOTH `Deployment` and `Playground` from `/src/snippets/...` (absolute).
- Deploy heading slugs to `deployment` (or `deploy`), Playground to `playground` — so
"↑ Switch base" and "Open the Playground →" scroll. No numbered headings for these two.
### 8. Navigation & homepage
- New page → `docs_new/docs.json` updated: under the right vendor group inside
- New page → `docs/docs.json` updated: under the right vendor group inside
`navigation` → Cookbook → Autoregressive Models, root-relative, **no `.mdx`**:
`cookbook/<category>/<Vendor>/<Model>`.
- Homepage `<Card href>` in `docs_new/cookbook/<category>/intro.mdx` points to the vendor's
flagship; new vendors get a new `<Card>` + a logo at `docs_new/cards/logos/<vendor>.png` —
- Homepage `<Card href>` in `docs/cookbook/<category>/intro.mdx` points to the vendor's
flagship; new vendors get a new `<Card>` + a logo at `docs/cards/logos/<vendor>.png` —
**940×525 RGBA transparent, icon-only (no wordmark)**, lowercase filename, tracked via
`git add -f` (`*.png` is gitignored repo-wide). Card order matches the `docs.json` nav order.
- Don't change `docs_new/cookbook/intro.mdx` for individual model adds (top-level only).
- Don't change `docs/cookbook/intro.mdx` for individual model adds (top-level only).
### 9. Links & factual
- HuggingFace URLs resolve to a real model. License section matches the actual HF license
@@ -232,7 +232,7 @@ than restating.
### 13. Build / validate
```bash
cd docs_new
cd docs
mint validate
mint broken-links
```
@@ -32,7 +32,7 @@ Use these upstream files when the workflow or behavior needs to be justified fro
## Documentation and tests
- `docs_new/docs/developer_guide/benchmark_and_profiling.mdx`
- `docs/docs/developer_guide/benchmark_and_profiling.mdx`
- canonical profiling docs
- `test/registered/profiling/test_start_profile.py`