Skip to content

Code clean up: Remove deprecated prefill move InputMetadata to infer_batch.py - #609

Merged
merrymercy merged 3 commits into
mainfrom
small-fix
Jul 12, 2024
Merged

merrymercy merged 3 commits into
mainfrom
small-fix

Conversation

@merrymercy

Copy link
Copy Markdown
Collaborator

No description provided.

@merrymercy
merrymercy merged commit 519e20c into main Jul 12, 2024
@merrymercy
merrymercy deleted the small-fix branch July 12, 2024 19:28
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 16, 2026
…ot a live repair

MY OWN CLAIM WAS WRONG AND sgl-project#609 WAS RIGHT. a9030fe states that
HiMambaRadixCache "is the tree this rig actually runs". It is not.
`registry.py:107` says the class has no construction site anywhere, and its
module docstring says the default factory routes hierarchical + hybrid-SSM
configs to UnifiedRadixCache. The rig DOES run mamba/GDN, which is what misled
me, but that configuration lands in UnifiedRadixCache.

WHY THIS IS WORTH A COMMIT RATHER THAN A NOTE SOMEWHERE. The module docstring
already records three hardening commits that landed on this class BEFORE the
reachability gap was found (sgl-project#581). sgl-project#609 exists precisely so a fourth does not
arrive believing it is fixing production. a9030fe is that fourth commit, and
leaving its claim unqualified in the tree would retire sgl-project#609's warning by
contradicting it.

WHAT DOES NOT CHANGE. The defect analysis, the fix and the 17 tests stand: the
participation vote genuinely reached only two of the three trees, and this
class genuinely lacked it. It is kept on the same terms as its three
predecessors, under sgl-project#609's explicit decision to retain rather than delete.

WHAT DOES CHANGE. There is no live instance and therefore NO GPU ARM: no boot
can enter a class nothing constructs. The metal-proof request filed for
a9030fe is withdrawn (/spinning/gpu-arb/requests/, same file, annotated
rather than deleted so the reasoning survives). The claim in that request that
this blocked the HiCache-file-backend mitigation rollback is withdrawn with it.

THE LIVE PATHS WERE ALREADY COVERED BEFORE EITHER COMMIT: UnifiedRadixCache
carries the vote from sgl-project#580 and HiRadixCache from sgl-project#610. A reader after a
production behaviour fix wants unified_radix_cache.py.

Tests unchanged and re-run: 17 green.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 17, 2026
…es, ledger sized, arm ticketed

Three desk verdicts and the boot ticket. One of them retracts my own
recommendation.

(1) sgl-project#609 RECONCILIATION -- the UNREACHABLE marking on HiMambaRadixCache
HOLDS, and is stronger than "the switches are off". A hybrid-SSM model
under --enable-hierarchical-cache is routed elsewhere entirely:
registry.py:107-112 returns _create_unified_radix_cache, with the comment
"HiMambaRadixCache has no construction site anywhere". The only live
construction is registry.py:133 MambaRadixCache(params).

This RETRACTS my step-7 recommendation as written. I proposed booting
--enable-hierarchical-cache "because it already tiers mamba state to
host", citing hi_mamba_radix_cache.py:373/:553. Those lines exist but sit
in a class that is never built -- precisely the sgl-project#581 aiming error the
sgl-project#609 marking exists to prevent. Right by accident, wrong by citation.

The mechanism survives in the class that IS reachable: the unified tree's
mamba component treats a host-backed node as a valid match
(mamba_component.py:71-74) and triggers load_back (:139-144), with
_mamba_pool_host set when HiCache is enabled (:62). The arm is re-aimed,
not abandoned.

(2) DISK REACH -- mamba state is NOT host-RAM-terminal. PoolName.MAMBA is
first-class across the storage layer (mooncake_store.py:730,
storage_hf3fs.py:596) and the plain FILE backend carries it by key:
hicache_storage.py:808-828 has _is_shared_mamba_key plus a
canonical_mamba_blob mode, and _get_component_key/_sharded_path write it
generically. sgl-project#555's contribution is already wired there as
canonical_mamba_blob (full-width blob vs per-rank shard). No new disk
path is needed; cross-stage sharing, if ever wanted, is that gate, not a
writer.

(3) HOST-LEDGER -- from the live checkpoint config: temporal 786432 +
conv 30720 = 817152 elements per layer per slot, fp32 = 3.1172 MiB. Live
topology is pp_size=3, tp_size=1 (PP, so whole layers at full width, no
head sharding), 48 GDN layers split 17/16/15. Host post at
hicache_ratio 2.0 (24 slots): 1272 / 1197 / 1122 MiB = 3591 MiB
(3.51 GiB) total. Device pool at 12 slots is 1796 MiB.

Step (5) sizing falls out of the same figure: 12 -> 6 slots returns
318/299/281 MiB per stage (~898 MiB), independently confirming the
~0.9-1.2 GB estimate. Framed as raising the binding stage's token
ceiling, never as a KV share rising.

WINDOW_TICKET_745 is the turnkey arm: add exactly three flags
(--enable-hierarchical-cache, --hicache-storage-backend file,
--hicache-storage-file-path), change nothing else, and accept on three
log lines -- hit-rate lift against the 4-in-121 baseline, the HOST-LEDGER
post against 3591 MiB, and at least one resume from a host-backed node
(without which a lift could be device-side retention alone and proves
nothing about tiering). The slot-floor change is deliberately a SECOND
arm: it resizes the KV pool and would confound arm 1.

Docs only. Nothing boot-verified.
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