Skip to content

Update runner docs - #879

Merged
hnyls2002 merged 4 commits into
mainfrom
update-runner-docs
Aug 2, 2024
Merged

hnyls2002 merged 4 commits into
mainfrom
update-runner-docs

Conversation

@hnyls2002

Copy link
Copy Markdown
Collaborator

Thank you for your contribution, we really appreciate it. The following instructions will help improve your pull request and make it easier to receive feedback. If there are any items you don't understand, don't worry. Just submit the pull request and ask the maintainers for help.

Motivation

Remove the local model dirs

Checklist

  1. Ensure pre-commit pre-commit run --all-files or other linting tools are used to fix potential lint issues.
  2. Confirm that modifications are covered by complete unit tests. If not, please add more unit tests for correctness.
  3. Modify documentation as needed, such as docstrings or example tutorials.

@hnyls2002
hnyls2002 force-pushed the update-runner-docs branch from 4d57a90 to cb6b3aa Compare August 2, 2024 00:04
@hnyls2002
hnyls2002 force-pushed the update-runner-docs branch from ca8b289 to 70d81d9 Compare August 2, 2024 00:34
@hnyls2002
hnyls2002 merged commit 12ce3be into main Aug 2, 2024
@hnyls2002
hnyls2002 deleted the update-runner-docs branch August 2, 2024 00:37
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 26, 2026
… and the sibling was never built

I raised this in sgl-project#875 and called it "bigger than the carry". It is real and it
closes as a pin.

Q1 -- THE SIBLING ASYMMETRY IS VOID, AND THE OPERATOR'S REASON IS STRONGER THAN
MINE. I had argued "one pool family translates on this path and the other does
not". `UnifiedSWAKVPool` IS NEVER CONSTRUCTED ON THIS RIG: one construction site
(unified_memory_pool.py:1325), behind `enable_unified_memory` defaulting False
(server_args.py:1371) and False in this boot, behind
`assert self.is_hybrid_swa` (model_runner_kv_cache_mixin.py:2809) which this
GDN/Mamba-hybrid checkpoint does not satisfy, behind a help text excluding
speculative decoding which this rig runs every boot. Verified independently
here, not taken on report.

A family nobody instantiates cannot be evidence that another family is missing
something. My own reason -- the two translate DIFFERENT axes
(`virtual_to_physical`, a lazily-bound page layer, versus the DCP owner rule) --
is true and is the weaker argument. Both point the same way and the asymmetry
must never be the reason anyone touches this path: copying the unified side onto
the hybrid side would install a virtual->physical mapping where no virtual layer
exists.

Q2 -- REACHABILITY, now the first question. `Req.offload_kv_cache` and
`Req.load_kv_cache` have two callers each. `schedule_batch.py:2005` and
`disaggregation/decode.py:736` are gated on `disaggregation_mode == "decode"`;
this rig boots `'null'`, and the tree says so itself at
phase_flip_runtime.py:1545 ("unreachable here"). The seam path is the only other
one, and `copy_state=True` is passed at exactly ONE call site
(phase_flip_runtime.py:1548) -- a copy is taken only at a flip, hence restored
after the cutover, hence always cross-layout, hence declined by #861c's layout
refusal BEFORE `load_cpu_copy` is reached.

THE ONE SURVIVING WINDOW: a flip ABANDONED after `retract_all(copy_state=True)`
has run. The restore then happens in the SAME phase, layouts match, the #861c
guard passes, and the load runs with that phase's slots. Whether abandonment can
occur after the copy is taken is the one thing I could NOT settle at the desk.

Q3 -- DOES #783b's GUARD CATCH IT? Mostly, and the gap is bounded.
`dcp_global_context_slots` (layers/dcp/owner.py:230-233) settles the weighted
lane: "the allocator index space is C and each rank stores its ratio_r / S
share". So `req_to_token` holds slots in [0, C) against a pool of about
C * ratio_r / S rows. Most slots exceed it and `check_cpu_copy_rows` fires --
loud. Slots below the row count are in-range and map to the WRONG row. But the
guard tests MIN and MAX of the whole vector, so one out-of-range entry raises for
the call: only a request whose ENTIRE context sits in the low compact window is
silent. Short contexts, inside an already narrow window. The guard is neither
useless nor a proof of safety.

VERDICT: PIN. No fix applied. The correct fix is the DCP owner rule on this path
derived from the HYBRID pool's own addressing -- not copied from the unified pool
-- and applying it while the path is unreachable would be a change nothing can
observe, with a live chance of copying the wrong side.

AND THE SAME QUESTION TURNED ON MY OWN sgl-project#877, which the operator asked me to
check. On this rig NOT ONE of its six sites is constructed:
`SGLANG_USE_HND_KVCACHE` False and absent from the boot;
`enable_page_major_kv_layout` False; `enable_dsa_cache_layer_split` False;
MLA is a DeepSeek-family pool and this is a GDN hybrid over `MHATokenToKVPool`;
`SGLANG_NATIVE_MOVE_KV_CACHE` False and never set. The live path is
`_move_kv_cache_impl`'s Triton branch, which was ALREADY chunked at 256 before
sgl-project#877 touched anything. sgl-project#877 remains correct hardening and its class check stands,
but my "pin because N <= 72" understated it: the stronger reason is that the
sites are not built here at all. Recorded rather than left as a better-sounding
claim.

CAN-FAIL: removing the disagg gate, adding a second `copy_state=True` call site,
and moving the load before the layout check each red their own test. The
copy-state count had to be counted by AST -- written by text first, it counted a
COMMENT quoting `copy_state=True` at line 1545 as a second site. Fourth instance
on this branch of a name in prose read as a use, and the first one my own test
caught rather than a reviewer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant