Repository navigation
Support Mistral-Nemo - #691
Merged
Merged
Conversation
zhyncs
approved these changes
Jul 21, 2024
zhyncs
left a comment
Contributor
There was a problem hiding this comment.
LGTM. nit: Maybe run it on the original llama as well.
Collaborator
Author
|
For Llama-2-13b-chat-hf: hf: sglang: |
Contributor
|
Thanks for your contribution! |
Merged
timethink
pushed a commit
to timethink/sglang
that referenced
this pull request
Mar 9, 2025
cen121212
pushed a commit
to cen121212/sglang
that referenced
this pull request
Nov 10, 2025
* Update test_utils.py * Update test_utils.py * Update test_utils.py * Update run_suite.py * Update run_suite.py * Uncomment test_original_logprobs.py in test suite * Update pr-test-npu-debug.yml
cherryblo
added a commit
to cherryblo/sglang-project
that referenced
this pull request
Jul 2, 2026
add Testcases
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Aug 16, 2026
…refuse to mispair WHAT WAS REFUSED AND WHY. `_install_rank_prefill_timer` gated on `pp_size == 1`, on the reading in its own docstring that "PP pipelines process prefill results on the last stage only, which breaks the FIFO pairing". Under PP the per-rank prefill line therefore carried no gpu-ms at all, so a PP boot had no compute-vs-wait number and had to fall back on occupancy proxies. THE READING DOES NOT MATCH THE RIG. On the reference PP=3 boot all three stages emit the per-rank prefill line, in near-equal counts -- 1020 / 1020 / 1018 across one log rotation, and the same shape in every rotation checked. Every stage runs its own scheduling pass and records its own prefill batches, so a given stage's two queues are fed by that stage's own forwards, which is exactly what the positional pairing needs. The gate was refusing a shape that pairs. PER-STAGE LOCAL PAIRING, NOT LAST-STAGE-ONLY. The docstring offered last-stage-only as the alternative; it measures one card. The question this instrument exists for is the SPREAD of wait across stages -- who arrives at the collective first and who is waited on -- and that needs a number per stage. THE ASSUMPTION IS NOT TAKEN ON TRUST, which is the other half of this commit. `flush()` pairs POSITIONALLY: `k = min(len(_pending), len(_durations))`, popped from both. A stage that ever times a forward it does not record shifts the correspondence, and every line after that attaches one forward's duration to another forward's token counts -- a wrong number with the same authority as a right one. So the pairing is now checked BEFORE any pop, and a stage whose queues drift past MAX_PAIR_SKEW refuses: once, loudly, permanently for that rank, and the line degrades to the untimed form. It never reports a mispaired one. A rank that simply went quiet would be indistinguishable from a fast rank, which is why the refusal is announced rather than silent. WHAT THE GUARD IS, STATED HONESTLY RATHER THAN OVERSOLD. It is a DIVERGENCE detector, not an identity check. Per-side sequence numbers were tried on paper first and cannot catch an orphan: each side counts its own stream, so an extra duration shifts the correspondence while leaving the counters equal. An exact check needs a shared forward identity threaded from the scheduler through ForwardBatch into the timer metadata -- that touches the hot path and is named as the follow-up rather than smuggled in under a metrics change. What IS caught is the shape that breaks pairing in practice: one stream persistently outrunning the other, which is precisely the failure the old gate feared. A LEAD IN EITHER DIRECTION STAYS LEGAL. Durations routinely complete before the result that records them (the sibling file pins that), and several forwards can be in flight before any events complete. MAX_PAIR_SKEW = 8 admits both; only a persistent runaway trips it. pp_size=1 IS UNCHANGED. Same install, same queues, same line. The existing 30-case suite passes untouched, which is the byte-neutrality evidence. TESTS. Red-first: 8 of 10 fail before the change (the install gate refuses PP; the guard does not exist). Green now. The planted mispairing is falsified properly rather than by the API being absent: with the skew check deleted, 4 cases go red and `test_no_mispaired_line_is_emitted_at_the_moment_of_refusal` shows an actual INFO line emitted from already-diverged queues -- the mispairing is real, not hypothetical. Covered: PP=3 now installs; pp_size=1 unchanged; a non-CUDA device still refused; a persistent orphan stream refused loudly; the line degrading to untimed afterwards; the refusal announced once and not per flush; no timed line at the moment of refusal; matched pairing still emitting the split; and transient leads in BOTH directions not tripping the guard. test/registered/unit/managers: 2039 passed (2029 before, +10), 4 failed -- all four pre-existing on this base and unrelated (test_first_chunk_dynamic_chunking x2, test_collective_family_siblings_610 PrefillAdmissionBudgetTest x2). Hermetic (CUDA_VISIBLE_DEVICES=""), no boot. FOR F4-r4: arming per-stage prefill compute-vs-wait in a PP=3 boot now needs no flag -- the timer installs on every stage wherever the device is CUDA. Read the SPREAD of `wait` across stages, not its absolute value; the docstring's existing note on that (largest shard shows smallest wait) carries over unchanged.
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.
Tested Mistral-Nemo-Instruct-2407
hf:
sglang: