Repository navigation
Change llama2 to llama - #596
Closed
ZackZeng999 wants to merge 3 commits into
Closed
ZackZeng999 wants to merge 3 commits into
ZackZeng999 wants to merge 3 commits into
Conversation
Collaborator
|
Please resolve conflicts and clean up your git diff https://github.com/sgl-project/sglang/pull/596/files. |
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 5, 2026
…icing the reserve Follow-up to the ordering fix in the previous commit, found by the rank_gpu_memory_mib consumer sweep and then verified in the source. _apply_gpu_mem_capacity_defaults sets the TIER default for cuda_graph_config.decode.max_bs, but that is not the final value: _widen_decode_capture_to_session_ceiling can raise it, and that widening runs inside _handle_gpu_memory_settings -- after the reserve is decided in _handle_uneven_tp. So resolving only the tier default leaves the same defect one layer down: the profile would be keyed on the tier value while the boot captures at the widened one, under-reserving capture at exactly the size the graphs are captured for. Inert on this rig, which is why it did not show up in windows 6-8: the widening returns early unless --max-running-requests-ceiling is set (it is None in production), and also when the operator has pinned the captured list or the bound themselves. On a config that does set the ceiling it is not inert. Idempotent, so calling it here and again later is the same end state. Pinned by test_the_ceiling_widening_runs_before_the_footprint_lookup, which binds the REAL widening rather than a stand-in, so the guard conditions are part of what is pinned: with the ceiling at 64 and the captured list unpinned the reserve now sees max_bs=64 instead of the tier's 24. 8 passed in test_reserve_ordering_596.py, run individually. Neighbours green (full_demand_593 20, pool_wiring_590 8, solo_reserve_sizing 28). Ruff 355/355.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 5, 2026
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 20, 2026
…ver allocates
Boot 735-standT refused the full per-card VRAM reserve with nine unbounded
terms. Three of them were PHANTOM:
NCCL communicator buffers on <card>: ... NCCL-owned group(s): pp
(should_build_pynccl(use_pynccl=True, world_size=3,
barlink_active=False) is True), flip_tp (...), flip_dcp (...)
while the same boot log recorded, for all four groups:
barlink enabled for group 'pp:0': requested=bar1, ACHIEVED=bar1
Barlink owned every group, so no PyNccl communicator was constructed and
those buffers were never allocated. A refusal is not a warning -- it costs
the ENTIRE priced reserve, which is why the corridor verdict has been
reporting net == raw and inventing no posts.
ROOT CAUSE: an ordering defect introduced by sgl-project#781. parallel_state.
should_build_barlink (parallel_state.py:489) is
`bool(envs.SGLANG_BARLINK.get()) and world_size > 1`, and the ledger's NCCL
term calls it at argument-parse time. Before sgl-project#781 the boot script exported
that variable, so it was true when the ledger ran. sgl-project#781 made --barlink the
source of truth and the environment an internal detail this process
publishes from its own argv -- but the publish sits in
_handle_environment_variables (__post_init__ line ~6892) while the ledger
runs in _handle_gpu_memory_settings (~6745). The ledger read an unset
variable and concluded every group builds NCCL.
Same shape as the sgl-project#596 defect already documented inside
ledger_full_demand_per_gpu: a value the ledger reads, resolved after the
ledger reads it. Same remedy: resolve it first.
FIX: _publish_barlink_ownership_env, hoisted ahead of the ledger-bearing
calls. Deliberately NOT a hoist of _publish_promoted_781_flags itself -- the
first version of this change did that, and the test caught it: that method
is 145 lines and also resolves debug-cuda-graph and custom-all-reduce,
including a self.debug_cuda_graph assignment, so the "idempotent publisher"
claim was false and the blast radius far exceeded the defect. The full
publisher now delegates to the same helper, so there is one definition and
the early and late values cannot diverge.
SECOND DEFECT, the ghost remedy. The graph-capture refusal instructed the
operator to run `ingest-boot-log` against a boot log containing the
'Capture ... begin' lines. No such CLI exists anywhere in this tree; grep
over mem_ledger/, rigmon/ and scripts/vram_ledger/ finds only the string
itself. An error message prescribing a command that does not exist is a
silent falseness: the one remedy needing no GPU was unimplemented, which is
a plausible reason these terms sat unpriced for so long. The message now
names the mechanism that does exist (probe_activation.py and the per-rank
phase_footprint_rank<N>.json it writes). Implementing a boot-log ingester
remains open; it is not claimed here.
Tests: test/registered/unit/mem_ledger/test_ledger_phantom_nccl_786.py, 6
pass. The ordering guard is can-fail proven by removing the hoist (3 fail).
The ghost-remedy guard is selected BY SHAPE -- every scripts/*.py path any
ledger message prints must resolve on disk -- so the next invented remedy is
caught too, not just this one. 520 pass across test/registered/unit/
mem_ledger/. ruff: 358 errors in server_args.py before and after, i.e. none
introduced; new files clean.
Not claimed: this retires 3 of the 9 reported terms. The remaining 6 are the
CUDA-graph-capture and runtime-activation footprints on three cards, which
need scripts/vram_ledger/probe_activation.py run for this configuration.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I renamed the file llama2.py to llama.py and updated the references accordingly.