Commit Graph
54 Commits
Author SHA1 Message Date
f8f2870a84 Profiling Enhancements [1/3]: cuda graph profile traces (#24370)
Co-authored-by: Basit <mohbasit@ctr2-alola-ctrl-01.amd.com>
Co-authored-by: HAI <hixiao@gmail.com>
2026-08-06 03:19:35 -07:00
Cheng Wan 4ea227fa91 config: the draft runner carries its own attention backend
`build_draft_tp_worker` built a `ServerArgs` variant whose only job was to make
four config reads answer with the draft's backend instead of the target's, and
published it for the duration of the build so the bags agreed. The backend is a
per-runner fact — target and draft coexist in one process — so it moves onto the
runner, and the variant and the construction-time publish both go away.

`ModelRunner` takes `draft_attention_backend` and resolves the runner's effective
value once (`resolve_draft_attention_backend`: the algorithm's resolved backend,
else `--speculative-draft-attention-backend`, else None for a target runner);
`TpModelWorker` threads it to both runner constructions.
`resolve_attention_backend_strs` reads it off the runner, and `ModelRunner`
stamps the resolved pair *before* building backends so a backend can read it
while it constructs — which is what the FlashInfer KV-access check needs now that
it no longer asks the config. `configure_kv_cache_dtype` and the draft backend
factory read the runner too.

One latent bug falls out: the non-hybrid branch of the backend build ignored the
resolved pair and re-read `server_args.attention_backend`, which is why the
variant had to set that field as well as the split pair. It now uses the value
that was resolved for the runner.

`draft_server_args_overrides` and the `preserve_config()` publish switch are
deleted; with them goes the last production `ServerArgs.derive` outside
pre-publish config building, and the last construction-time publish. The
chunked-prefix gate the target resolved simply stays in the bags, since nothing
re-projects them.
2026-08-05 19:32:24 -07:00
Cheng Wan 64eeb153df config: resolve the draft worker's config per runner, not on a copy
The v2 spec workers got a published `ServerArgs` copy carrying two values: the
target's context length and `--speculative-draft-load-format`. Neither is a
process-wide config change — each is consumed by exactly one constructor — so
the copy, the publish switch around the draft build, and the replay of the
target's resolved overrides onto it all go away, and the values travel to the
runner that owns them:

- **Context length.** `TpModelWorker` already takes it (`context_length=None`
  keeps `server_args.context_length`); the four v2 draft workers and
  `build_draft_tp_worker` pass the target's, which every one of them has in
  scope as `target_worker` / `target_model_config`.
- **Load format.** `ModelRunner._draft_load_format()` resolves it for a draft
  runner and `build_load_config` takes it, so the `LoadConfig` is per-runner.
  Model code also reads it off the bag while it builds — Inkling replaces
  per-element noise in its shared-expert scales under dummy loading — so the
  load is wrapped in a scoped bag override that puts the target's value back.
- `skip_tokenizer_init` was on the copy for nobody: `TpModelWorker` already
  short-circuits the tokenizer for a draft worker (`or self.is_draft_worker`).

`PrefillCudaGraphRunner._max_addressable_prefix_len` capped the prefix by
`server_args.context_length`, which the copy used to carry for the draft; it now
reads the runner's own `model_config.context_len`. That is also more accurate for
the target, whose `--context-length` may be unset while the resolved context is
shorter than the token table.

What stays a variant is the dflash/dspark path's attention backend: backend
selection reads it off the config object the draft runner holds, and the
resolved gate has to survive the variant's publish. `draft_server_args_overrides`
now carries only those fields and says why.
2026-08-05 19:31:23 -07:00
Jialin Ouyang 717a559f02 [Scheduler] Align WAR fences with CUDA graph metadata reads (#33587) 2026-08-05 13:52:20 -07:00
Lianmin Zheng b0fd31ba07 Multiple flexibility fixes for DP attention (#33537) 2026-08-04 15:40:40 -07:00
Lianmin Zheng 4794b401d5 [Observability] Add startup, memory, and hybrid SWA diagnostics (#33375) 2026-08-04 12:50:09 -07:00
Lianmin ZhengandItai Gat dea2be5ae3 [CUDA Graph] Allow custom decode graph runners (#33553)
Co-authored-by: Itai Gat <itaigat.mail@gmail.com>
2026-08-04 12:48:56 -07:00
Tao Liandlitao.dream a0b7bcf592 [Feature] Support return_hidden_states="last" (#30177)
Co-authored-by: litao.dream <litao.dream@bytedance.com>
2026-08-02 15:09:33 +08:00
Cheng Wan 9b44695713 test: recover the config-namespace-migration deferrals (#33171)
The module-skipped tests injected config by faking get_server_args (a
SimpleNamespace stand-in patched onto the module) or by writing fields
onto a ServerArgs instance post-publish — both invisible to the namespace
accessors the production code now reads. Re-enable them by publishing the
config they need (get_context().override_server_args seeding, scoped per
test), asserting bag state where the old assertions checked instance
write-through (declare_load_time_override is bag-only), and extending the
per-runner stubs the code genuinely reads (kv_cache_dtype_str,
max_total_tokens, context_len).

The unified-radix-cache file (which grew a large hicache/insert-walk suite
while skipped) is recovered in the same change:

- test_cache_finished_req_strips_thinking (19 parametrized classes) wrote
  strip_thinking_cache onto the ServerArgs instance; the cache reads
  get_serving().strip_thinking_cache — use the serving bag's scoped
  override.
- test_shallower_crossing_backs_up_above_backuped_middle staged its
  broken-backup-continuity setup through insert_host, which now
  deliberately drops refills below an un-backed-up node under
  write-through (host_insert_dropped). Build the same tree state through
  an explicit backup + device eviction.

Every config-namespace-migration deferral is recovered, so the deferral
ratchet (test_migration_deferral_ratchet.py) has done its job and is
retired.
2026-08-01 08:59:27 -07:00
Cheng Wan df55e911d6 Fix the chunked-prefix-cache gate writing config the backends never read (#33168)
The load-time gate (maybe_disable_chunked_prefix_cache) wrote its
ServerArgs instance while every reader has moved to the published
config: the attention backends assert / branch on
get_schedule().disable_chunked_prefix_cache when they initialize, so the
flip never reached them and a backend outside
CHUNKED_PREFIX_CACHE_SUPPORTED_ATTENTION_BACKENDS kept chunked prefix
enabled.

Reroute the writer through get_context().override (which writes the
published bags) and flip the two remaining instance reads — the gate's
own log check and the prefill cuda-graph runner's capture flag — to the
bag. A regression test pins the three contracts: the gate lands on the
bag, the pristine ServerArgs instance stays untouched, and the
draft-worker guard never writes.

The ServerArgs.override call-site ratchet drops 39 -> 38.
2026-08-01 08:57:28 -07:00
Yuwei AnandClaude Fable 5 3e0f7c3f30 [BCG][3/N] Enable bcg on dsa & deepep a2a backend (#31987)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 16:45:18 -07:00
Peng Wu e3d4f48e55 [Fix] missing max_context_len on HybridAttnBackend (#32690) 2026-07-31 19:43:09 +08:00
Xiaoyu Zhang c9947b087b Enable multimodal prefill BCG for VL and audio models (#30872) 2026-07-29 06:47:40 +08:00
Void 7f438a6031 feat: SM120 (Blackwell Desktop) support for GLM-5.1 inference (#26928) 2026-07-28 14:52:34 -07:00
paulzhang-tmandClaude Fable 5 4e5a05148a [FullCG] Support chunked cached-prefix prefill (#30825)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 11:20:25 -07:00
Ethan (Yusheng) Su ee1736f39a [LoRA] Support LoRA under the breakable/full prefill CUDA graph (#30988) 2026-07-26 22:10:03 -07:00
DAI0818andybyang 2abb1d2c37 fix(hisparse): correct DSA KV memory budget (#31992)
Co-authored-by: ybyang <ybyang7@iflytek.com>
2026-07-27 11:19:32 +08:00
Yuzhen Zhou b954e9cf3d [6/6][kimi-deterministic] Use deterministic seeded coins for EAGLE rejection sampling (#30822) 2026-07-24 02:11:21 -07:00
Mohammad Miadh Angkad 0bdd4730af [CI] Fix failures on main (#32091) 2026-07-23 00:11:25 +08:00
Cheng Wan e1479cc966 config: route runtime config adjustments through the namespace bags (#31812) 2026-07-22 01:17:22 -07:00
Hanming Lu 927979e127 Fix pad-row top-k masking with custom_routing_function under DP attention (#31838) 2026-07-21 11:49:17 -07:00
02236fa38c Add Inkling model support (#31681)
Co-authored-by: Chunan Zeng <zcnrex@gmail.com>
Co-authored-by: Ke Bao <ispobaoke@gmail.com>
Co-authored-by: Yanbin Jiang <jybsuper@gmail.com>
Co-authored-by: Yuhao Yang <47235274+yhyang201@users.noreply.github.com>
Co-authored-by: Qiaolin Yu <qiaolin.yu@radixark.ai>
Co-authored-by: Zhichen Zeng <zczeng@uw.edu>
Co-authored-by: Aurick Qiao <aurick@thinkingmachines.ai>
Co-authored-by: Joseph <jk@thinkingmachines.ai>
2026-07-19 22:57:37 -07:00
Mick 573c075fef CI: synchronize prefill graph test fixtures (#31665) 2026-07-18 18:48:05 +08:00
Mick 6c6175fabd perf: avoid excessive prefill CUDA graph padding (#31487) 2026-07-18 16:25:30 +08:00
ThanhhaoandHao Phan 72c4ed1a3f [Spec] DFlash: remove per-step host syncs so the CPU runs a full step ahead (spec-v2 overlap) (#31468)
Co-authored-by: Hao Phan <htphan@nvidia.com>
2026-07-17 23:22:07 -07:00
Mick 681c223570 refactor: wrap split backends once on full-attention backends (#31439) 2026-07-17 19:15:04 +08:00
Mick 24a8944e15 fix: enable Kimi multimodal breakable prefill cuda graph replay (#31391) 2026-07-17 19:13:54 +08:00
Mick d9003dd452 fix: skip unsafe automatic prefill graph capture (#31204) 2026-07-16 09:27:38 +08:00
fzyzcjy cfd17301a8 Extract per-architecture KV-cache pool builders into KVCacheConfigurator (#31163) 2026-07-14 16:02:09 +08:00
fzyzcjy d15f6a9ac3 Introduce NgramEmbeddingManager component (#31154) 2026-07-14 15:58:08 +08:00
fzyzcjy e20c346541 Extract hybrid-arch helpers into configs.hybrid_arch and ModelConfig (#31150) 2026-07-14 15:55:32 +08:00
Lianmin Zheng b94ac87e0c Enable breakable prefill CUDA graph for DP attention (#30898) 2026-07-12 17:10:04 -07:00
6cc9352dfe [Spec] Add DSpark: confidence-scheduled speculative decoding (#30261)
Co-authored-by: sglang-bot <232288953+sglang-bot@users.noreply.github.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com>
2026-07-12 17:25:26 -05:00
Liangsheng Yin c53559ba10 [misc] Remove unit test cases that fail the admission criteria (#30690) 2026-07-09 15:31:28 -07:00
Shijin Zhang 8e54517f02 [Feat][GLM5.2] Add DSA Cache Layer Split under Prefill CP (#29421)
Signed-off-by: Shijin Zhang <75300765+Dovis01@users.noreply.github.com>
2026-07-09 03:03:56 -07:00
Cheng Wan e703f9e566 [refactor] Adopt get_parallel() everywhere and close out the parallel wrapper surface (#30492) 2026-07-09 02:09:39 -07:00
Cheng Wan be32c57598 [refactor] Read resolved config from server_args fields; retire the flags mirror tier (#30346) 2026-07-07 21:28:34 -07:00
e339c83f82 [Model] Support LongCat 2.0 FP8 (#30275)
Co-authored-by: sunjiaqi11 <sunjiaqi11@meituan.com>
Co-authored-by: Ke Bao <ispobaoke@gmail.com>
2026-07-07 19:51:12 +08:00
Cheng Wan c861896721 [refactor] Resolve config declarations onto server_args at the end of __post_init__ (#30297) 2026-07-06 18:04:44 -07:00
cctry 6d4ca9bc54 Cap SWA pool sizing with chunk cache (#28755) 2026-06-21 01:06:59 -07:00
Cheng Wan 53318911ca Add get_parallel(): a structured accessor for parallel-topology state (#28567) 2026-06-17 20:23:43 -07:00
cctry 75998d0421 Fix --mem-fraction-static not accounting for EAGLE draft model KV cache (#23862) 2026-06-12 10:35:48 -07:00
Cheng Wan f4f30d7d23 [Fix] Use int64 seq_lens across all CUDA graph runners and backends (#27840) 2026-06-10 19:54:58 -07:00
Cheng WanandClaude Opus 4.8 9097647090 Route the eager forward path through the CUDA graph input-buffer registry (#27407)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 14:35:53 -07:00
Cheng WanandClaude Opus 4.8 0aa72a9e76 Replace skip_attn_backend_init with a batch-carried attention plan marker (+ staleness re-plan) (#27193)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 17:13:18 -07:00
Cheng WanandClaude Opus 4.8 10ab7c919f [refactor] Retire DecodeInputBuffers / PrefillInputBuffers in favor of CudaGraphBufferRegistry (#27192)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 20:52:56 -07:00
Cheng WanandClaude Opus 4.8 45604a0f4a [refactor] Unify CUDA graph runner input buffers behind CudaGraphBufferRegistry (#26742)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 10:54:10 -07:00
Liangsheng Yin b7d62bd724 [CI] Rename basic CI stage-a/b/c -> base-a/b/c for symmetry with extra CI (#25420) 2026-05-15 18:26:55 -07:00
sglang-botandsglang-bot da175b964d chore: update CI test est_time values (#23785)
Co-authored-by: sglang-bot <sglang-bot@users.noreply.github.com>
2026-04-26 20:17:50 -07:00
Liangsheng Yin 6cc2eee50d [misc] CI hygiene: enforce __main__ entry, drop silent-skipped tests, fix rerun-test protoc (#23305) 2026-04-20 21:16:24 -07:00