Commit Graph
100 Commits
Author SHA1 Message Date
Cheng Wan 57f2105118 docs(skill): record where config is read now that the seed is off limits (#34097) 2026-08-09 14:46:14 -07:00
Cheng Wan b4284f3eb7 config: the KV-cache configurator reads the bags (#34096) 2026-08-09 14:45:42 -07:00
Cheng Wan e216c2bc59 config: the runner and scheduler read resolved config from the bags (#34095) 2026-08-09 14:45:11 -07:00
Cheng WanandClaude Fable 5 a2199c1dee config: pin that resolution is reproducible from the raw input (#34094)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-09 14:44:39 -07:00
Cheng Wan 63833f8034 config: business code no longer reads the published ServerArgs (#34081) 2026-08-09 14:44:08 -07:00
Cheng Wan 110bf7e6a8 config: retire the hidden global fallbacks and the mamba-extra-buffer instance reads (#34080) 2026-08-09 14:43:28 -07:00
Cheng Wan b61a06921e moe: the shared-experts-fusion decision is a per-runner value the loader installs (#33889) 2026-08-07 22:42:58 -07:00
Cheng Wan eda0ddc260 config: delete the dead get_server_args() bindings across the repo (#33888) 2026-08-07 22:41:53 -07:00
Cheng Wan a5af27f49e config: retire ServerArgs.derive; per-runner values are constructor arguments (#33887) 2026-08-07 22:41:09 -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
Cheng Wan 99cfc90658 config: retire ServerArgs.override in favour of derive()
`ServerArgs.override(source, **fields)` was the last way to change a resolved
`ServerArgs` in place. Every remaining call-site was one of two things, and
neither wanted an in-place write:

- **A config for someone else.** A draft worker's context length, an encode
  worker's device, the compile script's watchdog, the client's port pick, a test
  fixture's backends. These already deepcopied first — the write was on the copy.
- **A launcher-stage resolution.** `resolve_auto_parsers` detected the chat
  template's parsers and wrote them back, to be inherited by the schedulers it
  spawns.

Both are "one config becomes another", so `derive(source, **fields)` returns the
variant and leaves the receiver — and any bags projected from it — untouched. It
deliberately is not `dataclasses.replace`: resolution does not re-run, because
the values being set are decided after it, from inputs it never had. Provenance
and the resolvable-field stash work as before, on the copy.

`resolve_auto_parsers` now computes the parsers and returns the config to launch
with; the detection helpers stop taking a config to mutate. `HiMambaRadixCache`
re-applied a HiCache layout normalization `__post_init__` already performs (the
same duplicate removed from `UnifiedRadixCache` in ebb1c88d23) and just goes.

With no in-place mutation left, `ServerArgs.__setattr__` raising after
resolution *is* the guarantee, so the textual writer ratchet retires and
`test_server_args_derive.py` pins the contract instead: the receiver survives
deriving, the published instance still refuses assignment, and deriving does not
publish. `SGLANG_STRICT_CONFIG_MUTATION` was already unused — the guard has been
unconditional since the mutation sweep — and goes with it.

The detection tests drop their `SimpleNamespace` stand-in for a real
`ServerArgs`; the test kit and the MLA chunk-metadata fixture publish a derived
variant instead of writing the runner's published config.
2026-08-05 19:30:53 -07:00
Cheng Wan d33ab39ebc config: template-detected parsers go to the engine's control-plane overlay
`init_tokenizer_manager` wrote the chat-template-detected `reasoning_parser` /
`tool_call_parser` onto the published `ServerArgs`, after
`TokenizerManager.__init__` had already projected the config bags — so the
namespace readers and the resolved-config readback disagreed with the instance,
and a second `Engine` in the same process would inherit the first one's
detection through the shared bags.

Detection is per-engine control-plane state, which the manager already models:
`record_config_updates` records it, the readback endpoints overlay it, and
`config_value` reports what is in effect. `OpenAIServingChat` — the only reader
of these two fields in the tokenizer process — follows the overlay. The
architecture pass (`resolve_auto_parsers`, before the schedulers fork) is
unchanged: the scheduler resolves its own bags from the instance it receives.
2026-08-05 19:29:51 -07:00
Cheng Wan bebebb8f6c config: retire the alias-form process-global config reads
`sa = get_server_args()` followed by `sa.field` reads the same startup record as
the direct form; the read ratchet added in the previous slice pinned twelve of
them as the remaining surface. Eleven now read the accessor for what they
actually want:

- `is_enable_moe_cp_allgather` compares the attention-CP and MoE-DP sizes to
  decide whether a forward needs an allgather, so it reads the live topology
  through `get_parallel()` — the same source `get_moe_cp_size()` right above it
  already uses. Both groups exist once model-parallel init has run, which is
  before any forward.
- The DeepSeek MLA decode-backend gate and Inkling's attention paths read
  `get_exec().kernel`; Inkling's KV-dtype checks read `get_model()`. These are
  per-runner fields, and the value they get is the config published for the
  runner being built — unchanged from what the alias returned.
- The int8 mamba checkpoint pool reads `get_exec().mamba`. It keeps its guard
  for callers that construct the pool with no published config; that guard now
  catches the namespace accessor instead of the slot.

`model_loader`'s `moe_dp_size` stays on the instance and is exempt: the dict it
belongs to already reports the live size under `"dp"`, so that entry is the
configured intent, and `get_parallel()` shadows the name with the live value.

Alias-form baseline 12 -> 0. What remains on `get_server_args()` in the package
is the derived API (properties and methods computed from several fields plus the
HF config) and four config-intent reads of live-shadowed sizes, each exempt by
name with its reason.
2026-08-05 19:29:20 -07:00
Cheng Wan 1d47952c7c config: pass the Ray placement group as a launch argument
`RayEngine.__init__` set the caller's `PlacementGroup` on `ServerArgs` as an
undeclared attribute, and every consumer read it back off the config object:
the non-DP launch path took `pg` and `is_custom_pg` from it, the DP path had to
re-attach the handle after `dataclasses.replace` dropped it, the DP controller
asked the config whether the group was the caller's, and the Ray HTTP launcher
had to clear the field so a stale handle could not leak in.

A live cluster object is not config. It now travels as a `placement_group`
argument on the two launch hooks — `Engine._launch_subprocesses` and
`Engine._launch_scheduler_processes` — defaulting to `None`, with `RayEngine`
holding the caller's group in `_placement_group` and the DP path passing
`is_custom_pg` down to the controller. The public API is unchanged:
`RayEngine(placement_group=pg, ...)` still works, `pg` still falls back to the
ambient group, and the HTTP launcher gets `None` from the default.

Writer ratchet 18 -> 15.
2026-08-05 19:28:39 -07:00
Cheng Wan b8109b5d63 config: retire the last process-global config field reads (#33338)
`get_server_args().<field>` reads one process's startup record. Nine sites still
did that for a value that has a namespace: the attention backend (5),
`skip_tokenizer_init` (2), the draft-aware `load_format`, and a chunked-prefill
size in `sglang.kernels`. They now read `get_exec().kernel` / `get_serving()` /
`get_model()` / `get_schedule()`, so they see the resolved value including
post-publish overrides.

The multimodal processor's device selection moves to the instance it was
constructed with rather than to a namespace: `base_gpu_id` differs per worker (the
encode-server DP workers each specialise their own copy), so no process-global
value can stand in for it, and engines sharing a tokenizer process each need their
own. Branch order, the NPU preprocess patches, and the case that leaves "device"
unset are unchanged.

What stays on `get_server_args()` is the derived API — `@property` and method
members computed from several fields plus the HF config
(`mamba_cache_chunk_size`, `get_model_config()`, `enable_mamba_extra_buffer*`) —
plus three config-intent reads of live-shadowed sizes, each of which needs an
answer the live topology property cannot give (the DSA indexer's PP gate must
short-circuit before touching the PP group, `allocation`'s DCP gate asks whether
DCP was configured at all, and the CUDA-IPC recycler runs where no group exists).

A new AST ratchet pins both shapes it can see — the direct call and an alias
bound from it in the same function — at 0 and 12 respectively, exempting the
derived APIs and those three sites by name. The alias-form baseline is not zero:
those reads are mostly per-runner fields in model code, and lowering them is the
next slice.

Two fixtures stopped faking config: `test_dllm_fdfo_kv_reuse` rebound
`allocation.get_server_args` to a SimpleNamespace, which silently stops
intercepting the moment a reader migrates; it publishes a real config instead.
2026-08-02 21:24:42 -07:00
Cheng Wan aa3bbbc6e8 observability: publish the generated forward-pass-metrics endpoint to the bags (#33337)
When --forward-pass-metrics-ipc-name is left unset the reporter generates an
endpoint and has to hand it to external consumers (the documented contract is
that they read it back from the server config). That readback is the scheduler's
get_internal_state, which already reports get_context().resolved_server_args_dict(),
so the write moves to get_context().override and the read alongside it to
get_observability() — the endpoint still shows up in /server_info's
internal_states, and the ServerArgs instance stops being a message bus.

The test's server_args stand-in (a SimpleNamespace with a hand-rolled override)
becomes a real published config, so the reporter exercises the same accessors as
production.

Writer ratchet 19 -> 18.
2026-08-02 21:24:11 -07:00
Cheng Wan 0b3e8bedd1 config: keep runtime hicache and weight-version updates off ServerArgs (#33336)
The scheduler's runtime HiCache attach/detach wrote its own ServerArgs so the
internal-state readback would show the change; that readback already reports
the resolved config, so the writes become get_context().override(...) and the
namespace readers see them too.

The tokenizer side is per-engine — several Engines can share one process — so
its control-plane updates (weight version, model path + load format, HiCache
attach/detach) stay with the manager instead of moving to the process-global
bags. TokenizerManager gains record_config_updates / config_value /
resolved_config_dict, and the readbacks that used to observe the instance write
(/server_info, /model_info, the HiCache status endpoint, the gRPC bridge) now
overlay those updates onto the startup config.

test_server_info's stub grew the real manager instead of a SimpleNamespace, so
the overlay it now exercises cannot drift from production.

Writer ratchet 26 -> 19.
2026-08-02 21:23:38 -07:00
Cheng Wan 9bc8848fcf spec: build every draft worker from a draft ServerArgs copy (#33335)
EAGLEWorkerV2, StandaloneWorkerV2, MultiLayerEagleWorkerV2 and
FrozenKVMTPWorkerV2 wrote the draft's context_length onto the ServerArgs
instance they share with the target worker, and the scheduler wrote the draft's
load_format onto that same object just before creating them. The target's config
carried draft values from then on, and anything constructed later in the process
inherited them.

Scheduler.maybe_init_draft_worker now makes one draft copy through
draft_server_args_copy() and hands it to both the worker factory and the worker,
so every algorithm gets it — the four built-ins, dflash/dspark (which deepcopy
it again inside build_draft_tp_worker), and anything registered through
SpeculativeAlgorithm.register. The copy starts from the config the process
resolved, not from the pristine seed, so load-time overrides made before this
point (the chunked-prefix gate, the SM100 GDN prefill default) are part of what
the draft sees; context_length and load_format are applied on top.

The construction runs under a preserved publish of that copy, the shape
build_draft_tp_worker already used. Weight loading reads the bags rather than the
instance it was handed — Inkling's ModelOpt scale normalization keys on
load_format — so the draft has to be built with its own config published, and
the target's is back in the slot when construction returns.

The EAGLE hot-token-map write is deleted, not moved. init_token_map runs from
alloc_memory_pool, long after the draft's TpModelWorker built its ModelConfig,
and hot_vocab_size is only ever read off model_config.hf_config, which
json_model_override_args reaches at ModelConfig construction. The write could not
affect the draft model; only the shared instance saw it. hot_token_id is
unchanged, so a draft checkpoint that declares hot_vocab_size behaves as before.

Tests: draft_server_args_copy carries the target context_length, a configured
draft load_format and any load-time override while leaving the target's instance
alone; and the scheduler handoff pins that the factory and the worker both
receive the copy, that the copy is the published config during construction, and
that the target's is restored afterwards.

Writer ratchet 31 -> 26.
2026-08-02 21:22:52 -07:00
Cheng Wan ebb1c88d23 config: stop writing config onto the published ServerArgs at three sites (#33334)
Each of these wrote a value after resolution so a later reader would find it on
the instance. None of them needed the instance: one write was redundant, and the
two that carry a value the resolved-config readback reports move to
get_context().override, which the readback overlays.

- The SM100 GDN prefill default was written onto ServerArgs and read back one
  line later by initialize_linear_attn_config. It is now the return value of
  flashinfer_gdn_prefill_default, threaded into initialize_linear_attn_config
  (an explicit --linear-attn-prefill-backend still wins) and recorded with
  get_context().override so /server_info reports the backend in effect.
- The XGrammar fallback recorded grammar_backend="none" on the instance. No code
  reads the field after the factory reads it once, but get_internal_state
  reports the whole resolved config, so the fallback now lands there instead:
  the readback tells the truth and the seed keeps the requested backend.
- UnifiedRadixCache.init_hicache re-applied the direct-IO layout fixup that
  __post_init__ already applies: init_hicache only runs when hierarchical cache
  is on, which is exactly when _handle_hicache normalizes page_first to
  page_first_direct (pinned by test_hicache_io_backend_and_mem_layout_
  compatibility::direct_with_page_first). Three fixtures reached the fixup by
  building ServerArgs(model_path="dummy"), whose resolution is skipped, so they
  now declare the layout resolution would have produced.

Writer ratchet 34 -> 31.
2026-08-02 21:22:05 -07:00
Cheng Wan 88e5a0f635 test: stand up the config tiers two unit tests read from (#33294) 2026-08-02 15:46:34 -07:00
Cheng Wan 729081e14f docs: rewrite the runtime-context skill for the namespace-bag config model (#33173)
The skill still described the retired resolve-at-end contract (a single
resolved ServerArgs as the source of truth, ServerArgs.override as the
mutation entry). Rewrite the config sections for the landed model:

- ServerArgs is a pristine published seed; resolved config lives in the
  namespace bags (get_exec()/get_memory()/.../get_device()), projected at
  publish(server_args, role=...) per process entry.
- Post-publish mutation goes through get_context().override (bag-only);
  ServerArgs.override is being retired behind the writer ratchet, and
  rerouting a writer co-flips all its readers in the same commit.
- Documented the reads that stay on an instance (per-runner fork fields,
  per-instance tokenizer/entrypoints boundaries, whole-object passes),
  get_parallel()'s config/live dual semantics with the live-shadowed
  sizes rule, preserve_config for nested publishes, and the bag-only
  declare_load_time_override route.
- Testing idioms: publish-seeding (override_server_args + scoped bag
  overrides) instead of faking accessors or SimpleNamespace stand-ins;
  per-file test runs to avoid leaked-publish masking.
- Guardrails: added the writer ratchet, namespace-coverage lint, and the
  migration-deferral ratchet.
2026-08-01 09:00:10 -07:00
Cheng Wan 7071cfb873 runtime_context: per-role namespace enforcement behind SGLANG_ROLE_NAMESPACES (#33172)
publish(role=...) has recorded provenance since the namespace split; this
wires the enforcement the role was reserved for. SGLANG_ROLE_NAMESPACES
selects the mode:

- off (default): no bookkeeping; the mode gate in config_bag stays a
  dead-branch-prunable check under dynamo (bag reads run inside compiled
  forwards — pinned by a fullgraph test).
- record: audit mode — collect (role, namespace) pairs per process and
  persist each new pair immediately to SGLANG_ROLE_NAMESPACES_OUT (worker
  teardown skips atexit), plus a per-process stderr summary at exit.
- enforce: a bag read outside the role's ROLE_NAMESPACE_SETS entry fails
  closed with an actionable error; None entries mean full tree.

Sets are filled only where audits back them: dp_controller reads only
exec (record-mode plain + DP-attention smokes agree with the module's
static read set — the elastic-EP gate). tokenizer observed zero bag
reads (per-instance managers read self.server_args by design) but keeps
the full tree until the multi-tokenizer disagg shape (TokenizerWorker's
get_disagg read) is audited; encoder / expert_backup /
weight_cache_daemon likewise await their deployment shapes.

Verified end-to-end: DP-attention smoke under enforce boots and serves
with zero violations.
2026-08-01 08:59:49 -07: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 47d8b5b749 config: route parallel config-leaf reads through get_parallel() (#33170)
The parallel namespace joins the accessor migration: 106 config-leaf reads
(enable_dp_lm_head, enable_dp_attention, pp_async_batch_depth, dp_size,
ep_join_rank_offset, dwdp_size, ...) flip from get_server_args()/
self.server_args to get_parallel(), which serves config leaves from the
published parallel bag via __getattr__.

- ParallelContext.__getattr__ is restructured to stay dynamo-traceable
  (object.__getattribute__ graph-breaks): gate helpers such as
  enable_moe_dense_fully_dp() run inside compiled model forwards. A
  fullgraph regression test pins the pattern.
- The five live-shadowed topology sizes (tp/pp/dcp/attn_cp/moe_dp_size)
  keep their server_args reads: the live @property wins on the accessor,
  and conditionally-initialized groups would fail loud at unconditional
  call sites.
- Elastic-EP scale writers (ep_size/dp_size x4 in model_runner) reroute
  to get_context().override together with their remaining instance
  readers (expert_location gpus-per-node paths); the ServerArgs.override
  ratchet drops 39 -> 35.
- The expert placement helpers (compute_logical_to_rank_dispatch_
  physical_map, _compute_logical_to_all_physical_map,
  _prefer_same_node_experts) now read everything from the bags and drop
  their server_args parameter; their unit tests publish the config they
  need instead of stubbing it.
2026-08-01 08:58:39 -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
Cheng Wan 934a13ce3e [Inkling] Hold the short-conv per-step state on one metadata struct (#33116) 2026-07-31 18:11:35 -07:00
Cheng Wan 55b6769b0e config: read resolved config via namespace accessors (#33013) 2026-07-31 15:06:59 -07:00
Cheng Wan 4862edc85f runtime_context: record the publishing process role (#33012) 2026-07-31 15:06:22 -07:00
Cheng Wan ab2553284a config: preserve resolved config across nested publishes + mutation ratchets (#33011) 2026-07-31 15:05:41 -07:00
Cheng Wan 77c77a3da8 feat(inkling): migrate short convs onto the ShortConv attention backend (#33023) 2026-07-31 11:52:12 -07:00
Cheng Wan d3222bcc3a [unified-memory] Support fa3, the default MLA backend on pre-Blackwell hosts (#33046) 2026-07-31 11:46:46 -07:00
Cheng Wan 33c27d8e7f [unified-memory] Let Kimi-Linear use the paged MLA attention backends (#32972) 2026-07-31 01:32:08 -07:00
Cheng Wan e23ccb15f0 [unified-memory] Support MLA-hybrid-Mamba (Kimi-Linear) on the Triton backend (#32971) 2026-07-30 22:10:34 -07:00
Cheng Wan 06ccaef24a Fix silently wrong EPLB output with --moe-a2a-backend none (rank-invariant dispatch) (#32962) 2026-07-30 22:10:04 -07:00
Cheng WanandShu Wang 659d349b61 [core/loader] Add presharded load format (#24256)
Co-authored-by: Shu Wang <shuwanguc@google.com>
2026-07-25 13:03:39 -07:00
Cheng Wan eac7c7d7cd fix(attention): read per-runner kv cache dtype off model_runner (#32251) 2026-07-23 20:08:57 -07:00
Cheng Wan f5dcbe8f14 Revert RuntimeContext config-namespace reads/roles (#31813–#31817) (#32100) 2026-07-22 11:52:41 -07:00
Cheng Wan 2e43b4de52 test: publish resolved config in unit fixtures for the namespace API (#31817) 2026-07-22 01:19:13 -07:00
Cheng Wan 745b2ca45c config: read parallel config leaves via get_parallel() (#31816) 2026-07-22 01:18:50 -07:00
Cheng Wan 602b546a4e config: load-time declarations write the config bags (#31815) 2026-07-22 01:18:31 -07:00
Cheng Wan 11a4c2d057 config: read resolved config via namespace accessors (#31814) 2026-07-22 01:18:05 -07:00
Cheng Wan 1d0a6ee178 runtime_context: record the publishing process role (#31813) 2026-07-22 01:17:42 -07:00
Cheng Wan e1479cc966 config: route runtime config adjustments through the namespace bags (#31812) 2026-07-22 01:17:22 -07:00
Cheng Wan 97e2c0c4ee config: make ServerArgs read-only with a single audited mutation entry (#31811) 2026-07-22 01:16:55 -07:00
Cheng Wan 09688d58bc runtime_context: add resolved-config namespace bags and accessors (#31810) 2026-07-22 01:16:24 -07:00
Cheng Wan 1a19f2b50f config: annotate ServerArgs fields with their runtime-config namespace (#31809) 2026-07-22 01:15:11 -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
Cheng Wan fc2ef35308 [refactor] Move MLP collective flags onto ForwardFlags (#30802) 2026-07-10 17:43:39 -07:00
Cheng Wan c02b032da0 [fix] Repoint the prefetch-dispatch test at the loader's current config binding (#30631) 2026-07-09 02:21:04 -07:00
Cheng Wan d8791fb5e3 [docs] Add the sglang-runtime-context skill (#30494) 2026-07-09 02:11:36 -07:00
Cheng Wan 1f15308dca [refactor] Retire the legacy config accessor and the remaining process singletons (#30493) 2026-07-09 02:10:47 -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 06eb1b1838 [refactor] Split the DP gathered-buffer state between flags.dp and ctx.forward (#30491) 2026-07-09 02:09:21 -07:00
Cheng Wan fef2128e19 [refactor] Add the per-forward flags tier: ctx.forward (#30490) 2026-07-09 02:09:03 -07:00
Cheng Wan 65b14881c5 [refactor] Move the EP dispatcher and fusion-workspace manager state onto ctx.resources (#30489) 2026-07-09 02:08:35 -07:00
Cheng WanandClaude Opus 4.8 cc13e2eae7 [CI] Move piecewise CUDA graph (pcg) tests to nightly (#30563)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 16:07:08 -07:00
Cheng Wan 7709a1f358 [refactor] ctx.resources: named slots, stream leases, and workspace buffer leases (#30348) 2026-07-07 21:30:10 -07:00
Cheng Wan b7cca0bf8f [refactor] Collect MoE and DP-attention runtime state into typed flag groups (#30347) 2026-07-07 21:29:27 -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
Cheng Wan b14f7b4f75 [refactor] Move model-capability adjustments into the resolution pipeline (#30299) 2026-07-07 21:26:55 -07: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
Cheng WanandClaude Fable 5 602c8615a1 [fix] Reconcile the legacy-getter ratchet baseline after racing merges (#30154)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 22:06:07 +08:00
Cheng Wan 3ea875fef4 [chore] Remove the stack-review placeholder file (#30149) 2026-07-05 02:39:45 -07:00
Cheng Wan 8fb99bbaf8 [refactor] Config resolution pipeline: full-stack review (10-PR series, review only) (#30137) 2026-07-05 00:00:07 -07:00
Cheng Wan 754524d8de [Fix] Skip cross-node probe in MultimemAllGatherer on single-node runs (fixes mooncake EP segfault) (#30139) 2026-07-04 15:36:23 -07:00
Cheng Wan 00f088f6be [fix] Wrap the sp_shard test entry point in sys.exit so failures propagate (#30138) 2026-07-04 14:23:40 -07:00
Cheng WanandClaude Fable 5 b941e337a4 [refactor] Rename Arg.model_overridable to Arg.resolvable (stack 15/15) (#30077)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:23:01 -07:00
Cheng WanandClaude Fable 5 7ea2284551 [refactor] Migrate the DeepSeek family and the parallel-request chains (stack 14/15) (#30076)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:22:50 -07:00
Cheng WanandClaude Fable 5 3836cba9ee [refactor] Migrate the moe_runner_backend / quantization resolution chains (stack 13/15) (#30075)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:22:38 -07:00
Cheng WanandClaude Fable 5 276fbfe880 [refactor] Migrate the page_size resolution chain (stack 12/15) (#30074)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:22:28 -07:00
Cheng WanandClaude Fable 5 abbb41a214 [refactor] Migrate the attention_backend resolution chain (stack 11/15) (#30073)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:22:17 -07:00
Cheng WanandClaude Fable 5 5c95bf15c8 [refactor] Add the post-process resolution stage; migrate sampling_backend (stack 10/15) (#30072)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:22:05 -07:00
Cheng WanandClaude Fable 5 ae29c5a1dc [refactor] Sweep disable_hybrid_swa_memory writers; close the dtype family (stack 9/15) (#30071)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:21:54 -07:00
Cheng WanandClaude Fable 5 4bf4db09f6 [refactor] Add predicate-keyed registration; migrate the Step3p family (stack 8/15) (#30070)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:21:43 -07:00
Cheng WanandClaude Fable 5 8d8f17e28c [refactor] Migrate the first override families: Mistral/Pixtral dtype, MiniMaxM2, MiMoV2 (stack 7/15) (#30069)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:21:32 -07:00
Cheng WanandClaude Fable 5 df6491d80c [refactor] Wire the config resolution pipeline (dispatch, stash, dual-apply, publish) (stack 6/15) (#30068)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:21:21 -07:00
Cheng WanandClaude Fable 5 c3d751b231 [refactor] Add the declarative model-override registry and resolution gate (stack 5/15) (#30067)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:21:09 -07:00
Cheng WanandClaude Fable 5 10f258257f [refactor] Add the resolved-flags tier + resolvable-field metadata (stack 4/15) (#30066)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:20:58 -07:00
Cheng WanandClaude Fable 5 ff57171f98 [refactor] Soft-deprecate the legacy global ServerArgs accessors + ratchet (stack 3/15) (#30065)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:20:46 -07:00
Cheng WanandClaude Fable 5 def20782cf [refactor] Move ServerArgs ownership into the runtime context (stack 2/15) (#30064)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:20:34 -07:00
Cheng WanandClaude Fable 5 6d662c9245 [refactor] Add a read-through server_args accessor to RuntimeContext (stack 1/15) (#30063)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 02:19:46 -07:00
Cheng Wan 88db9e033a Adjust KL_THRESHOLD for log probability calculations (#30101) 2026-07-03 23:53:51 -07:00
Cheng Wan 4028304579 [DSA] Disable indexer fusion by default to restore DeepSeek-V3.2 accuracy (#30088) 2026-07-03 20:50:37 -07:00
Cheng Wan 5f623ad24e Revert "Fix wrong RMSNorm fallback to old Flashinfer CUDA kernel when in PCG" (#30083) 2026-07-03 19:05:20 -07:00
Cheng Wan c21f6f19cf [MoE] Fix moe_fused_gate out-of-range expert id on all-NaN rows (fixes eagle_dp_attention crash) (#30079) 2026-07-03 18:48:51 -07:00
Cheng Wan 76f7f7c006 [Spec] Remove the ServerArgs clone + global save/restore hack from DFlashWorkerV2 (#29995) 2026-07-02 23:37:04 -07:00
Cheng Wanandlch1475369 bc25abb786 perf(triton): avoid per-step D2H .item() sync in cuda-graph loc translate (#29921)
Co-authored-by: lch1475369 <lch1475369@gmail.com>
2026-07-02 13:20:00 -07:00
Cheng Wan b558cc1abb feat(short-conv): shared ShortConvAttnBackend for ZAYA1 CCA + LFM2 short conv (#29867) 2026-07-01 20:08:00 -07:00
Cheng Wanandlch1475369 4a8e76805c feat(mem_cache): unified memory pool for hybrid Mamba / SWA models (#29678)
Co-authored-by: lch1475369 <lch1475369@gmail.com>
2026-07-01 13:21:59 -07:00
Cheng Wanandlch1475369 fc96edd297 feat(mem_cache): page-major (layer-major within a page) KV/state layout (#29533)
Co-authored-by: lch1475369 <lch1475369@gmail.com>
2026-06-29 14:49:54 -07:00
Cheng Wan 7b02eab7a6 Revert "[DeepSeek V3] Run routed experts on main stream in dual-stream MoE" (#29452) 2026-06-26 13:59:36 -07:00
Cheng Wan c4376aaa88 [Refactor] Remove dead out_cache_loc_swa buffers (#28968) 2026-06-23 00:03:30 -07:00
Cheng Wan 6fdcb9934c fix(runner): size eager static buffers for prefill budget and MLP-sync autotune (#28677) 2026-06-19 13:23:26 -07:00
Cheng Wan 2aa7b58aa7 refactor(runner): reuse a prepared static buffer for every dummy run (#28740) 2026-06-19 13:16:07 -07:00
Cheng WanandClaude Opus 4.8 856b0dc74b refactor(runner): move kernel warmup into the shared runner lifecycle (warmup()) (#28739)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 13:13:13 -07:00
Cheng WanandClaude Opus 4.8 d705a91de1 refactor(runner): add EagerRunner, own the eager path, polymorphic dispatch (#28386)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 13:05:43 -07:00
Cheng Wan a6db86d535 refactor(runner): split BaseRunner (shared) from BaseCudaGraphRunner (#28385) 2026-06-19 02:04:15 -07:00
Cheng Wan 1c6331cbd6 refactor(runner): rename runner replay/load/can_run for the shared surface (#28384) 2026-06-19 01:45:04 -07:00
Cheng Wan f83e4d5968 refactor(runner): unify eager-forward DP/MLP-sync padding into one helper (#28383) 2026-06-18 13:41:30 -07:00