[Config] Retire get_global_server_args, and clear the deprecated flags that have a replacement (#38375)
This commit is contained in:
@@ -178,7 +178,7 @@ schemas (full reference in the `_playground.jsx` header):
|
||||
| `pdDisagg` | Mode + transfer backend (+ optional per-backend env via `envWhen` hw-gate) + IB device + optional `router{port, command}` | Model supports prefill/decode disaggregation. A `modes[]` entry may carry `flags` / `env` that only that role needs (`prefill`'s `--load-balance-method`, `decode`'s `--disaggregation-decode-polling-interval`, ...); they are emitted only while that role is selected, and a flag whose head the base cell already sets is replaced rather than duplicated. Put role-specific settings here, NOT in the cells — a cell carries one recipe, and the role is a Playground overlay. In `router.command` the ports MUST be `{{PREFILL_PORT}}` / `{{DECODE_PORT}}` / `{{ROUTER_PORT}}`: the engine substitutes them from its own `PD_PORTS` (prefill 30000, decode **30100**), so a literal port silently points the router at something the generated decode command never binds. When a PD role is active and `router` is set, the playground shows the router (SGLang Model Gateway) launch command as a companion block and retargets the cURL modal to `router.port`. |
|
||||
| `hicache` | Enable + storage + write policy | Model is large enough that hierarchical KV cache matters. |
|
||||
| `hisparse` | Enable + host-ratio select; whole card gated on the live PD-Disagg mode being `decode` | DSA-style model (DeepSeek-V3.2 / V4, GLM-5) that supports decode-side hierarchical sparse attention. |
|
||||
| `flagSelects` | A config-declared **list** of single-selects, each `{ id, title, stripPrefixes, options }` (option = `{ id, label, flags?, hide?, disable?, disableReason? }`); a flagless option is the "none"/accuracy-safe choice | A titled single-select that picks one value of a flag family the other axes don't model — e.g. KV-cache dtype (`--kv-cache-dtype`), mamba scheduler strategy (`--mamba-scheduler-strategy`). Generic: no engine change to add another. |
|
||||
| `flagSelects` | A config-declared **list** of single-selects, each `{ id, title, stripPrefixes, options }` (option = `{ id, label, flags?, hide?, disable?, disableReason? }`); a flagless option is the "none"/accuracy-safe choice | A titled single-select that picks one value of a flag family the other axes don't model — e.g. KV-cache dtype (`--kv-cache-dtype`), mamba scheduler strategy (`--mamba-radix-cache-strategy`). Generic: no engine change to add another. |
|
||||
|
||||
**Per-chip constraints**: any chip entry in any axis can be wrapped with
|
||||
`hide` / `disable` constraint objects:
|
||||
|
||||
@@ -73,7 +73,7 @@ your dispatch prompt, or ask for it.
|
||||
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-scheduler-strategy`), … — is already
|
||||
(`--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
|
||||
@@ -129,7 +129,7 @@ mention — and a model-specific control is **config data, not engine code**
|
||||
(MegaMoE W4A4 is all DSv4 config on the existing `moe` axis). It's pure
|
||||
config whenever it fits an existing axis's data schema. A **titled
|
||||
single-select that strips a flag family** (Nemotron3's "KV Cache DType",
|
||||
mamba `--mamba-scheduler-strategy`, …) fits the merged generic **`flagSelects`**
|
||||
mamba `--mamba-radix-cache-strategy`, …) fits the merged generic **`flagSelects`**
|
||||
axis — so it too is config-only (declare a `flagSelects` list). Only a control
|
||||
whose *shape* `flagSelects` still can't express would need a ONE-TIME generic
|
||||
primitive (never a model-named handler) on a separate PRIOR engine PR, keeping
|
||||
|
||||
@@ -15,7 +15,7 @@ this file is about the *mapping decisions*.
|
||||
| toggle that **couples** with other parts of the command (changes TP/mem/EP), OR one the legacy page labels with **operating-point words** | `strategies` | The Playground applies pure flag diffs — it cannot do coupled changes. Example: Qwen3.5's MTP toggle bumps TP on three H100 combos → strategies `low-latency` (MTP on) / `high-throughput` (MTP off). **Naming counts like coupling**: GLM-5.1's / Kimi-K2.6's `dpattention` adds only `--dp N --enable-dp-attention` (uncoupled), but its options are subtitled "Low Latency" / "High Throughput" — the page's own named operating-point split → strategies; a flag-only spec toggle riding alongside it stays a Playground axis and bakes per its legacy default. GPU-count radios (GLM-4.7, MiniMax-M2.5/2.7) → budget-tier strategies with the legacy SUPPORT matrix preserved by which cells exist. Strategy count follows the page's operating points: 1 → `balanced`, 2 → `low-latency`+`high-throughput`, 3 → the full trio (§4). |
|
||||
| toggle that only adds/removes its own flags | Playground axis (+ bake, EXCEPT parsers and accuracy-degrading flags) | **Parsers (`--reasoning-parser` / `--tool-call-parser`) are NEVER baked into cells** — Deployment commands ship without them regardless of the legacy default or the measured command; the `parsers` axis adds them on top (DSv4 convention; cells mirror the legacy generator's parsers-OFF output). Accuracy-degrading toggles are never baked either — §2 caveats (axis-only, accuracy-safe cells). Other flag-only toggles: legacy default ON → bake into cells AND declare the axis so users can strip (red strikethrough); default OFF → keep cells clean, axis preset only. MTP/EAGLE presets → `speculative` axis; dp-attention → a strategy when the legacy page labels it as the operating-point split or when coupled (see the row above), else `attention.dpAttn`. **EVERY legacy control survives as an interactive control** (a dimension or a Playground axis), never a tips-only mention — but a model-specific control is **config DATA, not engine code**: the axis handler reads options/flags/env/gating straight from `config.playgroundFeatures` (MegaMoE W4A4 is entirely DSv4 config data on the existing `moe` axis — no per-model engine edit). A control that fits an existing axis's data schema is therefore pure config, full stop. A **titled single-select that strips a flag family** (e.g. Nemotron3's "KV Cache DType" `--kv-cache-dtype`) is covered by the merged generic **`flagSelects`** axis → **config-only**: declare a `flagSelects` list of `{ id, title, stripPrefixes, options }` (see the Qwen3.5 mamba example), **no engine PR**. Only a control whose *shape* `flagSelects` still can't express would need a new ONE-TIME generic primitive (never a model-named handler) on a prior engine PR; the backward-compat reasoning (opt-in per key, not in the opt-out set) is in engine-axis.md. |
|
||||
| per-combo hidden option (e.g. spec hidden on Xeon) | absent cells | Don't create cells for combos the legacy widget couldn't produce; the engine greys them automatically. `# Error:` pseudo-commands → no cell + explanation in §2 tips and/or a chip `disable`/`disableReason`. |
|
||||
| coupled secondary knob (e.g. mamba cache V1/V2) | cells + Playground axis | Bake the correct value per cell following the legacy coupling (Qwen3.5: MTP ⇒ `--mamba-scheduler-strategy extra_buffer` on NVIDIA; AMD/Xeon ⇒ V1/no flag) and document the coupling in §2 tips — AND surface the knob as a Playground axis like every other legacy feature (row above; add the axis when none fits). Baking alone is NOT enough — the every-feature rule supersedes the pilot's cells+prose-only treatment of Qwen3.5's mamba knob (retrofit pending). The mamba knob is the same single-select shape as KV Cache DType, so it rides the merged generic **`flagSelects`** axis — Qwen3.6 / Qwen3-Coder-Next declare it purely in config (a `flagSelects` block), **no engine PR**. |
|
||||
| coupled secondary knob (e.g. mamba cache V1/V2) | cells + Playground axis | Bake the correct value per cell following the legacy coupling (Qwen3.5: MTP ⇒ `--mamba-radix-cache-strategy extra_buffer` on NVIDIA; AMD/Xeon ⇒ V1/no flag) and document the coupling in §2 tips — AND surface the knob as a Playground axis like every other legacy feature (row above; add the axis when none fits). Baking alone is NOT enough — the every-feature rule supersedes the pilot's cells+prose-only treatment of Qwen3.5's mamba knob (retrofit pending). The mamba knob is the same single-select shape as KV Cache DType, so it rides the merged generic **`flagSelects`** axis — Qwen3.6 / Qwen3-Coder-Next declare it purely in config (a `flagSelects` block), **no engine PR**. |
|
||||
|
||||
## 2. Command rewrite table (the ONLY allowed normalizations)
|
||||
|
||||
|
||||
@@ -544,10 +544,12 @@ ONE thread — do not design for TBO threads that don't exist.
|
||||
`ServerArgs.override` nor `ServerArgs.derive` exists, and nothing in the package
|
||||
calls either form. Rerouting a writer to the bags means flipping **all its readers
|
||||
in the same commit** (no transitional dual-write).
|
||||
4. **Legacy-accessor ratchet** (`test_legacy_global_ratchet.py`): `get_global_server_args`
|
||||
call sites must not grow. The replacement for a *decision* is a bag leaf, a named
|
||||
accessor, or the owning runner's stamp — not `get_server_args().field`, which the
|
||||
read ratchet below pins at zero. `runtime_context.get_server_args()` is only for the
|
||||
4. **The legacy accessor is retired** (`test_runtime_context.py`): every
|
||||
`get_global_server_args()` call now raises, because it answered with the record --
|
||||
a caller reading a field resolution had decided got a stale value and no error.
|
||||
The replacement for a *decision* is a bag leaf, a named accessor, or the owning
|
||||
runner's stamp — not `get_server_args().field`, which the read ratchet below pins
|
||||
at zero. `runtime_context.get_server_args()` is only for the
|
||||
whole-object shapes (dumps, provenance, a hand-off to a callee that takes a config).
|
||||
5. **Global config read ratchet** (`test_global_config_read_ratchet.py`): baselines are
|
||||
**0** for both the direct `get_server_args().field` and the alias form (function-local
|
||||
@@ -622,7 +624,7 @@ Key source files: `python/sglang/srt/runtime_context.py` (the container, every t
|
||||
`declare_late_resolution`), `python/sglang/srt/server_args.py` (`NS` metadata,
|
||||
`Arg(..., resolvable=True)`, `__setattr__` strict guard), and the guardrail tests under
|
||||
`test/registered/unit/` (`test_server_args_mutation_ratchet.py`,
|
||||
`test_global_config_read_ratchet.py`, `test_legacy_global_ratchet.py`,
|
||||
`test_global_config_read_ratchet.py`,
|
||||
`test_module_state_ratchet.py`, `test_server_args_namespaces.py`,
|
||||
`test_runtime_context.py` — the last one doubles
|
||||
as executable documentation of every tier's semantics).
|
||||
|
||||
@@ -20,7 +20,7 @@ Method, per K in ``--num-prefixes``:
|
||||
Run the server twice and compare (same flags, toggle int8):
|
||||
|
||||
python -m sglang.launch_server --model-path <gdn-or-kda-hybrid> --tp 4 \
|
||||
--trust-remote-code --mamba-scheduler-strategy extra_buffer \
|
||||
--trust-remote-code --mamba-radix-cache-strategy extra_buffer \
|
||||
--max-mamba-cache-size 256 [--enable-int8-mamba-checkpoint] --port 30000
|
||||
|
||||
python benchmark/bench_linear_attention/bench_int8_checkpoint_reuse.py \
|
||||
@@ -28,7 +28,7 @@ Run the server twice and compare (same flags, toggle int8):
|
||||
|
||||
NOTE: prefix-tokens must cross the mamba cache chunk granularity (typically ~512),
|
||||
otherwise nothing is cacheable and reuse is 0 by construction (not a regression).
|
||||
Use ``--mamba-scheduler-strategy extra_buffer`` on the server: ``no_buffer`` only
|
||||
Use ``--mamba-radix-cache-strategy extra_buffer`` on the server: ``no_buffer`` only
|
||||
snapshots state at the full-sequence leaf, so a divergent-suffix probe never reuses.
|
||||
"""
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ python3 -m sglang.launch_server \
|
||||
The default configuration is `--speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4`. Find the best values for your workload with [bench_speculative.py](https://github.com/sgl-project/sglang/blob/main/scripts/playground/bench_speculative.py). The minimum viable config is `--speculative-num-steps 1 --speculative-eagle-topk 1 --speculative-num-draft-tokens 2`.
|
||||
|
||||
<Note>
|
||||
For large batch sizes (>48), increase `--max-running-requests` beyond the default of 48 for MTP. Also set `--cuda-graph-bs` to include your target batch sizes (default captured sizes for speculative decoding: 48).
|
||||
For large batch sizes (>48), increase `--max-running-requests` beyond the default of 48 for MTP. Also set `--cuda-graph-bs-decode` to include your target batch sizes (default captured sizes for speculative decoding: 48).
|
||||
</Note>
|
||||
|
||||
<Tip>
|
||||
|
||||
@@ -102,7 +102,7 @@ import { Playground } from "/src/snippets/_playground.jsx";
|
||||
|
||||
- **Remote code.** Use `--trust-remote-code` for the Hugging Face checkpoint.
|
||||
- **Topology.** The 8x B300 recipe uses TP=8 and EP=8. H200, B200, and H20 use a 2-node 16 GPU layout with TP=16 and EP=16; the command panel injects the multi-node rank flags for you.
|
||||
- **LongCat sparse attention.** Keep `--nsa-prefill-backend fa3` with `--chunked-prefill-size 2048` for the model-card-aligned prefill path.
|
||||
- **LongCat sparse attention.** Keep `--dsa-prefill-backend fa3` with `--chunked-prefill-size 2048` for the model-card-aligned prefill path.
|
||||
- **Memory.** The recipe uses `--kv-cache-dtype bfloat16` and starts at `--mem-fraction-static 0.92`. Tune memory only after the generated command launches cleanly on your cluster.
|
||||
- **Weight loading.** `--model-loader-extra-config '{"enable_multithread_load":true,"num_threads":12}'` loads checkpoint shards in parallel and reduces startup time.
|
||||
- **FP8 backend selection.** Do not pass `--fp8-gemm-runner-backend` manually. SGLang selects the correct backend for the LongCat FP8 scale layout.
|
||||
|
||||
@@ -260,7 +260,7 @@ checkpoint's calibration scales automatically.
|
||||
is NVFP4-packed; the BF16 and FP8 checkpoints keep a dense head).
|
||||
The Ascend comparison in #35629 used a 910C with BF16 target weights,
|
||||
`--tp-size 2 --attention-backend ascend --mamba-ssm-dtype bfloat16
|
||||
--mamba-scheduler-strategy extra_buffer`, and disabled RadixCache for both
|
||||
--mamba-radix-cache-strategy extra_buffer`, and disabled RadixCache for both
|
||||
baseline and DFlash2 to exclude cache warm-up and prefix reuse. The DFlash2
|
||||
run added the three flags shown above.
|
||||
Accuracy used zero-shot GSM8K with greedy sampling, `max_new_tokens=2048`,
|
||||
|
||||
@@ -61,14 +61,17 @@ SGLANG_VIT_ENABLE_CUDA_GRAPH=1 \
|
||||
python3 -m sglang.launch_server \
|
||||
--model Qwen/Qwen3-VL-8B-Instruct
|
||||
```
|
||||
Or you can run CUDA Graph for ViT together with Piecewise CUDA Graph feature by both setting env variable `SGLANG_VIT_ENABLE_CUDA_GRAPH=1` and setting `--enable-piecewise-cuda-graph`, for example:
|
||||
To run the ViT graph together with Piecewise CUDA Graph over the decoder's
|
||||
prefill, ask for the prefill backend explicitly. Qwen3-VL is on neither
|
||||
multimodal allowlist, so the default backend resolves prefill to `disabled` for
|
||||
it; naming a backend locks the choice and skips that rule:
|
||||
```shell Command
|
||||
SGLANG_VIT_ENABLE_CUDA_GRAPH=1 \
|
||||
python3 -m sglang.launch_server \
|
||||
--model Qwen/Qwen3-VL-8B-Instruct \
|
||||
--piecewise-cuda-graph-max-tokens 4096 \
|
||||
--enable-piecewise-cuda-graph \
|
||||
--piecewise-cuda-graph-compiler eager
|
||||
--cuda-graph-backend-prefill tc_piecewise \
|
||||
--cuda-graph-max-bs-prefill 4096 \
|
||||
--cuda-graph-tc-compiler eager
|
||||
```
|
||||
|
||||
## Known supported models
|
||||
|
||||
@@ -568,7 +568,7 @@ python3 -m sglang.launch_server \
|
||||
--disaggregation-bootstrap-port 8996 \
|
||||
--base-gpu-id 8 \
|
||||
--disable-radix-cache \
|
||||
--cuda-graph-bs 1 2 4 8 10 12 14 16 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 10 12 14 16 \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--speculative-algorithm EAGLE --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 \
|
||||
--enable-multi-layer-eagle \
|
||||
@@ -681,9 +681,8 @@ do
|
||||
--port 8001 --trust-remote-code --nnodes 1 --node-rank 0 --tp-size 16 --dp-size 16 \
|
||||
--mem-fraction-static 0.8 --max-running-requests 448 --attention-backend ascend --device npu --quantization modelslim \
|
||||
--moe-a2a-backend deepep --enable-dp-attention --deepep-mode low_latency --enable-dp-lm-head \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 14 16 18 20 22 24 26 28 --disaggregation-transfer-backend ascend --watchdog-timeout 9000 --context-length 8192 \
|
||||
--speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 \
|
||||
--prefill-round-robin-balance --disable-shared-experts-fusion --dtype bfloat16 --tokenizer-worker-num 4 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 18 20 22 24 26 28 --disaggregation-transfer-backend ascend --watchdog-timeout 9000 --context-length 8192 \
|
||||
--speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 --disable-shared-experts-fusion --dtype bfloat16 --tokenizer-worker-num 4 \
|
||||
--load-balance-method round_robin
|
||||
NODE_RANK=$i
|
||||
break
|
||||
|
||||
@@ -10,7 +10,7 @@ Standard CUDA graphs capture the entire model forward pass as a single graph. Th
|
||||
|
||||
Piecewise CUDA Graph (PCG) solves this by splitting the model's computation graph into pieces (roughly one per layer) at "split points" (e.g., MoE dispatch ops). Each piece is captured as a separate CUDA graph for a set of pre-defined token lengths. At runtime, the input is padded to the nearest captured size, and each piece is replayed. This eliminates kernel launch overhead for prefill/extend while still supporting dynamic shapes.
|
||||
|
||||
Recently we **enabled PCG by default**, which means that the old `--enable-piecewise-cuda-graph` flag is deprecated. Use `--disable-piecewise-cuda-graph` to turn it off.
|
||||
PCG is **enabled by default**. Pass `--cuda-graph-backend-prefill=disabled` to turn it off.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -26,7 +26,7 @@ python3 -m sglang.launch_server \
|
||||
```bash
|
||||
python3 -m sglang.launch_server \
|
||||
--model-path meta-llama/Llama-3.1-8B-Instruct \
|
||||
--disable-piecewise-cuda-graph
|
||||
--cuda-graph-backend-prefill=disabled
|
||||
```
|
||||
|
||||
### Custom capture sizes
|
||||
@@ -34,7 +34,7 @@ python3 -m sglang.launch_server \
|
||||
```bash
|
||||
python3 -m sglang.launch_server \
|
||||
--model-path meta-llama/Llama-3.1-8B-Instruct \
|
||||
--piecewise-cuda-graph-max-tokens 2048
|
||||
--cuda-graph-max-bs-prefill 2048
|
||||
```
|
||||
|
||||
### Server Args
|
||||
@@ -54,41 +54,31 @@ python3 -m sglang.launch_server \
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--disable-piecewise-cuda-graph</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Disable PCG for extend/prefill.</td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--cuda-graph-backend-prefill</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>None</code> (auto)</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Backend for the prefill phase. Choices: <code>full</code>, <code>breakable</code>, <code>tc_piecewise</code>, <code>disabled</code>. Pass <code>disabled</code> to turn PCG off for extend/prefill, or <code>tc_piecewise</code> to force it on, skipping all auto-disable conditions (testing only).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--enforce-piecewise-cuda-graph</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Force-enable PCG, skipping all auto-disable conditions. For testing only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--piecewise-cuda-graph-max-tokens</code></td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--cuda-graph-max-bs-prefill</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>None</code> (auto)</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Maximum token count to capture. Defaults to <code>chunked_prefill_size</code> (non-MLA) or <code>2048</code> (MLA).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--piecewise-cuda-graph-tokens</code></td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--cuda-graph-bs-prefill</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>None</code> (auto)</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Explicit list of token lengths to capture. Auto-generated if not set.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--piecewise-cuda-graph-compiler</code></td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--cuda-graph-tc-compiler</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>"eager"</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Compiler backend for the captured subgraphs. Choices: <code>eager</code>, <code>inductor</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><del><code>--enable-piecewise-cuda-graph</code></del></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>—</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><strong>Deprecated.</strong> PCG is now enabled by default. Use <code>--enforce-piecewise-cuda-graph</code> to skip auto-disable conditions.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
## Bug Report
|
||||
|
||||
PCG is enabled by default but is still in an experimental stage. Since PCG relies on `torch.compile` to trace the model's forward pass, most bugs are introduced by torch compile tracing failures (e.g., untraceable ops, dynamic control flow, or graph breaks). If you encounter any issues related to PCG, please disable it by adding `--disable-piecewise-cuda-graph` to your launch command and report the bug at [GitHub Issues](https://github.com/sgl-project/sglang/issues/new/choose). We greatly appreciate your help in improving this feature.
|
||||
PCG is enabled by default but is still in an experimental stage. Since PCG relies on `torch.compile` to trace the model's forward pass, most bugs are introduced by torch compile tracing failures (e.g., untraceable ops, dynamic control flow, or graph breaks). If you encounter any issues related to PCG, please disable it by adding `--cuda-graph-backend-prefill=disabled` to your launch command and report the bug at [GitHub Issues](https://github.com/sgl-project/sglang/issues/new/choose). We greatly appreciate your help in improving this feature.
|
||||
|
||||
### For Users
|
||||
|
||||
@@ -96,11 +86,11 @@ If you see an error message like the following during server startup, it is a PC
|
||||
|
||||
```
|
||||
Piecewise CUDA Graph is enabled by default as an experimental feature.
|
||||
To work around this error, add --disable-piecewise-cuda-graph to your launch command.
|
||||
To work around this error, add --cuda-graph-backend-prefill=disabled to your launch command.
|
||||
Please report this issue at https://github.com/sgl-project/sglang/issues/new/choose
|
||||
```
|
||||
|
||||
To work around it, add `--disable-piecewise-cuda-graph` to your launch command. When filing a bug report, please include:
|
||||
To work around it, add `--cuda-graph-backend-prefill=disabled` to your launch command. When filing a bug report, please include:
|
||||
1. The full error traceback
|
||||
2. Model name and quantization method
|
||||
3. Launch command with all arguments
|
||||
@@ -228,7 +218,7 @@ The default capture schedule is auto-generated with increasing granularity:
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
For the auto-generated schedule, sizes are capped at `--piecewise-cuda-graph-max-tokens`. The default cap is `chunked_prefill_size` for non-MLA models and `2048` for MLA backend models. If `--max-total-tokens` is set, the cap is further limited to not exceed it. Additionally, Llama-2 models are auto-capped at 4096 tokens as a temporary workaround.
|
||||
For the auto-generated schedule, sizes are capped at `--cuda-graph-max-bs-prefill`. The default cap is `chunked_prefill_size` for non-MLA models and `2048` for MLA backend models. If `--max-total-tokens` is set, the cap is further limited to not exceed it. Additionally, Llama-2 models are auto-capped at 4096 tokens as a temporary workaround.
|
||||
|
||||
## Compatibility
|
||||
|
||||
@@ -247,7 +237,7 @@ PCG is auto-disabled in the following scenarios. We are actively working on expa
|
||||
- PD disaggregation
|
||||
- Expert distribution recorder / EPLB
|
||||
|
||||
Use `--enforce-piecewise-cuda-graph` to skip all auto-disable checks (for testing/debugging only).
|
||||
Use `--cuda-graph-backend-prefill=tc_piecewise` to skip all auto-disable checks (for testing/debugging only).
|
||||
|
||||
## Code Reference
|
||||
|
||||
|
||||
@@ -798,12 +798,6 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`False`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--stream-output`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>[Deprecated] Use --incremental-streaming-output instead.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>—</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: str</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--enable-streaming-session`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Enable streaming session mode and StreamingSession wrapper.</td>
|
||||
@@ -943,12 +937,6 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>The buckets of end-to-end request latency, specified as a list of floats.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>None</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>List[float]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--collect-tokens-histogram`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Collect prompt/generation tokens histogram.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--prompt-tokens-buckets`</td>
|
||||
@@ -1522,18 +1510,6 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: str</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--nsa-prefill-backend`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>[Deprecated] Use --dsa-prefill-backend instead.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Auto</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>flashmla_sparse</code>, <code>flashmla_kv</code>, <code>flashmla_auto</code>, <code>fa3</code>, <code>tilelang</code>, <code>aiter</code>, <code>trtllm</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--nsa-decode-backend`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>[Deprecated] Use --dsa-decode-backend instead.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Auto</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>flashmla_sparse</code>, <code>flashmla_kv</code>, <code>flashmla_auto</code>, <code>fa3</code>, <code>tilelang</code>, <code>aiter</code>, <code>trtllm</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1662,12 +1638,6 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: int</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--speculative-dflash-draft-window-size`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>—</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>—</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: int</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2594,30 +2564,12 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`32`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: int</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-max-bs-decode`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-max-bs-decode</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: int</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-bs`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-bs-decode</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>List[int]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--disable-cuda-graph`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated.</strong> Use <code>--cuda-graph-backend-decode=disabled</code> and/or <code>--cuda-graph-backend-prefill=disabled</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--enable-breakable-cuda-graph`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-backend-prefill=breakable</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--disable-prefill-cuda-graph`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Disable the prefill-phase CUDA graph. Convenience for <code>--cuda-graph-backend-prefill=disabled</code>.</td>
|
||||
@@ -2630,36 +2582,6 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`False`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--disable-piecewise-cuda-graph`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-backend-prefill=disabled</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--enforce-piecewise-cuda-graph`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-backend-prefill=tc_piecewise</code>. Explicitly setting the prefill backend now skips the auto-disable cascade automatically.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>False</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>bool flag (set to enable)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--piecewise-cuda-graph-tokens`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-bs-prefill</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>List[int]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--piecewise-cuda-graph-compiler`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-tc-compiler</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>eager</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>eager</code>, <code>inductor</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--piecewise-cuda-graph-max-tokens`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><strong>Deprecated alias</strong> for <code>--cuda-graph-max-bs-prefill</code>.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>4096</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Type: int</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--enable-p2p-check`</td>
|
||||
@@ -3485,12 +3407,6 @@ Please consult the documentation below and [server_args.py](https://github.com/s
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--prefill-round-robin-balance`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Note: Note: --prefill-round-robin-balance is deprecated now.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>N/A</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -561,7 +561,7 @@ Relevant parameters:
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>None</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--speculative-dflash-draft-window-size</code></td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--speculative-draft-window-size</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>Draft KV sliding-window size. Must be <code>>= speculative-num-draft-tokens</code> when set.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>None</code></td>
|
||||
</tr>
|
||||
@@ -895,7 +895,7 @@ Below is a comprehensive list of all speculative decoding parameters available i
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>DFlash-only alias of <code>--speculative-num-draft-tokens</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--speculative-dflash-draft-window-size</code></td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}><code>--speculative-draft-window-size</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}><code>int</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}><code>None</code></td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>DFlash-only draft KV sliding-window size</td>
|
||||
|
||||
+7
-13
@@ -169,14 +169,13 @@ do
|
||||
--enable-dp-attention \
|
||||
--deepep-mode low_latency \
|
||||
--enable-dp-lm-head \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 14 16 18 20 22 24 26 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 18 20 22 24 26 \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 8192 \
|
||||
--speculative-algorithm NEXTN \
|
||||
--speculative-num-steps 2 \
|
||||
--speculative-eagle-topk 1 \
|
||||
--speculative-num-draft-tokens 3 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--tokenizer-worker-num 4 \
|
||||
@@ -296,7 +295,7 @@ python3 -m sglang.launch_server \
|
||||
--device npu \
|
||||
--quantization modelslim \
|
||||
--watchdog-timeout 9000 \
|
||||
--cuda-graph-bs 4 8 12 14 \
|
||||
--cuda-graph-bs-decode 4 8 12 14 \
|
||||
--mem-fraction-static 0.9 \
|
||||
--max-running-requests 224 \
|
||||
--context-length 8188 \
|
||||
@@ -481,7 +480,7 @@ do
|
||||
--deepep-mode low_latency \
|
||||
--enable-dp-lm-head \
|
||||
--moe-dense-tp 1 \
|
||||
--cuda-graph-bs 2 4 6 \
|
||||
--cuda-graph-bs-decode 2 4 6 \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 8192 \
|
||||
--speculative-algorithm NEXTN \
|
||||
@@ -489,7 +488,6 @@ do
|
||||
--speculative-eagle-topk 1 \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -689,7 +687,7 @@ do
|
||||
--enable-dp-attention \
|
||||
--deepep-mode low_latency \
|
||||
--moe-dense-tp 1 \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 8192 \
|
||||
--speculative-algorithm NEXTN \
|
||||
@@ -697,7 +695,6 @@ do
|
||||
--speculative-eagle-topk 1 \
|
||||
--speculative-num-draft-tokens 2 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -893,7 +890,7 @@ do
|
||||
--deepep-mode low_latency \
|
||||
--enable-dp-lm-head \
|
||||
--moe-dense-tp 1 \
|
||||
--cuda-graph-bs 2 4 6 \
|
||||
--cuda-graph-bs-decode 2 4 6 \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 8192 \
|
||||
--speculative-algorithm NEXTN \
|
||||
@@ -901,7 +898,6 @@ do
|
||||
--speculative-eagle-topk 1 \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -1097,7 +1093,7 @@ do
|
||||
--deepep-mode low_latency \
|
||||
--enable-dp-lm-head \
|
||||
--moe-dense-tp 1 \
|
||||
--cuda-graph-bs 2 4 6 \
|
||||
--cuda-graph-bs-decode 2 4 6 \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 8192 \
|
||||
--speculative-algorithm NEXTN \
|
||||
@@ -1105,7 +1101,6 @@ do
|
||||
--speculative-eagle-topk 1 \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -1300,14 +1295,13 @@ do
|
||||
--deepep-mode low_latency \
|
||||
--enable-dp-lm-head \
|
||||
--moe-dense-tp 1 \
|
||||
--cuda-graph-bs 2 4 6 \
|
||||
--cuda-graph-bs-decode 2 4 6 \
|
||||
--watchdog-timeout 9000 \
|
||||
--speculative-algorithm NEXTN \
|
||||
--speculative-num-steps 3 \
|
||||
--speculative-eagle-topk 1 \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
|
||||
+3
-3
@@ -185,7 +185,7 @@ do
|
||||
--quantization modelslim \
|
||||
--enable-dp-lm-head \
|
||||
--kv-cache-dtype bfloat16 \
|
||||
--cuda-graph-bs 1 2 4 8 16 24 36 40 48 56 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 16 24 36 40 48 56 \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 2 \
|
||||
--speculative-eagle-topk 1 \
|
||||
@@ -329,7 +329,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-dp-lm-head \
|
||||
--kv-cache-dtype auto \
|
||||
--skip-server-warmup \
|
||||
--cuda-graph-bs 1 2 4 8 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 2 \
|
||||
--speculative-eagle-topk 1 \
|
||||
@@ -455,7 +455,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-dp-lm-head \
|
||||
--kv-cache-dtype auto \
|
||||
--skip-server-warmup \
|
||||
--cuda-graph-bs 1 2 4 8 10 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 10 \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 2 \
|
||||
--speculative-eagle-topk 1 \
|
||||
|
||||
+7
-14
@@ -307,12 +307,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 \
|
||||
--cuda-graph-bs-decode 1 2 3 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 16 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -507,12 +506,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 \
|
||||
--cuda-graph-bs-decode 1 2 3 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -719,12 +717,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 \
|
||||
--cuda-graph-bs-decode 1 2 3 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 16 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -921,12 +918,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 \
|
||||
--cuda-graph-bs-decode 1 2 3 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 16 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -1120,12 +1116,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 \
|
||||
--cuda-graph-bs-decode 1 2 3 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -1330,12 +1325,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 4 5 6 \
|
||||
--cuda-graph-bs-decode 1 2 3 4 5 6 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 32 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
@@ -1540,12 +1534,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 \
|
||||
--cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 4 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
|
||||
+1
-2
@@ -171,12 +171,11 @@ do
|
||||
--served-model-name glm-5 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode low_latency \
|
||||
--cuda-graph-max-bs 8 \
|
||||
--cuda-graph-max-bs-decode 8 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--watchdog-timeout 9000 \
|
||||
--context-length 180000 \
|
||||
--tokenizer-worker-num 8 \
|
||||
--prefill-round-robin-balance \
|
||||
--disable-shared-experts-fusion \
|
||||
--dtype bfloat16 \
|
||||
--load-balance-method round_robin \
|
||||
|
||||
+5
-5
@@ -123,7 +123,7 @@ do
|
||||
--dp-size 32 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--cuda-graph-bs 1 \
|
||||
--cuda-graph-bs-decode 1 \
|
||||
--disable-radix-cache \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
--speculative-draft-model-path $DRAFT_MODEL_PATH \
|
||||
@@ -305,7 +305,7 @@ do
|
||||
--sampling-backend ascend \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--cuda-graph-bs 1 2 4 6 8 16 \
|
||||
--cuda-graph-bs-decode 1 2 4 6 8 16 \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
--speculative-draft-model-path $DRAFT_MODEL_PATH \
|
||||
--speculative-num-steps 3 \
|
||||
@@ -504,7 +504,7 @@ do
|
||||
--sampling-backend ascend \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--cuda-graph-bs 1 2 4 6 8 16 \
|
||||
--cuda-graph-bs-decode 1 2 4 6 8 16 \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
--speculative-draft-model-path $DRAFT_MODEL_PATH \
|
||||
--speculative-num-steps 3 \
|
||||
@@ -702,7 +702,7 @@ do
|
||||
--sampling-backend ascend \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--cuda-graph-bs 16 \
|
||||
--cuda-graph-bs-decode 16 \
|
||||
--reasoning-parser kimi_k2 \
|
||||
--tool-call-parser kimi_k2 \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
@@ -896,7 +896,7 @@ do
|
||||
--sampling-backend ascend \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--cuda-graph-bs 1 2 4 6 8 \
|
||||
--cuda-graph-bs-decode 1 2 4 6 8 \
|
||||
--reasoning-parser kimi_k2 \
|
||||
--tool-call-parser kimi_k2 \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
|
||||
+8
-8
@@ -129,7 +129,7 @@ do
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--disable-radix-cache \
|
||||
--disable-cuda-graph \
|
||||
--disable-piecewise-cuda-graph \
|
||||
--cuda-graph-backend-prefill=disabled \
|
||||
--dp-size 2
|
||||
break
|
||||
fi
|
||||
@@ -159,7 +159,7 @@ do
|
||||
--max-running-requests 64 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--swa-full-tokens-ratio 0.3 \
|
||||
--cuda-graph-bs 1 2 4 8 12 16 20 24 28 32 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 12 16 20 24 28 32 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 3 \
|
||||
@@ -314,7 +314,7 @@ do
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--disable-radix-cache \
|
||||
--disable-cuda-graph \
|
||||
--disable-piecewise-cuda-graph \
|
||||
--cuda-graph-backend-prefill=disabled \
|
||||
--dp-size 2
|
||||
break
|
||||
fi
|
||||
@@ -344,7 +344,7 @@ do
|
||||
--max-running-requests 32 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--swa-full-tokens-ratio 0.3 \
|
||||
--cuda-graph-bs 1 2 4 8 12 16 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 12 16 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 3 \
|
||||
@@ -499,7 +499,7 @@ do
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--disable-radix-cache \
|
||||
--disable-cuda-graph \
|
||||
--disable-piecewise-cuda-graph \
|
||||
--cuda-graph-backend-prefill=disabled \
|
||||
--dp-size 2
|
||||
break
|
||||
fi
|
||||
@@ -529,7 +529,7 @@ do
|
||||
--max-running-requests 64 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--swa-full-tokens-ratio 0.3 \
|
||||
--cuda-graph-bs 1 2 4 8 12 16 20 24 28 32 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 12 16 20 24 28 32 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 3 \
|
||||
@@ -684,7 +684,7 @@ do
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--disable-radix-cache \
|
||||
--disable-cuda-graph \
|
||||
--disable-piecewise-cuda-graph \
|
||||
--cuda-graph-backend-prefill=disabled \
|
||||
--dp-size 2
|
||||
break
|
||||
fi
|
||||
@@ -714,7 +714,7 @@ do
|
||||
--max-running-requests 64 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--swa-full-tokens-ratio 0.3 \
|
||||
--cuda-graph-bs 1 2 4 8 12 16 20 24 28 32 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 12 16 20 24 28 32 \
|
||||
--disaggregation-transfer-backend ascend \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 3 \
|
||||
|
||||
+5
-5
@@ -105,7 +105,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 18 \
|
||||
--chunked-prefill-size -1 \
|
||||
--max-prefill-tokens 32768 \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 14 16 18 24 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 18 24 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--quantization modelslim \
|
||||
@@ -212,7 +212,7 @@ python3 -m sglang.launch_server \
|
||||
--prefill-max-requests 10 \
|
||||
--chunked-prefill-size 67072 \
|
||||
--max-prefill-tokens 67000 \
|
||||
--cuda-graph-bs 2 4 8 12 16 18 20 22 24 26 \
|
||||
--cuda-graph-bs-decode 2 4 8 12 16 18 20 22 24 26 \
|
||||
--moe-a2a-backend ascend_fuseep \
|
||||
--deepep-mode auto \
|
||||
--quantization modelslim \
|
||||
@@ -324,7 +324,7 @@ python3 -m sglang.launch_server \
|
||||
--prefill-max-requests 4 \
|
||||
--chunked-prefill-size 160000 \
|
||||
--max-prefill-tokens 80000 \
|
||||
--cuda-graph-bs 2 4 6 8 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 \
|
||||
--moe-a2a-backend ascend_fuseep \
|
||||
--deepep-mode auto \
|
||||
--quantization modelslim \
|
||||
@@ -437,7 +437,7 @@ python3 -m sglang.launch_server \
|
||||
--prefill-max-requests 3 \
|
||||
--chunked-prefill-size -1 \
|
||||
--max-prefill-tokens 8192 \
|
||||
--cuda-graph-bs 1 2 3 4 5 6 \
|
||||
--cuda-graph-bs-decode 1 2 3 4 5 6 \
|
||||
--moe-a2a-backend ascend_fuseep \
|
||||
--deepep-mode auto \
|
||||
--quantization modelslim \
|
||||
@@ -541,7 +541,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-prefill-delayer \
|
||||
--chunked-prefill-size 196608 \
|
||||
--max-prefill-tokens 8192 \
|
||||
--cuda-graph-bs 1 2 4 8 12 16 20 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 12 16 20 \
|
||||
--moe-a2a-backend ascend_fuseep \
|
||||
--fuseep-mode 2 \
|
||||
--quantization modelslim \
|
||||
|
||||
+2
-2
@@ -101,7 +101,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-dp-lm-head \
|
||||
--tp 16 \
|
||||
--mem-fraction-static 0.78 \
|
||||
--cuda-graph-bs 1 \
|
||||
--cuda-graph-bs-decode 1 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen25
|
||||
```
|
||||
@@ -210,7 +210,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-dp-attention \
|
||||
--enable-dp-lm-head \
|
||||
--mem-fraction-static 0.8 \
|
||||
--cuda-graph-bs 1 2 4 8 16 20 24 26 27 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 16 20 24 26 27 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen25
|
||||
```
|
||||
|
||||
+4
-4
@@ -109,7 +109,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-dp-attention \
|
||||
--dp-size 2 \
|
||||
--mem-fraction-static 0.85 \
|
||||
--cuda-graph-bs 1 2 4 8 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
@@ -211,7 +211,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tp-size 2 \
|
||||
--mem-fraction-static 0.87 \
|
||||
--cuda-graph-bs 1 5 15 40 70 100 120 130 140 146 150 154 156 158 160 162 \
|
||||
--cuda-graph-bs-decode 1 5 15 40 70 100 120 130 140 146 150 154 156 158 160 162 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
@@ -311,7 +311,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tp-size 2 \
|
||||
--mem-fraction-static 0.87 \
|
||||
--cuda-graph-bs 1 5 15 40 70 100 120 130 140 146 150 154 156 158 160 162 \
|
||||
--cuda-graph-bs-decode 1 5 15 40 70 100 120 130 140 146 150 154 156 158 160 162 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
@@ -411,7 +411,7 @@ python3 -m sglang.launch_server \
|
||||
--max-prefill-tokens 35000 \
|
||||
--tp-size 2 \
|
||||
--mem-fraction-static 0.6 \
|
||||
--cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
|
||||
--cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
|
||||
+3
-3
@@ -100,7 +100,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-num-draft-tokens 5 \
|
||||
--tp-size 16 \
|
||||
--mem-fraction-static 0.72 \
|
||||
--cuda-graph-bs 1 \
|
||||
--cuda-graph-bs-decode 1 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
@@ -199,7 +199,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tp-size 4 \
|
||||
--mem-fraction-static 0.845 \
|
||||
--cuda-graph-bs 16 32 64 72 88 90 92 94 96 97 98 99 100 101 \
|
||||
--cuda-graph-bs-decode 16 32 64 72 88 90 92 94 96 97 98 99 100 101 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
@@ -298,7 +298,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-num-draft-tokens 4 \
|
||||
--tp-size 4 \
|
||||
--mem-fraction-static 0.845 \
|
||||
--cuda-graph-bs 16 32 64 72 88 90 92 94 96 97 98 99 100 101 \
|
||||
--cuda-graph-bs-decode 16 32 64 72 88 90 92 94 96 97 98 99 100 101 \
|
||||
--dtype bfloat16 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen
|
||||
|
||||
+9
-9
@@ -111,7 +111,7 @@ python3 -m sglang.launch_server \
|
||||
--trust-remote-code \
|
||||
--max-running-requests 16 \
|
||||
--mem-fraction-static 0.6 \
|
||||
--cuda-graph-bs 2 3 4 5 6 8 10 12 14 16 \
|
||||
--cuda-graph-bs-decode 2 3 4 5 6 8 10 12 14 16 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -330,7 +330,7 @@ python3 -m sglang.launch_server \
|
||||
--max-prefill-tokens 131072 \
|
||||
--max-mamba-cache-size 320 \
|
||||
--prefill-max-requests 10 \
|
||||
--mamba-scheduler-strategy extra_buffer \
|
||||
--mamba-radix-cache-strategy extra_buffer \
|
||||
--trust-remote-code \
|
||||
--max-running-requests 64 \
|
||||
--mem-fraction-static 0.6 \
|
||||
@@ -451,7 +451,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 48 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--max-total-tokens 210000 \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -569,7 +569,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 144 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--max-total-tokens 635000 \
|
||||
--cuda-graph-bs 2 4 6 8 12 14 16 18 20 24 26 28 30 32 34 36 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 12 14 16 18 20 24 26 28 30 32 34 36 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -686,7 +686,7 @@ python3 -m sglang.launch_server \
|
||||
--trust-remote-code \
|
||||
--max-running-requests 160 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 14 16 18 20 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 18 20 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -803,7 +803,7 @@ python3 -m sglang.launch_server \
|
||||
--trust-remote-code \
|
||||
--max-running-requests 432 \
|
||||
--mem-fraction-static 0.8 \
|
||||
--cuda-graph-bs 2 4 6 8 12 16 20 24 28 32 36 40 44 48 50 52 54 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 12 16 20 24 28 32 36 40 44 48 50 52 54 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -921,7 +921,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 16 \
|
||||
--mem-fraction-static 0.6 \
|
||||
--max-total-tokens 1065000 \
|
||||
--cuda-graph-bs 2 4 6 8 10 12 14 16 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -1039,7 +1039,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 32 \
|
||||
--mem-fraction-static 0.6 \
|
||||
--max-total-tokens 1065000 \
|
||||
--cuda-graph-bs 2 4 6 8 12 14 16 \
|
||||
--cuda-graph-bs-decode 2 4 6 8 12 14 16 \
|
||||
--quantization modelslim \
|
||||
--enable-multimodal \
|
||||
--moe-a2a-backend deepep \
|
||||
@@ -1147,7 +1147,7 @@ python3 -m sglang.launch_server \
|
||||
--chunked-prefill-size -1 \
|
||||
--max-prefill-tokens 65536 \
|
||||
--max-mamba-cache-size 640 \
|
||||
--mamba-scheduler-strategy extra_buffer \
|
||||
--mamba-radix-cache-strategy extra_buffer \
|
||||
--trust-remote-code \
|
||||
--max-running-requests 128 \
|
||||
--mem-fraction-static 0.6 \
|
||||
|
||||
+9
-9
@@ -96,7 +96,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 60 \
|
||||
--max-mamba-cache-size 60 \
|
||||
--mem-fraction-static 0.74 \
|
||||
--cuda-graph-bs 2 4 8 14 16 24 26 32 36 37 40 42 44 45 46 50 52 60 \
|
||||
--cuda-graph-bs-decode 2 4 8 14 16 24 26 32 36 37 40 42 44 45 46 50 52 60 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -194,7 +194,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 38 \
|
||||
--max-mamba-cache-size 38 \
|
||||
--mem-fraction-static 0.7 \
|
||||
--cuda-graph-bs 1 2 4 8 10 12 16 20 24 28 30 32 35 38 \
|
||||
--cuda-graph-bs-decode 1 2 4 8 10 12 16 20 24 28 30 32 35 38 \
|
||||
--enable-prefill-delayer \
|
||||
--prefill-delayer-queue-min-ratio 0.45 \
|
||||
--prefill-delayer-max-delay-ms 5500 \
|
||||
@@ -292,12 +292,12 @@ python3 -m sglang.launch_server \
|
||||
--device npu \
|
||||
--chunked-prefill-size 32768 \
|
||||
--max-prefill-tokens 32768 \
|
||||
--mamba-scheduler-strategy extra_buffer \
|
||||
--mamba-radix-cache-strategy extra_buffer \
|
||||
--trust-remote-code \
|
||||
--max-running-requests 20 \
|
||||
--max-mamba-cache-size 160 \
|
||||
--mem-fraction-static 0.82 \
|
||||
--cuda-graph-bs 1 2 5 10 15 17 19 20 \
|
||||
--cuda-graph-bs-decode 1 2 5 10 15 17 19 20 \
|
||||
--dtype bfloat16 \
|
||||
--mamba-ssm-dtype bfloat16 \
|
||||
--speculative-algorithm NEXTN \
|
||||
@@ -397,7 +397,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 64 \
|
||||
--max-mamba-cache-size 74 \
|
||||
--mem-fraction-static 0.7 \
|
||||
--cuda-graph-bs 2 8 16 32 40 45 50 54 \
|
||||
--cuda-graph-bs-decode 2 8 16 32 40 45 50 54 \
|
||||
--enable-multimodal \
|
||||
--quantization modelslim \
|
||||
--mm-attention-backend ascend_attn \
|
||||
@@ -491,7 +491,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 6 \
|
||||
--max-mamba-cache-size 16 \
|
||||
--mem-fraction-static 0.6 \
|
||||
--cuda-graph-bs 1 2 4 5 6 \
|
||||
--cuda-graph-bs-decode 1 2 4 5 6 \
|
||||
--quantization modelslim \
|
||||
--dtype bfloat16 \
|
||||
--mamba-ssm-dtype bfloat16 \
|
||||
@@ -587,7 +587,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 6 \
|
||||
--max-mamba-cache-size 7 \
|
||||
--mem-fraction-static 0.63 \
|
||||
--cuda-graph-bs 1 2 4 5 6 \
|
||||
--cuda-graph-bs-decode 1 2 4 5 6 \
|
||||
--enable-multimodal \
|
||||
--quantization modelslim \
|
||||
--mm-attention-backend ascend_attn \
|
||||
@@ -682,7 +682,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 37 \
|
||||
--max-mamba-cache-size 74 \
|
||||
--mem-fraction-static 0.7 \
|
||||
--cuda-graph-bs 1 2 3 4 6 8 10 12 14 16 18 20 21 23 24 25 26 27 28 29 30 31 33 35 37 \
|
||||
--cuda-graph-bs-decode 1 2 3 4 6 8 10 12 14 16 18 20 21 23 24 25 26 27 28 29 30 31 33 35 37 \
|
||||
--quantization modelslim \
|
||||
--dtype bfloat16 \
|
||||
--mamba-ssm-dtype bfloat16 \
|
||||
@@ -779,7 +779,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 28 \
|
||||
--max-mamba-cache-size 50 \
|
||||
--mem-fraction-static 0.7 \
|
||||
--cuda-graph-bs 2 4 6 \
|
||||
--cuda-graph-bs-decode 2 4 6 \
|
||||
--enable-multimodal \
|
||||
--quantization modelslim \
|
||||
--mm-attention-backend ascend_attn \
|
||||
|
||||
+11
-11
@@ -103,7 +103,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 120 \
|
||||
--max-mamba-cache-size 120 \
|
||||
--mem-fraction-static 0.85 \
|
||||
--cuda-graph-bs 4 16 32 48 64 110 165 \
|
||||
--cuda-graph-bs-decode 4 16 32 48 64 110 165 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -205,7 +205,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 42 \
|
||||
--max-mamba-cache-size 42 \
|
||||
--mem-fraction-static 0.75 \
|
||||
--cuda-graph-bs 4 8 16 24 48 64 80 \
|
||||
--cuda-graph-bs-decode 4 8 16 24 48 64 80 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -308,7 +308,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 3 \
|
||||
--max-mamba-cache-size 3 \
|
||||
--mem-fraction-static 0.9 \
|
||||
--cuda-graph-bs 1 2 3 \
|
||||
--cuda-graph-bs-decode 1 2 3 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -402,11 +402,11 @@ python3 -m sglang.launch_server \
|
||||
--max-prefill-tokens 65536 \
|
||||
--trust-remote-code \
|
||||
--enable-prefill-delayer \
|
||||
--mamba-scheduler-strategy extra_buffer \
|
||||
--mamba-radix-cache-strategy extra_buffer \
|
||||
--max-running-requests 103 \
|
||||
--max-mamba-cache-size 85 \
|
||||
--mem-fraction-static 0.85 \
|
||||
--cuda-graph-bs 2 4 8 16 32 48 64 80 96 103 \
|
||||
--cuda-graph-bs-decode 2 4 8 16 32 48 64 80 96 103 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -507,7 +507,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 1 \
|
||||
--max-mamba-cache-size 6 \
|
||||
--mem-fraction-static 0.65 \
|
||||
--cuda-graph-bs 1 \
|
||||
--cuda-graph-bs-decode 1 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -606,7 +606,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 122 \
|
||||
--max-mamba-cache-size 122 \
|
||||
--mem-fraction-static 0.9 \
|
||||
--cuda-graph-bs 4 16 32 64 96 116 120 122 \
|
||||
--cuda-graph-bs-decode 4 16 32 64 96 116 120 122 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -705,7 +705,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 10 \
|
||||
--max-mamba-cache-size 20 \
|
||||
--mem-fraction-static 0.65 \
|
||||
--cuda-graph-bs 2 4 8 12 14 16 \
|
||||
--cuda-graph-bs-decode 2 4 8 12 14 16 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -800,11 +800,11 @@ python3 -m sglang.launch_server \
|
||||
--max-total-tokens 470784 \
|
||||
--max-prefill-tokens 65536 \
|
||||
--trust-remote-code \
|
||||
--mamba-scheduler-strategy extra_buffer \
|
||||
--mamba-radix-cache-strategy extra_buffer \
|
||||
--max-running-requests 40 \
|
||||
--max-mamba-cache-size 200 \
|
||||
--mem-fraction-static 0.9 \
|
||||
--cuda-graph-bs 2 8 16 24 32 36 40 \
|
||||
--cuda-graph-bs-decode 2 8 16 24 32 36 40 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
@@ -906,7 +906,7 @@ python3 -m sglang.launch_server \
|
||||
--max-running-requests 1 \
|
||||
--max-mamba-cache-size 6 \
|
||||
--mem-fraction-static 0.68 \
|
||||
--cuda-graph-bs 1 \
|
||||
--cuda-graph-bs-decode 1 \
|
||||
--enable-multimodal \
|
||||
--mm-attention-backend ascend_attn \
|
||||
--dtype bfloat16 \
|
||||
|
||||
+3
-3
@@ -95,7 +95,7 @@ python3 -m sglang.launch_server \
|
||||
--chunked-prefill-size 16384 \
|
||||
--tp-size 1 \
|
||||
--mem-fraction-static 0.85 \
|
||||
--cuda-graph-bs 8 12 24 36 48 51 55 60 63 64 66 68 70 \
|
||||
--cuda-graph-bs-decode 8 12 24 36 48 51 55 60 63 64 66 68 70 \
|
||||
--dtype bfloat16 \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
@@ -192,7 +192,7 @@ python3 -m sglang.launch_server \
|
||||
--chunked-prefill-size -1 \
|
||||
--tp-size 2 \
|
||||
--mem-fraction-static 0.894 \
|
||||
--cuda-graph-bs 1 \
|
||||
--cuda-graph-bs-decode 1 \
|
||||
--dtype bfloat16 \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
@@ -289,7 +289,7 @@ python3 -m sglang.launch_server \
|
||||
--chunked-prefill-size -1 \
|
||||
--tp-size 2 \
|
||||
--mem-fraction-static 0.894 \
|
||||
--cuda-graph-bs 1 5 15 16 \
|
||||
--cuda-graph-bs-decode 1 5 15 16 \
|
||||
--dtype bfloat16 \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--speculative-algorithm EAGLE3 \
|
||||
|
||||
+3
-3
@@ -116,7 +116,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--chunked-prefill-size -1 \
|
||||
--max-running-requests 2 \
|
||||
--cuda-graph-bs 2 \
|
||||
--cuda-graph-bs-decode 2 \
|
||||
--mamba-ssm-dtype bfloat16 \
|
||||
--speculative-draft-model-path $DRAFT_MODEL_PATH \
|
||||
--reasoning-parser qwen3 \
|
||||
@@ -235,7 +235,7 @@ python3 -m sglang.launch_server \
|
||||
--enable-dp-lm-head \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--cuda-graph-bs 1 2 3 4 5 6 7 8 10 12 14 16 18 20 22 24 26 28 30 32 40 44 48 52 56 60 64 72 80 88 96 104 112 120 128 136 144 150 \
|
||||
--cuda-graph-bs-decode 1 2 3 4 5 6 7 8 10 12 14 16 18 20 22 24 26 28 30 32 40 44 48 52 56 60 64 72 80 88 96 104 112 120 128 136 144 150 \
|
||||
--reasoning-parser qwen3 \
|
||||
--tool-call-parser qwen3_coder
|
||||
```
|
||||
@@ -349,7 +349,7 @@ python3 -m sglang.launch_server \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--chunked-prefill-size -1 \
|
||||
--max-running-requests 16 \
|
||||
--cuda-graph-bs 2 4 8 \
|
||||
--cuda-graph-bs-decode 2 4 8 \
|
||||
--mamba-ssm-dtype bfloat16 \
|
||||
--speculative-draft-model-path $DRAFT_MODEL_PATH \
|
||||
--reasoning-parser qwen3 \
|
||||
|
||||
@@ -27,7 +27,7 @@ v0.5.16 or a later version.
|
||||
| Expert Parallelism | `--ep-size 16 \`<br/>`--moe-a2a-backend deepep \`<br/>`--deepep-mode auto` |
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 4 8 20 21 22` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 4 8 20 21 22` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 2 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 3` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ recommended to use v0.5.16 or a later version.
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 2 3 4 5 6 7 8` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 3 4 5 6 7 8` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ recommended to use v0.5.16 or a later version.
|
||||
| Expert Parallelism | `--ep-size 16 \`<br/>`--moe-a2a-backend deepep \`<br/>`--deepep-mode auto` |
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 2 4 8 16 24 36 40 48 56` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 4 8 16 24 36 40 48 56` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE \`<br/>`--speculative-num-steps 2 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 3` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
@@ -31,7 +31,7 @@ v0.5.16 or a later version.
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 16384` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 2 3 4 5 6` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 3 4 5 6` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
@@ -23,7 +23,7 @@ multi-node deployment, prefill-decode disaggregation, feature configuration, and
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 16384` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs`; e.g., `--cuda-graph-bs 16` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 16` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
@@ -220,7 +220,7 @@ python3 -m sglang.launch_server \
|
||||
--mem-fraction-static 0.7 \
|
||||
--port 8000 \
|
||||
--served-model-name glm-5 \
|
||||
--cuda-graph-bs 16 \
|
||||
--cuda-graph-bs-decode 16 \
|
||||
--quantization modelslim \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4 \
|
||||
@@ -302,7 +302,7 @@ do
|
||||
--mem-fraction-static 0.8 \
|
||||
--port 8000 \
|
||||
--served-model-name glm-5 \
|
||||
--cuda-graph-max-bs 32 \
|
||||
--cuda-graph-max-bs-decode 32 \
|
||||
--moe-a2a-backend deepep \
|
||||
--deepep-mode auto \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
@@ -421,8 +421,8 @@ do
|
||||
--port 8003 --trust-remote-code --nnodes 1 --node-rank $i --tp-size 16 --dp-size 16 --ep-size 16 \
|
||||
--mem-fraction-static 0.8 --max-running-requests 128 --attention-backend ascend --device npu --quantization modelslim \
|
||||
--served-model-name glm-5 --moe-a2a-backend deepep --enable-dp-attention --deepep-mode low_latency \
|
||||
--cuda-graph-max-bs 4 --disaggregation-transfer-backend ascend --watchdog-timeout 9000 --context-length 180000 \
|
||||
--tokenizer-worker-num 4 --prefill-round-robin-balance --disable-shared-experts-fusion --dtype bfloat16 --load-balance-method round_robin \
|
||||
--cuda-graph-max-bs-decode 4 --disaggregation-transfer-backend ascend --watchdog-timeout 9000 --context-length 180000 \
|
||||
--tokenizer-worker-num 4 --disable-shared-experts-fusion --dtype bfloat16 --load-balance-method round_robin \
|
||||
--speculative-draft-model-quantization unquant \
|
||||
--speculative-algorithm NEXTN --speculative-num-steps 3 --speculative-eagle-topk 1 --speculative-num-draft-tokens 4
|
||||
NODE_RANK=$i
|
||||
|
||||
@@ -21,7 +21,7 @@ multi-node (Atlas 800I A2) PD mixed mode and speculative decoding.
|
||||
| Feature | Example usage |
|
||||
|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Tensor Parallelism | `--tp-size 16` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs`; e.g. `--cuda-graph-bs 4 8 16 20 24 28 32 36 40` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode`; e.g. `--cuda-graph-bs-decode 4 8 16 20 24 28 32 36 40` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE \`<br/>`--speculative-num-steps 2 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 3` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| Reasoning Mode | `extra_body={"chat_template_kwargs": {"reasoning_effort": "high"}}` — deep chain-of-thought;<br/>`"reasoning_effort": "low"` — short thinking chain;<br/>`"reasoning_effort": "no_think"` — direct response, no thinking |
|
||||
@@ -209,7 +209,7 @@ python3 -m sglang.launch_server \
|
||||
--base-gpu-id 0 \
|
||||
--prefill-max-requests 40 \
|
||||
--max-running-requests 40 \
|
||||
--cuda-graph-bs 4 8 16 20 24 28 32 36 40 \
|
||||
--cuda-graph-bs-decode 4 8 16 20 24 28 32 36 40 \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 2 \
|
||||
--speculative-eagle-topk 1 \
|
||||
@@ -286,7 +286,7 @@ for i in "${!NODE_IPS[@]}"; do
|
||||
--base-gpu-id 0 \
|
||||
--prefill-max-requests 40 \
|
||||
--max-running-requests 40 \
|
||||
--cuda-graph-bs 4 8 16 20 24 28 32 36 40 \
|
||||
--cuda-graph-bs-decode 4 8 16 20 24 28 32 36 40 \
|
||||
--speculative-algorithm EAGLE \
|
||||
--speculative-num-steps 2 \
|
||||
--speculative-eagle-topk 1 \
|
||||
|
||||
@@ -30,7 +30,7 @@ v0.5.16 or a later version.
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 32768` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 2 4 8 12 16 24 32 48 64 96 120` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 4 8 12 16 24 32 48 64 96 120` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE3 \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights \`<br/>`--speculative-num-steps 4 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 5 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ v0.5.16 or a later version.
|
||||
| Expert Parallelism | `--moe-a2a-backend deepep \`<br/>`--deepep-mode low_latency` |
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs`; e.g., `--cuda-graph-bs 1 2 4 8 12 16 20 24 28 32` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 4 8 12 16 20 24 28 32` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--enable-multi-layer-eagle` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=0` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ v0.5.16 or a later version.
|
||||
| Expert Parallelism | `--ep-size 16 \`<br/>`--moe-a2a-backend ascend_fuseep \`<br/>`--deepep-mode auto` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 8192` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 8 16 24 32 48 64 80` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 8 16 24 32 48 64 80` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE3 \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ v0.5.16 or a later version.
|
||||
| PD Disaggregation | `--disaggregation-mode prefill \`<br/>`--disaggregation-transfer-backend ascend` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 94208` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 2 4 8 16 20 24 26 27` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 4 8 16 20 24 26 27` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE3 \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ v0.5.16 or a later version.
|
||||
| Tensor Parallelism | `--tp-size 2` |
|
||||
| Data Parallelism | `--dp-size 2` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 5 15 40 70 100 120 130 140 146 150 154 156 158 160 162` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 5 15 40 70 100 120 130 140 146 150 154 156 158 160 162` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE3 \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ version.
|
||||
|-------------------------------|-----------------------------------------------------------------------------------------------|
|
||||
| Tensor Parallelism | `--tp-size 4` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 4 8 16` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 4 8 16` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE3 \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ use v0.5.16 or a later version.
|
||||
| Data Parallelism | `--dp-size 8` |
|
||||
| Expert Parallelism | `--ep-size 16 \`<br/>`--moe-a2a-backend deepep \`<br/>`--deepep-mode auto` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 2 4 6 8 10 12 14 16 18 20` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 2 4 6 8 10 12 14 16 18 20` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
@@ -26,7 +26,7 @@ v0.5.16 or a later version.
|
||||
| Tensor Parallelism | `--tp-size 2` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 32768` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 2 8 16 32 48` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 2 8 16 32 48` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ version**.
|
||||
|-------------------------------|-----------------------------------------------------------------------------------------------|
|
||||
| Tensor Parallelism | `--tp-size 2` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 16384` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 4 8 16 24 32 48 64 80 96 112 120` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 4 8 16 24 32 48 64 80 96 112 120` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ source.
|
||||
| Expert Parallelism | `--moe-a2a-backend deepep \`<br/>`--deepep-mode auto` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 8192` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 16` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 16` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
@@ -215,7 +215,7 @@ do
|
||||
--enable-dp-attention --dp-size 4 --enable-dp-lm-head \
|
||||
--mem-fraction-static 0.8 \
|
||||
--chunked-prefill-size 8192 \
|
||||
--cuda-graph-bs 16 \
|
||||
--cuda-graph-bs-decode 16 \
|
||||
--disable-radix-cache \
|
||||
--max-running-requests 64 \
|
||||
--host 0.0.0.0 \
|
||||
|
||||
@@ -26,7 +26,7 @@ version.
|
||||
| Tensor Parallelism | `--tp-size 2` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| Chunked Prefill | auto based on device memory, or set explicit value;<br/>disable with `--chunked-prefill-size -1`; e.g., `--chunked-prefill-size 8192` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 1 2 4 6 9 10 15 16` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 1 2 4 6 9 10 15 16` |
|
||||
| Speculative Decoding | `--speculative-algorithm EAGLE3 \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ v0.5.16 or a later version.
|
||||
| Data Parallelism | `--dp-size 2` |
|
||||
| Expert Parallelism | `--ep-size 4 \`<br/>`--moe-a2a-backend deepep \`<br/>`--deepep-mode auto` |
|
||||
| Quantization | `--quantization modelslim` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs 2 4 8` |
|
||||
| NPU Graph | enabled by default; disable with `--disable-cuda-graph`;<br/>control range via `--cuda-graph-bs-decode` or `--cuda-graph-max-bs-decode`; e.g., `--cuda-graph-bs-decode 2 4 8` |
|
||||
| Speculative Decoding | `--speculative-algorithm NEXTN \`<br/>`--speculative-num-steps 3 \`<br/>`--speculative-eagle-topk 1 \`<br/>`--speculative-num-draft-tokens 4 \`<br/>`--speculative-draft-model-quantization unquant \`<br/>`--speculative-draft-model-path /path/to/draft-model-weights` |
|
||||
| Overlap Schedule | `export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1` |
|
||||
| DP LM Head | `--enable-dp-lm-head` |
|
||||
|
||||
@@ -755,9 +755,9 @@ see [Quantization on Ascend](/docs/hardware-platforms/ascend-npus/optimization/q
|
||||
|
||||
Breaks large prefill computations into smaller, fixed-size chunks for better scheduling interleaving with decode batches. This prevents long prefill requests from blocking decode latency. Use `-1` to disable chunked prefill on dedicated prefill nodes. Has partial compatibility with most features because chunk boundaries introduce scheduling complexity.
|
||||
|
||||
### NPU Graph (`--cuda-graph-bs`)
|
||||
### NPU Graph (`--cuda-graph-bs-decode`)
|
||||
|
||||
Captures the compute graph on NPU and replays it to eliminate kernel launch overhead, analogous to CUDA Graph on NVIDIA GPUs. Internally uses `torch.npu.NPUGraph`. Most effective for decode with stable, predictable batch sizes (via `--cuda-graph-bs`). Has partial compatibility with most features because graph capture requires fixed control flow and tensor shapes.
|
||||
Captures the compute graph on NPU and replays it to eliminate kernel launch overhead, analogous to CUDA Graph on NVIDIA GPUs. Internally uses `torch.npu.NPUGraph`. Most effective for decode with stable, predictable batch sizes (via `--cuda-graph-bs-decode`). Has partial compatibility with most features because graph capture requires fixed control flow and tensor shapes.
|
||||
|
||||
<Note>
|
||||
`--enable-torch-compile` is incompatible with NPU Graph. When torch.compile is enabled, NPU Graph must be disabled via `--disable-cuda-graph`.
|
||||
|
||||
@@ -816,12 +816,6 @@ click [Server Arguments](../../../advanced_features/server_arguments).
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>List[float]</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--collect-tokens-histogram`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`False`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>bool flag<br/> (set to enable)</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--prompt-tokens-buckets`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`None`</td>
|
||||
@@ -1498,7 +1492,7 @@ non-default speculative acceptance thresholds or deterministic inference.
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--speculative-dflash-draft-window-size`<br/>`--speculative-draft-window-size`</td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--speculative-draft-window-size`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Type: int</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
@@ -2073,7 +2067,7 @@ If the value is int8, you must also set the environment variable:DEEP_NORMAL_MOD
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-backend-prefill`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`disabled`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`disabled`, `tc_piecewise`<br/> (`tc_piecewise` currently supports Llama-3.1-8B-Instruct and Qwen2.5-7B-Instruct)</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -2113,7 +2107,7 @@ If the value is int8, you must also set the environment variable:DEEP_NORMAL_MOD
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-bs`</td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-bs-decode`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>List[int]</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
@@ -2257,19 +2251,13 @@ If the value is int8, you must also set the environment variable:DEEP_NORMAL_MOD
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--enforce-piecewise-cuda-graph`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`False`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>bool flag<br/> (set to enable); <br/> Currently, Llama-3.1-8B-Instruct and Qwen2.5-7B-Instruct models are supported.</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--piecewise-cuda-graph-tokens`</td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-bs-prefill`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Type: JSON<br/> list</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--piecewise-cuda-graph-compiler`</td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-tc-compiler`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`eager`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>`eager`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
@@ -2281,7 +2269,7 @@ If the value is int8, you must also set the environment variable:DEEP_NORMAL_MOD
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--piecewise-cuda-graph-max-tokens`</td>
|
||||
<td style={{padding: "9px 12px", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.02)"}}>`--cuda-graph-max-bs-prefill`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>`None`</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.02)"}}>Type: int</td>
|
||||
<td style={{padding: "9px 12px", backgroundColor: "rgba(255,255,255,0.05)"}}>A2, A3</td>
|
||||
|
||||
@@ -223,7 +223,7 @@ sglang serve \
|
||||
--model-path ./zai-org/GLM-Image/vision_language_encoder/ \
|
||||
--tokenizer-path ./zai-org/GLM-Image/processor/ \
|
||||
--enable-multimodal \
|
||||
--cuda-graph-max-bs 28 \
|
||||
--cuda-graph-max-bs-decode 28 \
|
||||
--device npu \
|
||||
--attention-backend ascend \
|
||||
--disable-fast-image-processor \
|
||||
|
||||
@@ -124,7 +124,7 @@ export HCCL_HOST_SOCKET_PORT_RANGE="23000-23199"
|
||||
export HCCL_NPU_SOCKET_PORT_RANGE="23200-23399"
|
||||
sglang serve --model-path /path/to/zai-org/GLM-Image/vision_language_encoder/ \
|
||||
--tokenizer-path /path/to/zai-org/GLM-Image/processor/ --enable-multimodal \
|
||||
--cuda-graph-bs 1 --device npu --attention-backend ascend --image-processor-backend pil \
|
||||
--cuda-graph-bs-decode 1 --device npu --attention-backend ascend --image-processor-backend pil \
|
||||
--tp-size 4 --port ${PORT} --mem-fraction-static 0.4
|
||||
```
|
||||
Second terminal with diffusion server:
|
||||
|
||||
@@ -589,7 +589,7 @@ export const config = {
|
||||
// RTX 5090 32GB. NVFP4 is the only checkpoint that fits (FP8 does not
|
||||
// boot — total_rest_memory negative at every mem-fraction, measured —
|
||||
// and BF16 does not fit). Published operating point is ONE request in
|
||||
// flight; --cuda-graph-max-bs 1 also protects the token pool (default
|
||||
// flight; --cuda-graph-max-bs-decode 1 also protects the token pool (default
|
||||
// capture set costs 39,247 -> 37,347 and K 8 -> 7). The `warn` below
|
||||
// carries the user-facing guidance for raising concurrency.
|
||||
match: { hw: "rtx5090", variant: "default", quant: "nvfp4-bf16-head", nodes: "single" },
|
||||
@@ -598,7 +598,7 @@ export const config = {
|
||||
// multi-user deployment unaware.
|
||||
warn:
|
||||
"This recipe serves ONE request at a time: --max-running-requests 1 " +
|
||||
"and --cuda-graph-max-bs 1 pin it to the validated single-stream " +
|
||||
"and --cuda-graph-max-bs-decode 1 pin it to the validated single-stream " +
|
||||
"envelope. To handle more concurrent requests, raise both flags " +
|
||||
"together and re-derive --mamba-full-memory-ratio (and mem-fraction) " +
|
||||
"with the [Mamba ratio calculator](#mamba-ratio-calculator) — on this " +
|
||||
@@ -611,7 +611,7 @@ export const config = {
|
||||
"--mem-fraction-static 0.9",
|
||||
"--attention-backend flashinfer",
|
||||
"--max-running-requests 1",
|
||||
"--cuda-graph-max-bs 1",
|
||||
"--cuda-graph-max-bs-decode 1",
|
||||
"--reasoning-parser qwen3",
|
||||
"--tool-call-parser qwen3_coder",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -624,7 +624,7 @@ export const config = {
|
||||
// RTX 5090 32GB. NVFP4 is the only checkpoint that fits (FP8 does not
|
||||
// boot — total_rest_memory negative at every mem-fraction, measured —
|
||||
// and BF16 does not fit). Published operating point is ONE request in
|
||||
// flight; --cuda-graph-max-bs 1 also protects the token pool (default
|
||||
// flight; --cuda-graph-max-bs-decode 1 also protects the token pool (default
|
||||
// capture set costs 39,247 -> 37,347 and K 8 -> 7). The `warn` below
|
||||
// carries the user-facing guidance for raising concurrency.
|
||||
match: { hw: "rtx5090", variant: "default", quant: "nvfp4-fp4-head", nodes: "single" },
|
||||
@@ -633,7 +633,7 @@ export const config = {
|
||||
// multi-user deployment unaware.
|
||||
warn:
|
||||
"This recipe serves ONE request at a time: --max-running-requests 1 " +
|
||||
"and --cuda-graph-max-bs 1 pin it to the validated single-stream " +
|
||||
"and --cuda-graph-max-bs-decode 1 pin it to the validated single-stream " +
|
||||
"envelope. To handle more concurrent requests, raise both flags " +
|
||||
"together and re-derive --mamba-full-memory-ratio (and mem-fraction) " +
|
||||
"with the [Mamba ratio calculator](#mamba-ratio-calculator) — on this " +
|
||||
@@ -646,7 +646,7 @@ export const config = {
|
||||
"--mem-fraction-static 0.9",
|
||||
"--attention-backend flashinfer",
|
||||
"--max-running-requests 1",
|
||||
"--cuda-graph-max-bs 1",
|
||||
"--cuda-graph-max-bs-decode 1",
|
||||
"--reasoning-parser qwen3",
|
||||
"--tool-call-parser qwen3_coder",
|
||||
"--host {{HOST_IP}}",
|
||||
|
||||
@@ -233,8 +233,8 @@ export const config = {
|
||||
// ----- Card: "PD Disaggregation" -----
|
||||
// Role flags follow the P/D bundle's own prefill and decode workers. Two
|
||||
// flags those recipes carry are deliberately not emitted:
|
||||
// --prefill-round-robin-balance is a DeprecatedAction on current SGLang and
|
||||
// does nothing, and --mamba-track-interval is context-dependent (the source
|
||||
// --prefill-round-robin-balance no longer exists on current SGLang (it was
|
||||
// a deprecated no-op), and --mamba-track-interval is context-dependent (the source
|
||||
// recipes set it equal to their context cap) so a fixed value here would be
|
||||
// wrong for cells serving the native window.
|
||||
pdDisagg: {
|
||||
|
||||
@@ -114,7 +114,7 @@ sgl-eval run gsm8k \\
|
||||
hicache: {
|
||||
defaultBackend: "mooncake",
|
||||
requiredFlags: [
|
||||
"--mamba-scheduler-strategy extra_buffer",
|
||||
"--mamba-radix-cache-strategy extra_buffer",
|
||||
"--enable-cache-report",
|
||||
],
|
||||
backends: [
|
||||
@@ -618,7 +618,7 @@ sgl-eval run gsm8k \\
|
||||
"--hicache-storage-backend mooncake",
|
||||
"--hicache-io-backend direct",
|
||||
"--hicache-mem-layout page_first_direct",
|
||||
"--mamba-scheduler-strategy extra_buffer",
|
||||
"--mamba-radix-cache-strategy extra_buffer",
|
||||
"--enable-cache-report",
|
||||
"--hicache-storage-prefetch-policy wait_complete",
|
||||
"--hicache-storage-backend-extra-config '{\"hicache_storage_pass_prefix_keys\":true}'",
|
||||
@@ -647,7 +647,7 @@ sgl-eval run gsm8k \\
|
||||
"--hicache-storage-backend mooncake",
|
||||
"--hicache-io-backend direct",
|
||||
"--hicache-mem-layout page_first_direct",
|
||||
"--mamba-scheduler-strategy extra_buffer",
|
||||
"--mamba-radix-cache-strategy extra_buffer",
|
||||
"--enable-cache-report",
|
||||
"--hicache-storage-prefetch-policy wait_complete",
|
||||
"--hicache-storage-backend-extra-config '{\"hicache_storage_pass_prefix_keys\":true}'",
|
||||
@@ -675,7 +675,7 @@ sgl-eval run gsm8k \\
|
||||
"--hicache-storage-backend mooncake",
|
||||
"--hicache-io-backend direct",
|
||||
"--hicache-mem-layout page_first_direct",
|
||||
"--mamba-scheduler-strategy extra_buffer",
|
||||
"--mamba-radix-cache-strategy extra_buffer",
|
||||
"--enable-cache-report",
|
||||
"--hicache-storage-prefetch-policy wait_complete",
|
||||
"--hicache-storage-backend-extra-config '{\"hicache_storage_pass_prefix_keys\":true}'",
|
||||
@@ -704,7 +704,7 @@ sgl-eval run gsm8k \\
|
||||
"--hicache-storage-backend mooncake",
|
||||
"--hicache-io-backend direct",
|
||||
"--hicache-mem-layout page_first_direct",
|
||||
"--mamba-scheduler-strategy extra_buffer",
|
||||
"--mamba-radix-cache-strategy extra_buffer",
|
||||
"--enable-cache-report",
|
||||
"--hicache-storage-prefetch-policy wait_complete",
|
||||
"--hicache-storage-backend-extra-config '{\"hicache_storage_pass_prefix_keys\":true}'",
|
||||
|
||||
@@ -134,7 +134,7 @@ sgl-eval run gsm8k \\
|
||||
"--max-running-requests 64",
|
||||
"--mem-fraction-static 0.92",
|
||||
"--chunked-prefill-size 2048",
|
||||
"--nsa-prefill-backend fa3",
|
||||
"--dsa-prefill-backend fa3",
|
||||
"--kv-cache-dtype bfloat16",
|
||||
"--model-loader-extra-config '{\"enable_multithread_load\":true,\"num_threads\":12}'",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -154,7 +154,7 @@ sgl-eval run gsm8k \\
|
||||
"--max-running-requests 64",
|
||||
"--mem-fraction-static 0.92",
|
||||
"--chunked-prefill-size 2048",
|
||||
"--nsa-prefill-backend fa3",
|
||||
"--dsa-prefill-backend fa3",
|
||||
"--kv-cache-dtype bfloat16",
|
||||
"--model-loader-extra-config '{\"enable_multithread_load\":true,\"num_threads\":12}'",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -173,7 +173,7 @@ sgl-eval run gsm8k \\
|
||||
"--max-running-requests 64",
|
||||
"--mem-fraction-static 0.92",
|
||||
"--chunked-prefill-size 2048",
|
||||
"--nsa-prefill-backend fa3",
|
||||
"--dsa-prefill-backend fa3",
|
||||
"--kv-cache-dtype bfloat16",
|
||||
"--model-loader-extra-config '{\"enable_multithread_load\":true,\"num_threads\":12}'",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -192,7 +192,7 @@ sgl-eval run gsm8k \\
|
||||
"--max-running-requests 64",
|
||||
"--mem-fraction-static 0.92",
|
||||
"--chunked-prefill-size 2048",
|
||||
"--nsa-prefill-backend fa3",
|
||||
"--dsa-prefill-backend fa3",
|
||||
"--kv-cache-dtype bfloat16",
|
||||
"--model-loader-extra-config '{\"enable_multithread_load\":true,\"num_threads\":12}'",
|
||||
"--host {{HOST_IP}}",
|
||||
|
||||
@@ -1183,7 +1183,7 @@ export const config = {
|
||||
"--kv-cache-dtype fp8_e4m3",
|
||||
"--dtype bfloat16",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--reasoning-parser kimi_k3",
|
||||
"--tool-call-parser kimi_k3",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1210,7 +1210,7 @@ export const config = {
|
||||
"--kv-cache-dtype fp8_e4m3",
|
||||
"--dtype bfloat16",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--reasoning-parser kimi_k3",
|
||||
"--tool-call-parser kimi_k3",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1959,7 +1959,7 @@ export const config = {
|
||||
"--kv-cache-dtype fp8_e4m3",
|
||||
"--dtype bfloat16",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--reasoning-parser kimi_k3",
|
||||
"--tool-call-parser kimi_k3",
|
||||
"--disaggregation-mode decode",
|
||||
@@ -1987,7 +1987,7 @@ export const config = {
|
||||
"--kv-cache-dtype fp8_e4m3",
|
||||
"--dtype bfloat16",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--reasoning-parser kimi_k3",
|
||||
"--tool-call-parser kimi_k3",
|
||||
"--disaggregation-mode decode",
|
||||
@@ -2379,7 +2379,7 @@ export const config = {
|
||||
"--enable-dp-lm-head",
|
||||
"--mem-fraction-static 0.78",
|
||||
"--chunked-prefill-size 16384",
|
||||
"--cuda-graph-bs 2 4 8 16",
|
||||
"--cuda-graph-bs-decode 2 4 8 16",
|
||||
"--max-running-requests 64",
|
||||
"--max-mamba-cache-size 64",
|
||||
"--moe-a2a-backend deepep",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// RTX 5090 32GB (`zijiexia-5090-1gpu`, `lmsysorg/sglang:dev` @ 30705c004c) with
|
||||
// `python3 -m sglang.bench_serving`, random 1024/1024, against the exact cell
|
||||
// command on this page — including `--mem-fraction-static 0.75
|
||||
// --cuda-graph-max-bs 128`, which is what keeps concurrency 64 and 128
|
||||
// --cuda-graph-max-bs-decode 128`, which is what keeps concurrency 64 and 128
|
||||
// graph-backed (see the model page's Configuration Tips).
|
||||
//
|
||||
// `tokens_per_sec_per_gpu` is total (input+output) per GPU = the measured
|
||||
|
||||
@@ -206,7 +206,7 @@ export const config = {
|
||||
"--reasoning-parser qwen3",
|
||||
"--tool-call-parser minicpm5",
|
||||
"--mem-fraction-static 0.75",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
],
|
||||
@@ -225,7 +225,7 @@ export const config = {
|
||||
"--reasoning-parser qwen3",
|
||||
"--tool-call-parser minicpm5",
|
||||
"--mem-fraction-static 0.30",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
],
|
||||
|
||||
@@ -772,7 +772,7 @@ sgl-eval run aime25 \\
|
||||
"--chunked-prefill-size 8192",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--max-running-requests 16",
|
||||
"--cuda-graph-max-bs 16",
|
||||
"--cuda-graph-max-bs-decode 16",
|
||||
"--max-prefill-tokens 8192",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
@@ -837,7 +837,7 @@ sgl-eval run aime25 \\
|
||||
"--chunked-prefill-size 8192",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--max-running-requests 16",
|
||||
"--cuda-graph-max-bs 16",
|
||||
"--cuda-graph-max-bs-decode 16",
|
||||
"--max-prefill-tokens 8192",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
@@ -927,7 +927,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -944,7 +944,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -978,7 +978,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -995,7 +995,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1043,7 +1043,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1062,7 +1062,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1094,7 +1094,7 @@ sgl-eval run aime25 \\
|
||||
"--speculative-num-draft-tokens 4",
|
||||
"--chunked-prefill-size 131072",
|
||||
"--mem-fraction-static 0.80",
|
||||
"--cuda-graph-max-bs 160",
|
||||
"--cuda-graph-max-bs-decode 160",
|
||||
"--max-running-requests 160",
|
||||
"--watchdog-timeout 1800",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1128,7 +1128,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1145,7 +1145,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1179,7 +1179,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1196,7 +1196,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1230,7 +1230,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1247,7 +1247,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
|
||||
@@ -416,7 +416,7 @@ sgl-eval run gsm8k \\
|
||||
"--reasoning-parser glm45",
|
||||
"--tool-call-parser glm47",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 32",
|
||||
"--cuda-graph-max-bs-decode 32",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
],
|
||||
@@ -472,7 +472,7 @@ sgl-eval run gsm8k \\
|
||||
"--reasoning-parser glm45",
|
||||
"--tool-call-parser glm47",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 32",
|
||||
"--cuda-graph-max-bs-decode 32",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
],
|
||||
@@ -518,7 +518,7 @@ sgl-eval run gsm8k \\
|
||||
"--reasoning-parser glm45",
|
||||
"--tool-call-parser glm47",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 32",
|
||||
"--cuda-graph-max-bs-decode 32",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
],
|
||||
@@ -564,7 +564,7 @@ sgl-eval run gsm8k \\
|
||||
"--reasoning-parser glm45",
|
||||
"--tool-call-parser glm47",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 32",
|
||||
"--cuda-graph-max-bs-decode 32",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
],
|
||||
|
||||
@@ -716,7 +716,7 @@ sgl-eval run aime25 \\
|
||||
"--chunked-prefill-size 8192",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--max-running-requests 16",
|
||||
"--cuda-graph-max-bs 16",
|
||||
"--cuda-graph-max-bs-decode 16",
|
||||
"--max-prefill-tokens 8192",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
@@ -758,7 +758,7 @@ sgl-eval run aime25 \\
|
||||
"--chunked-prefill-size 8192",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--max-running-requests 16",
|
||||
"--cuda-graph-max-bs 16",
|
||||
"--cuda-graph-max-bs-decode 16",
|
||||
"--max-prefill-tokens 8192",
|
||||
"--host {{HOST_IP}}",
|
||||
"--port {{PORT}}",
|
||||
@@ -825,7 +825,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -842,7 +842,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -876,7 +876,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -893,7 +893,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -927,7 +927,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -944,7 +944,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -978,7 +978,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -995,7 +995,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1029,7 +1029,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--chunked-prefill-size 32768",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 128",
|
||||
"--cuda-graph-max-bs-decode 128",
|
||||
"--max-running-requests 80",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
@@ -1046,7 +1046,7 @@ sgl-eval run aime25 \\
|
||||
"--dsa-prefill-backend tilelang",
|
||||
"--dsa-decode-backend tilelang",
|
||||
"--mem-fraction-static 0.85",
|
||||
"--cuda-graph-max-bs 256",
|
||||
"--cuda-graph-max-bs-decode 256",
|
||||
"--max-running-requests 256",
|
||||
"--watchdog-timeout 1200",
|
||||
"--host {{HOST_IP}}",
|
||||
|
||||
@@ -6,7 +6,6 @@ from sglang.srt.layers.layernorm import RMSNorm
|
||||
from sglang.srt.layers.rotary_embedding import get_rope
|
||||
from sglang.srt.server_args import (
|
||||
ServerArgs,
|
||||
get_global_server_args,
|
||||
set_global_server_args_for_scheduler,
|
||||
)
|
||||
from sglang.srt.utils import (
|
||||
|
||||
@@ -120,7 +120,7 @@ class _GlmDistributedCluster:
|
||||
"--disable-fast-image-processor",
|
||||
"--tp-size",
|
||||
"1",
|
||||
"--cuda-graph-bs",
|
||||
"--cuda-graph-bs-decode",
|
||||
"2",
|
||||
"--base-gpu-id",
|
||||
"0",
|
||||
|
||||
@@ -71,7 +71,7 @@ class ARCluster(DisaggCluster):
|
||||
"--tokenizer-path",
|
||||
os.path.join(local_model, "processor"),
|
||||
"--enable-multimodal",
|
||||
"--cuda-graph-bs",
|
||||
"--cuda-graph-bs-decode",
|
||||
"1",
|
||||
"--image-processor-backend",
|
||||
"pil",
|
||||
|
||||
@@ -29,10 +29,9 @@ from sglang.multimodal_gen.runtime.disaggregation.scheduler_mixin import (
|
||||
)
|
||||
from sglang.multimodal_gen.runtime.disaggregation.transport.codec import pack_tensors
|
||||
from sglang.multimodal_gen.runtime.pipelines_core import Req
|
||||
from sglang.srt import server_args as srt_server_args_module
|
||||
from sglang.srt.observability import trace as srt_trace
|
||||
from sglang.srt.observability.trace import TraceNullContext, TraceReqContext
|
||||
from sglang.srt.runtime_context import reset_context
|
||||
from sglang.srt.runtime_context import get_server_args, reset_context
|
||||
from sglang.srt.server_args import set_global_server_args_for_scheduler
|
||||
|
||||
try:
|
||||
@@ -63,7 +62,7 @@ def _enable_minimal_otel() -> None:
|
||||
@contextmanager
|
||||
def _srt_trace_server_args():
|
||||
try:
|
||||
prev_server_args = srt_server_args_module.get_global_server_args()
|
||||
prev_server_args = get_server_args()
|
||||
except ValueError: # nothing published yet
|
||||
prev_server_args = None
|
||||
# publish resolves what it is handed, so a stand-in cannot go through it.
|
||||
|
||||
@@ -39,7 +39,6 @@ annotation is equivalent to ``Arg(help=that_string)``.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
import dataclasses
|
||||
import functools
|
||||
import types
|
||||
@@ -57,20 +56,6 @@ from typing import (
|
||||
A = Annotated
|
||||
|
||||
|
||||
class _NoFallback:
|
||||
"""Sentinel for ``Arg.fallback``: this field declares none.
|
||||
|
||||
``None`` cannot serve, because ``None`` is what a field *holds* when the
|
||||
operator did not type it -- the state a fallback answers for.
|
||||
"""
|
||||
|
||||
def __repr__(self) -> str: # pragma: no cover - debugging aid
|
||||
return "<no fallback>"
|
||||
|
||||
|
||||
NO_FALLBACK = _NoFallback()
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Arg:
|
||||
"""CLI argument metadata attached to a dataclass field via ``Annotated``."""
|
||||
@@ -96,11 +81,13 @@ class Arg:
|
||||
# What the field means when nobody said anything -- the bottom of the read
|
||||
# chain: override, decision, input, then this. Not the dataclass default,
|
||||
# which stays `None` because that is how the record spells "not typed".
|
||||
# `None` here means the field declares no fallback, which is the same
|
||||
# answer the read chain gives without one.
|
||||
#
|
||||
# Only a value fixed for the life of the configuration belongs here. One
|
||||
# that depends on the machine, on another field, or on anything impure is a
|
||||
# decision, and decisions stay in a hook where their order is visible.
|
||||
fallback: Any = NO_FALLBACK
|
||||
fallback: Any = None
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -232,7 +219,20 @@ def fallbacks_of(cls) -> dict:
|
||||
out = {}
|
||||
for field in dataclasses.fields(cls):
|
||||
_, arg = _unwrap_annotated(hints.get(field.name, field.type))
|
||||
if arg is not None and arg.fallback is not NO_FALLBACK:
|
||||
if arg is not None and arg.fallback is not None:
|
||||
# Two things `with_fallback` relies on and cannot check itself,
|
||||
# asserted where a new declaration passes through. This function is
|
||||
# cached, so a mutable fallback would hand one shared object to
|
||||
# every reader; and a field whose dataclass default is not `None`
|
||||
# can never reach the fallback, which makes the declaration dead.
|
||||
assert not isinstance(arg.fallback, (list, dict, set)), (
|
||||
f"{cls.__name__}.{field.name}: a mutable fallback would be "
|
||||
"shared by every reader -- use a scalar"
|
||||
)
|
||||
assert field.default is None, (
|
||||
f"{cls.__name__}.{field.name}: declares a fallback but defaults "
|
||||
f"to {field.default!r}, so the fallback is unreachable"
|
||||
)
|
||||
out[field.name] = arg.fallback
|
||||
return out
|
||||
|
||||
@@ -246,17 +246,12 @@ def with_fallback(cls, name: str, value: Any) -> Any:
|
||||
on `if cfg.swa_full_tokens_ratio is None`, and a fallback answering there
|
||||
would make that branch dead. `test_declared_fallbacks.py` pins both halves.
|
||||
|
||||
A container fallback is copied, for the reason a dataclass spells this
|
||||
`default_factory`.
|
||||
A mutable fallback would need copying per read, for the reason a dataclass
|
||||
spells this `default_factory`. Every declared one is a scalar.
|
||||
"""
|
||||
if value is not None:
|
||||
return value
|
||||
fallback = fallbacks_of(cls).get(name, NO_FALLBACK)
|
||||
if fallback is NO_FALLBACK:
|
||||
return value
|
||||
if isinstance(fallback, (list, dict, set)):
|
||||
return copy.deepcopy(fallback)
|
||||
return fallback
|
||||
return fallbacks_of(cls).get(name, value)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -29,18 +29,45 @@ def print_deprecated_warning(message: str):
|
||||
logger.warning(f"\033[1;33m{message}\033[0m")
|
||||
|
||||
|
||||
# Retiring a flag comes in four shapes, and which one you need depends on what
|
||||
# the flag was and what replaced it:
|
||||
#
|
||||
# * the flag is gone and there is no automatic translation
|
||||
# -> `DeprecatedAction` with `error_message=`, which stops the launch and
|
||||
# names the replacement;
|
||||
# * an old boolean whose field survives, possibly renamed
|
||||
# -> `DeprecatedStoreTrueAction`;
|
||||
# * an old boolean replaced by one *value* of a new valued flag
|
||||
# -> `DeprecatedStoreConstAction` with `const_value=`;
|
||||
# * an old valued flag replaced by a renamed valued flag
|
||||
# -> `DeprecatedAliasStoreAction`.
|
||||
#
|
||||
# Only the second has a registration today (`--disable-cuda-graph`). The other
|
||||
# three are kept because the shapes recur -- this package has retired flags of
|
||||
# every one of them -- and the fiddly parts (`nargs=0` on a boolean, where the
|
||||
# const goes, warn-and-continue versus `parser.error`) are what a
|
||||
# reimplementation gets wrong. Pass `new_flag=` so the warning tells the
|
||||
# operator what to switch to; that pointer is the whole point.
|
||||
|
||||
|
||||
class DeprecatedAction(argparse.Action):
|
||||
"""A retired flag with no automatic translation: stop and say so.
|
||||
|
||||
`error_message` should name the replacement, because a bare "unrecognized
|
||||
arguments" leaves the operator guessing. Without one it warns and continues,
|
||||
which suits a flag that has become a no-op rather than a rename.
|
||||
"""
|
||||
|
||||
def __init__(self, option_strings, dest, error_message=None, nargs=0, **kwargs):
|
||||
self.error_message = error_message
|
||||
super(DeprecatedAction, self).__init__(
|
||||
option_strings, dest, nargs=nargs, **kwargs
|
||||
)
|
||||
super().__init__(option_strings, dest, nargs=nargs, **kwargs)
|
||||
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
if self.error_message is not None:
|
||||
parser.error(self.error_message)
|
||||
print_deprecated_warning(
|
||||
f"The command line argument '{option_string}' is deprecated and will be removed in future versions."
|
||||
f"The command line argument '{option_string}' is deprecated and "
|
||||
"will be removed in future versions."
|
||||
)
|
||||
|
||||
|
||||
@@ -71,10 +98,12 @@ class DeprecatedStoreTrueAction(argparse.Action):
|
||||
|
||||
|
||||
class DeprecatedStoreConstAction(argparse.Action):
|
||||
"""Deprecated boolean flag that stores a fixed string/value into ``dest``
|
||||
and prints a warning. Used to translate a legacy boolean flag into a
|
||||
setting on the new per-phase config dict (e.g.
|
||||
``--disable-piecewise-cuda-graph`` -> ``cuda_graph_backend_prefill="disabled"``)."""
|
||||
"""An old boolean whose replacement is one *value* of a valued flag.
|
||||
|
||||
The bool-to-enum migration: the operator passes no value, and the action
|
||||
writes the fixed one `const_value` names onto the new field. `nargs=0`
|
||||
because the old spelling took no argument.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -93,13 +122,14 @@ class DeprecatedStoreConstAction(argparse.Action):
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
replacement = f" Use '{self.new_flag}' instead." if self.new_flag else ""
|
||||
print_deprecated_warning(
|
||||
f"'{option_string}' is deprecated and will be removed in a future release.{replacement}"
|
||||
f"'{option_string}' is deprecated and will be removed in a future "
|
||||
f"release.{replacement}"
|
||||
)
|
||||
setattr(namespace, self.dest, self.const_value)
|
||||
|
||||
|
||||
class DeprecatedAliasStoreAction(argparse.Action):
|
||||
"""Deprecated alias that stores its value and prints a warning."""
|
||||
"""An old valued flag renamed: keep the value, move it to the new dest."""
|
||||
|
||||
def __init__(self, option_strings, dest, new_flag=None, **kwargs):
|
||||
self.new_flag = new_flag
|
||||
@@ -108,6 +138,7 @@ class DeprecatedAliasStoreAction(argparse.Action):
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
replacement = f" Use '{self.new_flag}' instead." if self.new_flag else ""
|
||||
print_deprecated_warning(
|
||||
f"'{option_string}' is deprecated and will be removed in a future release.{replacement}"
|
||||
f"'{option_string}' is deprecated and will be removed in a future "
|
||||
f"release.{replacement}"
|
||||
)
|
||||
setattr(namespace, self.dest, values)
|
||||
|
||||
@@ -175,6 +175,11 @@ def handle_attention_backend_compatibility(server_args: Any):
|
||||
# AMD platforms backends
|
||||
if resolved_view(server_args).attention_backend == "aiter":
|
||||
if model_config.context_len > 8192:
|
||||
# The record, via the input snapshot rather than the field: a
|
||||
# hook may not read a field off the record (the guard in
|
||||
# `test_resolution_reads_the_declarations.py`), and what this
|
||||
# needs is the input anyway -- whether the operator asked for a
|
||||
# memory fraction, not the value in effect.
|
||||
explicit_mem_fraction = (
|
||||
getattr(server_args, "_raw_input", None) or {}
|
||||
).get("mem_fraction_static") is not None
|
||||
|
||||
@@ -40,8 +40,8 @@ def parse_cuda_graph_config(server_args: Any):
|
||||
Precedence (highest first): explicit JSON > convenience > legacy > defaults.
|
||||
Also populates server_args._cuda_graph_config_locked — the set of
|
||||
(phase, key) tuples that came from non-default sources; the
|
||||
auto-disable cascade respects this lock (the old
|
||||
--enforce-piecewise-cuda-graph semantics generalized).
|
||||
auto-disable cascade respects this lock (an explicitly supplied prefill
|
||||
backend skips the cascade, whichever value it is).
|
||||
"""
|
||||
cfg = resolving_view(server_args)
|
||||
raw_input = cfg.cuda_graph_config
|
||||
@@ -107,8 +107,8 @@ def apply_cuda_graph_compatibility(server_args: Any):
|
||||
"""Auto-disable prefill cuda graph for incompatible configs.
|
||||
Rules are split per backend — TcPiecewise and Breakable have
|
||||
different constraints. Skipped when the user explicitly set the
|
||||
prefill backend (this folds in the old
|
||||
--enforce-piecewise-cuda-graph contract).
|
||||
prefill backend, whichever value they chose (the contract the removed
|
||||
--enforce-piecewise-cuda-graph used to spell).
|
||||
"""
|
||||
|
||||
cfg = resolving_view(server_args)
|
||||
|
||||
@@ -48,7 +48,7 @@ def _inkling_overrides(server_args: Any, hf_config: Any) -> dict:
|
||||
overrides["mamba_full_memory_ratio"] = 0.1
|
||||
# Inkling requires the extra-buffer mamba strategy (inkling.py asserts
|
||||
# enable_mamba_extra_buffer()); the generic "auto" resolution does not cover
|
||||
# Inkling, so pin it here. Yields to an explicit --mamba-scheduler-strategy.
|
||||
# Inkling, so pin it here. Yields to an explicit --mamba-radix-cache-strategy.
|
||||
#
|
||||
# Compared against the unresolved token rather than the class default: the
|
||||
# default only answers "unset" while nothing has declared the field first,
|
||||
|
||||
@@ -429,7 +429,7 @@ def validate_deepep_v2_dispatch_token_budget(server_args: Any) -> None:
|
||||
"SGLANG_DEEPEP_V2_NUM_MAX_DISPATCH_TOKENS_PER_RANK: "
|
||||
f"required={graph_tokens}, capacity={capacity} "
|
||||
f"(requests={graph_bs}, tokens/request={tokens_per_req}). Raise "
|
||||
"the environment value or lower --cuda-graph-max-bs."
|
||||
"the environment value or lower --cuda-graph-max-bs-decode."
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ class SingleForwardManager:
|
||||
if bs > self._write_req_capacity:
|
||||
raise RuntimeError(
|
||||
f"kv-canary: forward_batch.batch_size={bs} exceeds pre-allocated "
|
||||
f"write_req_capacity={self._write_req_capacity}; raise --cuda-graph-max-bs "
|
||||
f"write_req_capacity={self._write_req_capacity}; raise --cuda-graph-max-bs-decode "
|
||||
f"or check CanaryLaunchCapacities.from_args"
|
||||
)
|
||||
if num_tokens > self._write_entry_capacity:
|
||||
|
||||
@@ -1375,7 +1375,7 @@ class CommunicateWithAllReduceAndLayerNormFn:
|
||||
# - During CP extend: zigzag split guarantees all CP ranks have non-zero tokens,
|
||||
# so no rank hits this path while others proceed to the allgather.
|
||||
# - During decode: moe_cp allgather is skipped (guarded by is_context_parallel_extend).
|
||||
# - CUDA graph warmup: not applicable when --disable-piecewise-cuda-graph is used.
|
||||
# - CUDA graph warmup: not applicable when --cuda-graph-backend-prefill=disabled is used.
|
||||
if hidden_states.shape[0] == 0:
|
||||
return hidden_states, residual
|
||||
|
||||
|
||||
@@ -224,8 +224,8 @@ def _run_mega_routed(
|
||||
assert num_tokens <= num_max_tokens_per_rank, (
|
||||
f"mega MoE: num_tokens={num_tokens} exceeds cap "
|
||||
f"SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK="
|
||||
f"{num_max_tokens_per_rank}; raise the env var or shrink "
|
||||
f"cuda_graph_max_bs / chunked_prefill_size accordingly"
|
||||
f"{num_max_tokens_per_rank}; raise the env var or lower "
|
||||
f"--cuda-graph-max-bs-decode / --chunked-prefill-size accordingly"
|
||||
)
|
||||
|
||||
buf = _get_mega_moe_symm_buffer(
|
||||
|
||||
@@ -314,7 +314,7 @@ def _unified_attention_with_output_impl(
|
||||
sinks: Optional[torch.Tensor] = None,
|
||||
attn_sink: Optional[torch.Tensor] = None,
|
||||
# MLA / TRT-LLM / NSA paths pass these through RadixAttention.forward(**kwargs);
|
||||
# they must appear in the schema when --enforce-piecewise-cuda-graph is on.
|
||||
# they must appear in the schema when --cuda-graph-backend-prefill=tc_piecewise is on.
|
||||
cos_sin_cache: Optional[torch.Tensor] = None,
|
||||
is_neox: Optional[bool] = None,
|
||||
llama_4_scaling: Optional[torch.Tensor] = None,
|
||||
|
||||
@@ -206,7 +206,7 @@ Important details from this validation:
|
||||
|
||||
- Use a real `.toml` file path with `--hicache-storage-backend-extra-config`.
|
||||
- For this validated path, the storage directory was provided through `SGLANG_HICACHE_NIXL_BACKEND_STORAGE_DIR`.
|
||||
- Use `--mamba-scheduler-strategy extra_buffer` to support page sizes larger than 1.
|
||||
- Use `--mamba-radix-cache-strategy extra_buffer` to support page sizes larger than 1.
|
||||
|
||||
Example TOML file:
|
||||
|
||||
@@ -237,7 +237,7 @@ export SGLANG_HICACHE_NIXL_BACKEND_STORAGE_DIR=/tmp/sglang_nixl_e2e_storage
|
||||
--disable-cuda-graph \
|
||||
--hicache-storage-backend nixl \
|
||||
--hicache-storage-backend-extra-config @/tmp/nixl.config.toml \
|
||||
--mamba-scheduler-strategy extra_buffer
|
||||
--mamba-radix-cache-strategy extra_buffer
|
||||
```
|
||||
|
||||
Expected behavior for this validated setup:
|
||||
|
||||
@@ -193,7 +193,6 @@ from sglang.srt.server_args import ( # noqa: F401 (re-export)
|
||||
CHUNKED_PREFIX_CACHE_SUPPORTED_ATTENTION_BACKENDS,
|
||||
ServerArgs,
|
||||
add_chunked_prefix_cache_attention_backend,
|
||||
get_global_server_args,
|
||||
)
|
||||
from sglang.srt.speculative.adaptive_spec_params import (
|
||||
resolve_candidate_steps_from_config,
|
||||
|
||||
@@ -26,8 +26,8 @@ user's raw input, kept **read-only** for debug and reproduction; what
|
||||
resolution decided lives in the declarations (``resolution_result``) and, for
|
||||
business code, in the namespace bags below -- never on this object's fields. The context owns the storage:
|
||||
publishing goes through ``RuntimeContext.set_server_args`` (the legacy
|
||||
``set_global_server_args_for_scheduler`` / ``get_global_server_args`` are thin
|
||||
shims over this slot).
|
||||
``set_global_server_args_for_scheduler`` is a thin shim over this slot;
|
||||
``get_global_server_args`` is retired and raises).
|
||||
|
||||
``get_exec()`` / ``get_memory()`` / ``get_schedule()`` / ``get_device()`` /
|
||||
``get_model()`` / ``get_spec()`` / ``get_lora()`` / ``get_mm()`` /
|
||||
|
||||
@@ -41,16 +41,13 @@ import logging
|
||||
import tempfile
|
||||
import uuid
|
||||
from contextlib import contextmanager
|
||||
from typing import Any
|
||||
from typing import Any, NoReturn
|
||||
|
||||
from sglang.kernels.ops.kv_canary.consts import RealKvHashMode
|
||||
from sglang.srt.arg_groups.arg_utils import (
|
||||
add_cli_args_from_dataclass,
|
||||
)
|
||||
from sglang.srt.arg_groups.argparse_actions import (
|
||||
DeprecatedAction,
|
||||
DeprecatedAliasStoreAction,
|
||||
DeprecatedStoreConstAction,
|
||||
DeprecatedStoreTrueAction,
|
||||
)
|
||||
from sglang.srt.arg_groups.model_override_base import ep_joiner_of, ep_scale_joiner_of
|
||||
@@ -61,13 +58,8 @@ from sglang.srt.arg_groups.overrides import (
|
||||
)
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.function_call.function_call_parser import FunctionCallParser
|
||||
from sglang.srt.model_executor.cuda_graph_config import Backend
|
||||
from sglang.srt.parser.reasoning_parser import ReasoningParser
|
||||
from sglang.srt.runtime_context import (
|
||||
get_context,
|
||||
get_platform,
|
||||
publish,
|
||||
)
|
||||
from sglang.srt.runtime_context import get_platform, publish
|
||||
from sglang.srt.speculative.decoupled_spec_io import DecoupledSpecIpcConfig
|
||||
from sglang.srt.utils.network import NetworkAddress, get_free_port, wait_port_available
|
||||
|
||||
@@ -210,8 +202,9 @@ class ServerArgs:
|
||||
A few arguments cannot use the annotation style and must be
|
||||
registered manually in ``add_cli_args``:
|
||||
|
||||
- **Deprecated flags** that redirect to another field via
|
||||
``DeprecatedAction`` / ``DeprecatedAliasStoreAction`` / etc.
|
||||
- **Deprecated flags** that redirect to another field via one of the
|
||||
``Deprecated*Action`` classes in ``arg_groups/argparse_actions.py``
|
||||
(that module's header says which shape fits which migration).
|
||||
- **Dynamic choices** computed at runtime (e.g. ``reasoning_parser``
|
||||
whose choices come from a plugin registry).
|
||||
- The ``--config`` meta-argument (not a dataclass field).
|
||||
@@ -434,175 +427,14 @@ class ServerArgs:
|
||||
)
|
||||
|
||||
# --- Deprecated argument registrations ---
|
||||
parser.add_argument(
|
||||
"--enable-expert-distribution-metrics",
|
||||
action=DeprecatedAction,
|
||||
error_message=(
|
||||
"--enable-expert-distribution-metrics is no longer supported. Use "
|
||||
"--expert-balancedness-report-mode with one of: off, server_log, "
|
||||
"prometheus, both."
|
||||
),
|
||||
help=(
|
||||
"Removed. Use --expert-balancedness-report-mode with one of: "
|
||||
"off, server_log, prometheus, both."
|
||||
),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--stream-output",
|
||||
action=DeprecatedStoreTrueAction,
|
||||
dest="incremental_streaming_output",
|
||||
new_flag="--incremental-streaming-output",
|
||||
help="[Deprecated] Use --incremental-streaming-output instead.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--prefill-round-robin-balance",
|
||||
action=DeprecatedAction,
|
||||
help="Note: --prefill-round-robin-balance is deprecated now.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--collect-tokens-histogram",
|
||||
action=DeprecatedAction,
|
||||
help="Deprecated. Token histograms are now automatically collected when --enable-metrics is set.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--nsa-prefill-backend",
|
||||
dest="dsa_prefill_backend",
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--dsa-prefill-backend",
|
||||
default=argparse.SUPPRESS,
|
||||
type=str,
|
||||
choices=[
|
||||
"flashmla_sparse",
|
||||
"flashmla_sparse_q8",
|
||||
"flashmla_kv",
|
||||
"flashmla_auto",
|
||||
"flashinfer_sparse_mla",
|
||||
"fa3",
|
||||
"tilelang",
|
||||
"aiter",
|
||||
"trtllm",
|
||||
],
|
||||
help="[Deprecated] Use --dsa-prefill-backend instead.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--nsa-decode-backend",
|
||||
dest="dsa_decode_backend",
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--dsa-decode-backend",
|
||||
default=argparse.SUPPRESS,
|
||||
type=str,
|
||||
choices=[
|
||||
"flashmla_sparse",
|
||||
"flashmla_sparse_q8",
|
||||
"flashmla_kv",
|
||||
"flashmla_auto",
|
||||
"flashinfer_sparse_mla",
|
||||
"fa3",
|
||||
"tilelang",
|
||||
"aiter",
|
||||
"trtllm",
|
||||
],
|
||||
help="[Deprecated] Use --dsa-decode-backend instead.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--speculative-dflash-draft-window-size",
|
||||
type=int,
|
||||
dest="speculative_draft_window_size",
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--speculative-draft-window-size",
|
||||
help=argparse.SUPPRESS,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--mamba-scheduler-strategy",
|
||||
dest="mamba_radix_cache_strategy",
|
||||
type=str,
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--mamba-radix-cache-strategy",
|
||||
default=ServerArgs.mamba_radix_cache_strategy,
|
||||
help="Deprecated alias for --mamba-radix-cache-strategy.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--cuda-graph-max-bs",
|
||||
type=int,
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--cuda-graph-max-bs-decode",
|
||||
dest="cuda_graph_max_bs_decode",
|
||||
help="Deprecated alias for --cuda-graph-max-bs-decode.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--cuda-graph-bs",
|
||||
type=int,
|
||||
nargs="+",
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--cuda-graph-bs-decode",
|
||||
dest="cuda_graph_bs_decode",
|
||||
help="Deprecated alias for --cuda-graph-bs-decode.",
|
||||
)
|
||||
# `disable_cuda_graph` is `no_cli=True`, so this deprecated spelling is
|
||||
# its only command-line entry point.
|
||||
parser.add_argument(
|
||||
"--disable-cuda-graph",
|
||||
action=DeprecatedStoreTrueAction,
|
||||
new_flag="--cuda-graph-backend-{decode,prefill}=disabled",
|
||||
help="Deprecated. Use --cuda-graph-backend-{decode,prefill}=disabled instead.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--enable-breakable-cuda-graph",
|
||||
action=DeprecatedStoreConstAction,
|
||||
dest="cuda_graph_backend_prefill",
|
||||
const_value=Backend.BREAKABLE,
|
||||
new_flag="--cuda-graph-backend-prefill=breakable",
|
||||
help="Deprecated alias for --cuda-graph-backend-prefill=breakable.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--disable-piecewise-cuda-graph",
|
||||
action=DeprecatedStoreConstAction,
|
||||
dest="cuda_graph_backend_prefill",
|
||||
const_value=Backend.DISABLED,
|
||||
new_flag="--cuda-graph-backend-prefill=disabled",
|
||||
help="Deprecated alias for --cuda-graph-backend-prefill=disabled.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--enforce-piecewise-cuda-graph",
|
||||
action=DeprecatedStoreConstAction,
|
||||
dest="cuda_graph_backend_prefill",
|
||||
const_value=Backend.TC_PIECEWISE,
|
||||
new_flag="--cuda-graph-backend-prefill=tc_piecewise",
|
||||
help="Deprecated alias for --cuda-graph-backend-prefill=tc_piecewise. "
|
||||
"Explicitly setting the prefill backend now skips the auto-disable "
|
||||
"cascade automatically.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--piecewise-cuda-graph-tokens",
|
||||
type=int,
|
||||
nargs="+",
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--cuda-graph-bs-prefill",
|
||||
dest="cuda_graph_bs_prefill",
|
||||
help="Deprecated alias for --cuda-graph-bs-prefill.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--piecewise-cuda-graph-compiler",
|
||||
type=str,
|
||||
choices=["eager", "inductor"],
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--cuda-graph-tc-compiler",
|
||||
dest="cuda_graph_tc_compiler",
|
||||
help="Deprecated alias for --cuda-graph-tc-compiler.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--piecewise-cuda-graph-max-tokens",
|
||||
type=int,
|
||||
action=DeprecatedAliasStoreAction,
|
||||
new_flag="--cuda-graph-max-bs-prefill",
|
||||
dest="cuda_graph_max_bs_prefill",
|
||||
help="Deprecated alias for --cuda-graph-max-bs-prefill.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--enable-gdn-replayssm-spec",
|
||||
dest="enable_linear_replayssm_spec",
|
||||
action=DeprecatedStoreTrueAction,
|
||||
new_flag="--enable-linear-replayssm-spec",
|
||||
help="[Deprecated] Use --enable-linear-replayssm-spec instead.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--enable-flashinfer-allreduce-fusion",
|
||||
action="store_true",
|
||||
@@ -648,6 +480,11 @@ class ServerArgs:
|
||||
# the record exists to remember, and the decision it meant to record
|
||||
# belongs in the stash, where it carries a source and does not destroy
|
||||
# the input it was derived from.
|
||||
# Underscore names are mostly the record's own bookkeeping --
|
||||
# `_input_frozen`, `_raw_input`, `_resolved_overrides`, the memo slots
|
||||
# -- which resolution writes on purpose. A *field* spelled that way is
|
||||
# still configuration, so the test cannot be on spelling alone or that
|
||||
# one leaf stays writable on a read-only record.
|
||||
if not name.startswith("_") or name in _underscore_field_names():
|
||||
if getattr(self, "_input_frozen", False):
|
||||
raise AttributeError(
|
||||
@@ -770,11 +607,6 @@ def m3_fp8_attn_gemm_enabled(args) -> bool:
|
||||
)
|
||||
|
||||
|
||||
# NOTE: The process-wide ServerArgs is owned by the runtime context
|
||||
# (sglang.srt.runtime_context). The two functions below are LEGACY shims kept
|
||||
# for the existing call-sites; they publish/read the same live object by
|
||||
# reference. Do not add new call-sites.
|
||||
# Imports are in-function so the two modules stay cycle-free at import time.
|
||||
@functools.lru_cache(maxsize=1)
|
||||
def _underscore_field_names() -> frozenset:
|
||||
"""Real dataclass fields whose names start with an underscore.
|
||||
@@ -792,6 +624,12 @@ def _underscore_field_names() -> frozenset:
|
||||
)
|
||||
|
||||
|
||||
# NOTE: The process-wide ServerArgs is owned by the runtime context
|
||||
# (sglang.srt.runtime_context). The two publish functions below are LEGACY
|
||||
# shims kept for the existing call-sites; they hand over the same live object
|
||||
# by reference. Do not add new call-sites. The third function is retired and
|
||||
# only raises.
|
||||
# Imports are in-function so the two modules stay cycle-free at import time.
|
||||
def set_global_server_args_for_scheduler(server_args: ServerArgs):
|
||||
"""Legacy publish shim (role=scheduler) — prefer
|
||||
``runtime_context.publish(server_args, role=...)`` in new code."""
|
||||
@@ -806,11 +644,23 @@ def set_global_server_args_for_tokenizer(server_args: ServerArgs):
|
||||
publish(server_args, role="tokenizer")
|
||||
|
||||
|
||||
def get_global_server_args() -> ServerArgs:
|
||||
"""Legacy accessor shim — prefer ``get_server_args()`` from
|
||||
``sglang.srt.runtime_context`` in new code."""
|
||||
def get_global_server_args() -> NoReturn:
|
||||
"""Retired. It raises, because what it used to return is the problem: the
|
||||
record answers with the operator's *input*, so a caller reading a field
|
||||
resolution decided got a stale value and no error.
|
||||
|
||||
return get_context().server_args
|
||||
The name survives so that a caller importing it from this module lands on
|
||||
a message instead of an ImportError. Annotated ``NoReturn`` so a type
|
||||
checker rejects the call rather than accepting the attribute access after
|
||||
it. The message lives once, in the exception.
|
||||
"""
|
||||
raise RuntimeError(
|
||||
"get_global_server_args() is retired. Read the value that is in effect "
|
||||
"from its namespace bag -- `get_exec().kernel.attention_backend`, "
|
||||
"`get_schedule().max_running_requests`, and so on "
|
||||
"(sglang.srt.runtime_context). For the operator's raw input, which is a "
|
||||
"different question, `get_server_args()` still answers it."
|
||||
)
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
@@ -25,7 +25,7 @@ class TestNPULoggingBase(CustomTestCase):
|
||||
[Test Target] --log-requests; --log-requests-level; --log-requests-target; --uvicorn-access-log-exclude-prefixes;
|
||||
--enable-metrics; --enable-metrics-for-all-scheduler;
|
||||
--bucket-time-to-first-token; --bucket-inter-token-latency; --bucket-e2e-request-latency;
|
||||
--collect-tokens-histogram; --prompt-tokens-buckets; --generation-tokens-buckets;
|
||||
--prompt-tokens-buckets; --generation-tokens-buckets;
|
||||
--tokenizer-metrics-custom-labels-header; --tokenizer-metrics-allowed-custom-labels;
|
||||
--gc-warning-threshold-secs
|
||||
"""
|
||||
|
||||
@@ -34,7 +34,7 @@ KV_CANARY_ARGS: List[str] = [
|
||||
"partial",
|
||||
"--kv-canary-sweep-interval",
|
||||
"100",
|
||||
"--disable-piecewise-cuda-graph",
|
||||
"--cuda-graph-backend-prefill=disabled",
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ def build_canary_server_args(
|
||||
args = [
|
||||
"--kv-canary",
|
||||
kv_canary_mode.value,
|
||||
"--disable-piecewise-cuda-graph",
|
||||
"--cuda-graph-backend-prefill=disabled",
|
||||
"--context-length",
|
||||
"16384",
|
||||
*extra_server_args,
|
||||
|
||||
@@ -21,7 +21,7 @@ _MOCK_MODEL_SERVER_ARGS_NO_CANARY: list[str] = [
|
||||
"dummy",
|
||||
"--sampling-backend",
|
||||
"token_oracle",
|
||||
"--disable-piecewise-cuda-graph",
|
||||
"--cuda-graph-backend-prefill=disabled",
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ runtime:
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; MTP runs at 7,000,000 (the validated value,
|
||||
# well under the ceiling and below every MTP leg's natural pool).
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -69,7 +69,7 @@ runtime:
|
||||
# region over 4 GiB and mori registers each KV buffer as one region
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; 16,000,000 leaves headroom.
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -70,7 +70,7 @@ runtime:
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; MTP runs at 7,000,000 (the validated value,
|
||||
# well under the ceiling and below every MTP leg's natural pool).
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -69,7 +69,7 @@ runtime:
|
||||
# region over 4 GiB and mori registers each KV buffer as one region
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; 16,000,000 leaves headroom.
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -61,7 +61,7 @@ runtime:
|
||||
decode_max_running_requests: 1024
|
||||
common_extra_flags: "--moe-dense-tp-size 1 --enable-dp-lm-head --decode-log-interval 100 --watchdog-timeout 3600 --load-balance-method round_robin --dist-timeout 3600"
|
||||
prefill_extra_flags: "--context-length 9217 --max-total-tokens 262144"
|
||||
decode_extra_flags: "--disable-cuda-graph --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--disable-cuda-graph"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -61,7 +61,7 @@ runtime:
|
||||
decode_max_running_requests: 1024
|
||||
common_extra_flags: "--moe-dense-tp-size 1 --enable-dp-lm-head --decode-log-interval 100 --watchdog-timeout 3600 --load-balance-method round_robin --dist-timeout 3600"
|
||||
prefill_extra_flags: "--context-length 9217 --max-total-tokens 262144"
|
||||
decode_extra_flags: "--disable-cuda-graph --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--disable-cuda-graph"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -70,7 +70,7 @@ runtime:
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; MTP runs at 7,000,000 (the validated value,
|
||||
# well under the ceiling and below every MTP leg's natural pool).
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -69,7 +69,7 @@ runtime:
|
||||
# region over 4 GiB and mori registers each KV buffer as one region
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; 16,000,000 leaves headroom.
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -70,7 +70,7 @@ runtime:
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; MTP runs at 7,000,000 (the validated value,
|
||||
# well under the ceiling and below every MTP leg's natural pool).
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 7000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -69,7 +69,7 @@ runtime:
|
||||
# region over 4 GiB and mori registers each KV buffer as one region
|
||||
# (no chunking). Largest buffer = max_total_num_tokens * 256 B, so the
|
||||
# ceiling is 16,777,216 tokens; 16,000,000 leaves headroom.
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--max-total-tokens 16000000 --cuda-graph-bs-decode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -84,7 +84,7 @@ runtime:
|
||||
decode_max_running_requests: 1024
|
||||
common_extra_flags: "--moe-dense-tp-size 1 --enable-dp-lm-head --decode-log-interval 100 --watchdog-timeout 3600 --load-balance-method round_robin"
|
||||
prefill_extra_flags: "--context-length 9217 --max-total-tokens 262144"
|
||||
decode_extra_flags: "--disable-cuda-graph --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--disable-cuda-graph"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -84,7 +84,7 @@ runtime:
|
||||
decode_max_running_requests: 1024
|
||||
common_extra_flags: "--moe-dense-tp-size 1 --enable-dp-lm-head --decode-log-interval 100 --watchdog-timeout 3600 --load-balance-method round_robin"
|
||||
prefill_extra_flags: "--context-length 9217 --max-total-tokens 262144"
|
||||
decode_extra_flags: "--disable-cuda-graph --prefill-round-robin-balance"
|
||||
decode_extra_flags: "--disable-cuda-graph"
|
||||
prefill_extra_env:
|
||||
MORI_MAX_DISPATCH_TOKENS_PREFILL: 8192
|
||||
MORI_MAX_DISPATCH_TOKENS_DECODE: 256
|
||||
|
||||
@@ -188,7 +188,7 @@ def main(args, server_args):
|
||||
|
||||
other_args.extend(
|
||||
[
|
||||
"--cuda-graph-max-bs",
|
||||
"--cuda-graph-max-bs-decode",
|
||||
batch_size,
|
||||
"--mem-fraction-static",
|
||||
server_args.mem_fraction_static,
|
||||
|
||||
@@ -31,4 +31,4 @@ response = requests.post(
|
||||
print(response.json())
|
||||
|
||||
|
||||
# python3 -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --trust-remote-code --disaggregation-mode prefill --tp 2 --disaggregation-ib-device mlx5_roce0,mlx5_roce1 --speculative-algorithm EAGLE --speculative-draft-model-path lmsys/sglang-EAGLE-llama2-chat-7B --speculative-num-steps 3 --speculative-eagle-topk 4 --speculative-num-draft-tokens 16 --cuda-graph-max-bs 8 --host 127.0.0.1 --port 8100
|
||||
# python3 -m sglang.launch_server --model-path meta-llama/Llama-2-7b-chat-hf --trust-remote-code --disaggregation-mode prefill --tp 2 --disaggregation-ib-device mlx5_roce0,mlx5_roce1 --speculative-algorithm EAGLE --speculative-draft-model-path lmsys/sglang-EAGLE-llama2-chat-7B --speculative-num-steps 3 --speculative-eagle-topk 4 --speculative-num-draft-tokens 16 --cuda-graph-max-bs-decode 8 --host 127.0.0.1 --port 8100
|
||||
|
||||
@@ -21,7 +21,7 @@ class TestQwen35FP4(CustomTestCase):
|
||||
"4",
|
||||
"--chunked-prefill-size",
|
||||
"2048",
|
||||
"--mamba-scheduler-strategy",
|
||||
"--mamba-radix-cache-strategy",
|
||||
"extra_buffer",
|
||||
"--mamba-track-interval",
|
||||
"128",
|
||||
|
||||
@@ -37,7 +37,7 @@ class TestQwen35FP4(CustomTestCase):
|
||||
"4",
|
||||
"--chunked-prefill-size",
|
||||
"2048",
|
||||
"--mamba-scheduler-strategy",
|
||||
"--mamba-radix-cache-strategy",
|
||||
"extra_buffer",
|
||||
"--mamba-track-interval",
|
||||
"128",
|
||||
@@ -103,7 +103,7 @@ class TestQwen35FP4MTP(ReasoningTokenUsageMixin, CustomTestCase):
|
||||
"4",
|
||||
"--chunked-prefill-size",
|
||||
"2048",
|
||||
"--mamba-scheduler-strategy",
|
||||
"--mamba-radix-cache-strategy",
|
||||
"extra_buffer",
|
||||
"--mamba-track-interval",
|
||||
"128",
|
||||
|
||||
@@ -20,7 +20,7 @@ class TestQwen3Next(
|
||||
"4",
|
||||
"--chunked-prefill-size",
|
||||
"1024",
|
||||
"--mamba-scheduler-strategy",
|
||||
"--mamba-radix-cache-strategy",
|
||||
"extra_buffer",
|
||||
"--mamba-track-interval",
|
||||
"2",
|
||||
@@ -45,7 +45,7 @@ class TestQwen3NextLazyExtraBuffer(
|
||||
"4",
|
||||
"--chunked-prefill-size",
|
||||
"1024",
|
||||
"--mamba-scheduler-strategy",
|
||||
"--mamba-radix-cache-strategy",
|
||||
"extra_buffer_lazy",
|
||||
"--mamba-track-interval",
|
||||
"2",
|
||||
|
||||
@@ -34,7 +34,7 @@ class TestQwen3NextMTP(GSM8KMixin, KLDivergenceMixin, DefaultServerBase):
|
||||
"4",
|
||||
"--chunked-prefill-size",
|
||||
"2048",
|
||||
"--mamba-scheduler-strategy",
|
||||
"--mamba-radix-cache-strategy",
|
||||
"no_buffer",
|
||||
"--disable-radix-cache",
|
||||
]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user