Commit Graph
12396 Commits
Author SHA1 Message Date
Cheng Wan 45c24444b1 [Config] Round 6.1: "unset" gets its own spelling, and the declaration says what it means (#38046)
First of five. The stack continues a series that moved configuration out of
`ServerArgs` and into the runtime context's namespace bags. This one fixes
something that was actually broken, and gives the fix its other half.

## "Unset" gets its own spelling on two ratio fields

`swa_full_tokens_ratio` and `mamba_full_memory_ratio` carried real values as
their class defaults (0.8, 0.9), so a model family with an opinion had to ask
"is this field still equal to the class default?" to find out whether the
operator had set it. That question has two wrong answers: it says "the operator
set it" as soon as any earlier pass declares the field, and it says "the
operator did not set it" when the operator types the default value.

Both become `Optional[float] = None`. The record carries what the operator typed
and nothing else, and the family test becomes `is None`.

`mamba_radix_cache_strategy` keeps `"auto"`: unlike the ratios it already has a
spelling for "unset" that an operator can type and that means exactly that --
only its comparison changes, from the class default to the token itself, which
is the fix the comment at that site already prescribed. With that, neither
family module imports `ServerArgs` any more.

## And the declaration says what the field means when nobody answers

Making the default `None` leaves a hole: something has to supply the generic
value. `Arg(fallback=...)` supplies it from the declaration.

```python
swa_full_tokens_ratio: A[
    Optional[float],
    Arg(help="...", resolvable=True, fallback=0.8),
    NS("schedule"),
] = None
```

The dataclass default stays `None`. A fallback is not a default: the record is
the wire format, and a child process has to keep being able to tell "unset" from
"set to the value resolution would have picked anyway".

### Which surface it lives on is the whole design

Precedence becomes **override -> decision -> input -> fallback**, applied in
`resolution_result` -- which the projection, `/server_info` and every config bag
read through.

Deliberately **not** in `resolving_view` / `resolved_view`. Those are the
decision-over-input surface a pass reads *while it is deciding*, and two model
families branch on exactly this:

```python
# model_overrides/inkling.py, and the same shape in deepseek_v4.py
if cfg.swa_full_tokens_ratio is None:
    overrides["swa_full_tokens_ratio"] = 0.1
```

A fallback answering there is not "the generic value, later" -- a `__getattr__`
layer is read-time, so there is no later. Every read during resolution would
already get 0.8 and the branch would never fire. Running `_inkling_overrides`
against both versions:

```
--- fallback on the effective surface only (this PR) ---
  cfg.swa_full_tokens_ratio during resolution = None
  family declared swa = 0.1   mamba = 0.1
--- fallback also on the view a pass reads ---
  cfg.swa_full_tokens_ratio during resolution = 0.8
  family declared swa = None  mamba = None      <- the key never lands
```

So "resolution first, then the fallback" holds -- not because a step is appended
to the pipeline, but because of which surface the value lives on. Exactly one
reader consults the effective surface during resolution: the range check on the
ratio, which wants the value the pools will be sized against. It asks
`resolution_result` directly -- what its comment already claimed it was doing --
and it runs after the model families.

### The alternative, and why not

A pass that fills the field in when nothing claimed it needs a slot (after the
families, or it beats them), a second call site (the dummy-model short circuit
returns long before that slot), an idempotence requirement so the second call is
harmless, and the value written twice -- once as a literal, once as prose in the
help (`"Unset means 0.8"`). An earlier revision of this series did exactly that
and deleted it four PRs later. A declaration needs none of it, and `pipeline.py`
is untouched by the whole series as a result.

### What may be declared this way, and what may not

Across every hook, `if x is None: x = ...` appears at **55 sites over 29
fields**. They are not one thing:

| | count | examples | declarable |
|---|---|---|---|
| unconditional constant | 5 | the two ratios, `grammar_backend="xgrammar"`, `mm_process_config={}`, `custom_weight_loader=[]` | **yes** |
| unconditional, computed from another field | 4 | `tokenizer_path=model_path`, `device=get_device()`, `served_model_name`, `speculative_draft_model_quantization` | needs a `fallback="dotted.path"` form; not here |
| **conditional decision** | ~20 | `chunked_prefill_size` across seven memory tiers, `max_bs` across eight, `max_running_requests` at 48 or 256 by model family | **no, and it should not be** |

Only a value fixed for the life of the configuration belongs in a declaration.
One that depends on the machine, on another field, or on anything impure
(`random_seed = random.randint(...)`) is a decision, and decisions stay in a hook
where their order is visible. This PR converts the two ratios only.

## Verification

- `resolve_once` ends with the same effective values: the resolution result is
  identical across 24 launch shapes x 489 fields except for the two intended
  ratio changes. Separately, 16 launch shapes resolved on both sides, real model
  and dummy: 7,904 field readings, and the only difference is `random_seed`, a
  fresh `random.randint` per process.
- The CLI registers the same 507 options with the same choices and actions; only
  the two defaults move.
- `test_declared_fallbacks.py`, 17 cases. One pins the inverse of the dead branch
  above: what a pass sees while deciding is still `None`.
- The whole series was swept over all 648 registered unit-test files against its
  merge-base: 19 failures on both sides, the same 19, none of them config.


---
### CI States

Latest PR Test (Base): <!-- slot:pr-test:start --> [Run #34083705463](https://github.com/sgl-project/sglang/actions/runs/34083705463)<!-- slot:pr-test:end -->
Latest PR Test (Extra): <!-- slot:pr-test-extra:start --> [Run #34083705284](https://github.com/sgl-project/sglang/actions/runs/34083705284)<!-- slot:pr-test-extra:end -->
Latest PR Test (AMD ROCm 7.2): <!-- slot:pr-test-amd-rocm720:start --> [Run #34083705383](https://github.com/sgl-project/sglang/actions/runs/34083705383)<!-- slot:pr-test-amd-rocm720:end -->
<!-- pr-states:end -->
2026-09-06 21:38:29 -07:00
a8b2f36dee [kernel] add fused silu mul quant fp8 (#37376)
Co-authored-by: undefined <zhouchen.arrebol@jd.com>
Co-authored-by: xq25478 <xq25478@qq.com>
Co-authored-by: xieminghe.simon <xieminghe.simon@jd.com>
Co-authored-by: Xiaoyu Zhang <1182563586@qq.com>
2026-09-07 11:39:11 +08:00
Shuwen Wang 6e312af8c2 fix: collect prefix hash values iteratively (#38204) 2026-09-07 11:10:32 +08:00
Shuwen Wang f25848913d fix: preserve SWA host lock on node split (#38138) 2026-09-07 11:04:22 +08:00
Siju Samuel c8207e32b6 [Intel][XPU] Add NUMA node binding support for Intel XPU (#31113) 2026-09-07 10:39:21 +08:00
Chunyuan WU 1c992bbd94 [CPU] Fix shm allreduce collision and sglang-router import (#37179) 2026-09-07 10:28:19 +08:00
214313ee79 Fuse Nemotron latent MoE projection and shared add (#30430)
Co-authored-by: Po-Han Huang (NVIDIA) <53919306+nvpohanh@users.noreply.github.com>
Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
Co-authored-by: Mohammad Miadh Angkad <176301910+mmangkad@users.noreply.github.com>
2026-09-07 10:26:19 +08:00
billishyahao 1d5d85260c [AMD] support qlen>1 for aiter gluon path for Kimi K3 (#37601) 2026-09-06 19:25:58 -07:00
Mick ff08bcdda9 [diffusion] UX: quiet internal warmup frame searches (#38226) 2026-09-07 09:49:13 +08:00
Cheng Wan e3140fb9d4 [diffusion] CI: rebalance 2-gpu shards and cut the job timeout to 45m (#38239) 2026-09-07 09:39:03 +08:00
Mick b83f1bdd21 [diffusion] fix: stabilize H3 reference audio across repeated requests (#38225) 2026-09-07 09:32:57 +08:00
ashwini rathi 0afba909e7 [XPU][CI] Fix empty nightly dashboard (#37800) 2026-09-07 09:29:51 +08:00
c4e52a1051 XPU: Enable GLM5.1 (GlmMoeDsaForCausalLM) DSA Attention (#24959)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
2026-09-07 09:24:45 +08:00
39a80354aa [MUSA] Add installation guide and Dockerfile (#36709)
Co-authored-by: zhiguo.qin <zhiguo.qin@mthreads.com>
Co-authored-by: Kangyan-Zhou <zky314343421@gmail.com>
2026-09-06 20:13:53 -05:00
Yuxingwang-intelandMa Mingfei 707da81e84 [CPU] Add native CPU kernel for MurmurHash32 (#35604)
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com>
2026-09-07 09:10:35 +08:00
faceless voidandgithub-actions[bot] 30d0eb2ca9 [NPU] Adapt DFlash2 speculative decoding to Ascend NPUs (#35629)
Signed-off-by: syd520zy <529477025@qq.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-09-07 09:08:39 +08:00
15aa2fb843 [ROCm] Take the fused DSA metadata kernels and drop redundant work from the absorb path (#37124)
Co-authored-by: yanyuan.qin <yanyuan.qin@amd.com>
Co-authored-by: Zhang, Jiejing <jiejing.zhang@amd.com>
Co-authored-by: Thomas Wang <thomawan@amd.com>
Co-authored-by: HAI <hixiao@gmail.com>
2026-09-06 17:39:37 -07:00
Brayden ZhongandBrayden Zhong 30705c004c [Deepseek V4] Keep fp32 routing weights in the mxfp4 trtllm MoE (#33608)
Co-authored-by: Brayden Zhong <brayden@radixark.ai>
2026-09-07 00:12:55 +00:00
AMD-yanfeiwang 2e8c03e2c7 Fix inflated row pitch when a CP round-robin shard has a single row (#34142) 2026-09-06 15:40:14 -07:00
JohnQinAMD 2c05ed4e77 [ROCm] Stage large pageable H2D copies instead of pinning them in place (#37720) 2026-09-06 12:28:58 -07:00
31d28a2961 [NPU] Fix failed test cases in pr‑test‑npu and improve execution efficiency (#38112)
Co-authored-by: Even Zhou <even.y.zhou@outlook.com>
Co-authored-by: sglang-npu-bot <sglangnpu@163.com>
2026-09-07 01:48:27 +08:00
s 28457f0dca fix(gpt-oss): avoid duplicate MoE reduction with DP attention (#37199) 2026-09-07 00:33:04 +08:00
Mick f3d05644db [diffusion] docs+skill: document which components to stream under layerwise offload (#35674) 2026-09-06 23:12:36 +08:00
Xiaoyu Zhang be00a543a7 perf: use Gumbel-max trick in the main sampler to cut decode CPU dispatch (#38117) 2026-09-06 22:40:27 +08:00
MickandClaude Fable 5.1 a176ba2f7b [diffusion] feat: measure warmup memory and layer usage per phase for residency calibration (1/4) (#37916)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 19:42:42 +08:00
Mick 938dc5621d [diffusion] refactor: reuse plain state-dict loading without per-model classes (#38127) 2026-09-06 18:39:21 +08:00
+2 97c6978369 GLM-5.3-Flash support (#36507)
Co-authored-by: zRzRzRzRzRzRzR <Yuxuan.Zhang2@liverpool.ac.uk>
Co-authored-by: Shijin Zhang <75300765+Dovis01@users.noreply.github.com>
Co-authored-by: zanes-ops <zanes@nvidia.com>
Co-authored-by: Baizhou Zhang <sobereddiezhang@gmail.com>
Co-authored-by: Jian Chen <jianchen0311@gmail.com>
Co-authored-by: zijiexia <37504505+zijiexia@users.noreply.github.com>
Co-authored-by: andyluo7 <43718156+andyluo7@users.noreply.github.com>
Co-authored-by: Ehsan Akhgari <ehsan.akhgari@gmail.com>
Co-authored-by: kpham-sgl <khoa.pham@radixark.ai>
Co-authored-by: BBuf <1182563586@qq.com>
Co-authored-by: Raiden Makoto <81530826+Raiden-Makoto@users.noreply.github.com>
2026-09-06 02:27:59 -07:00
Mick a9944aec01 [diffusion] CI: guard the allocated vram peak with reporting the reserved one (#38172) 2026-09-06 17:22:16 +08:00
Mickandmickqian 8ef646a5c6 fix(vlm): contain EPD request lifecycle failures (#36944)
Co-authored-by: mickqian <mickqian@users.noreply.github.com>
2026-09-06 16:05:10 +08:00
Vincent Gao ae54ccb25d [Router] Publish cache-aware load state (#38139) 2026-09-06 15:22:25 +08:00
Zhang, Jiejing 6cee9285a3 [ROCm] Make DSA indexer top-k exact with cooperative selection (#37591) 2026-09-05 23:55:56 -07:00
Mick e3f7097591 [diffusion] refactor: consolidate plain state-dict component loaders (#38128) 2026-09-06 13:52:54 +08:00
Depend 67e3ccda97 [diffusion] fix: restore non-layer placeholders before releasing host copies (#38171) 2026-09-06 13:41:30 +08:00
Mick febb360519 [VLM] retire aborted disaggregated prefill results (#36988) 2026-09-06 10:15:33 +08:00
Liangsheng Yin f5819b09bf Revert "[AMD][DSV4] Fix unified-KV pool sizing and SWA ring accounting" (#38163) 2026-09-05 17:28:46 -07:00
Mohammad Miadh AngkadandMohammad Angkad 09daea94ac Support NoPE layers in the tokenspeed_mla FP8 prefill hook (#38152)
Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai>
2026-09-05 16:51:04 -07:00
yuttian1 514b45fd34 [AMD][DSV4] Fix unified-KV pool sizing and SWA ring accounting (#30315) 2026-09-05 16:39:40 -07:00
Alex NailsandClaude Opus 5 6a0c55fd6c [CI] Pin the Rust TreeCore build to the resolved libtorch instead of interpreter discovery (#37696)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-05 15:30:32 -07:00
77aee20259 [Model] Add support for Nanbeige4.2 (#32151)
Co-authored-by: root <lizongqiang@kanzhun.com>
Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
2026-09-06 03:57:27 +08:00
Xiaoyu ZhangandWaterpine ccf9fe6590 [Kernel] Add KDA FP8 skinny GEMM for SM120 (#38082)
Co-authored-by: Waterpine <biansonghz@gmail.com>
2026-09-05 22:27:06 +08:00
Xiaoyu Zhang dc2843801d perf(lfm2): fuse gating and short convolution on SM90 (#37622) 2026-09-05 21:52:16 +08:00
Beihao Zhou 1e6f18bfeb [MoE Refactor] Migrate SM100 trtllm-gen mxfp4 MoE onto MoeRunner (#32405) 2026-09-05 13:48:10 +00:00
Xiaoyu Zhang eda10c3678 [Diffusion] Enable breakable CUDA graph for JoyEcho (#38110) 2026-09-05 21:45:53 +08:00
Mick 5df60a21cd fix(vlm): harden EPD receiver validation and liveness (#36945) 2026-09-05 21:22:37 +08:00
Mick a18106bbc3 fix(vlm): make EPD cache publication transactional (#36949) 2026-09-05 20:33:23 +08:00
bd16c22a04 [diffusion] fuse LingBot MoE group-limited top-k index selection (#38044)
Co-authored-by: BBuf <bbuf@users.noreply.github.com>
Co-authored-by: Mick Qian <mickqian@users.noreply.github.com>
2026-09-05 18:12:30 +08:00
DayuxiaoshuiandXiaoyu Zhang 50c1bf0db0 [Diffusion] Port the Wan VAE decoder fast paths to the Qwen-Image VAE (#38020)
Co-authored-by: Xiaoyu Zhang <1182563586@qq.com>
2026-09-05 18:02:33 +08:00
hhhh1252023 0948e6ebed [CI] Remove metrics artifact mechanism from nightly NPU workflows (#35489) 2026-09-05 17:16:52 +08:00
Xiaoyu ZhangandBBuf d49180019b fix(moe): cast filtered-activation expert_ids to int32 for torch.compile (#38085)
Co-authored-by: BBuf <bbuf@users.noreply.github.com>
2026-09-05 17:13:07 +08:00
Xiaoyu Zhang a74470e904 fix(mamba): unify causal_conv1d col* dtype to x (MiniCPM-V-4.6 GDN prefill bf16/fp16 mismatch) (#38039) 2026-09-05 17:08:20 +08:00