Skip to content

Bump version to v0.2.9 - #890

Merged
Ying1123 merged 1 commit into
mainfrom
bump-version
Aug 2, 2024
Merged

Ying1123 merged 1 commit into
mainfrom
bump-version

Conversation

@Ying1123

@Ying1123 Ying1123 commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

No description provided.

@Ying1123 Ying1123 changed the title Bump version to 0.2.9 Bump version to v0.2.9 Aug 2, 2024
@zhyncs

zhyncs commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

Hold on. Please. Wait for me to solve the CI issue of the fork PR.

@zhyncs

zhyncs commented Aug 2, 2024

Copy link
Copy Markdown
Contributor

Hold on. Please. Wait for me to solve the CI issue of the fork PR.

Go ahead and release it, the impact is not significant.

@Ying1123
Ying1123 merged commit 30a9b2e into main Aug 2, 2024
@Ying1123
Ying1123 deleted the bump-version branch August 2, 2024 08:45
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
McZyWu pushed a commit to McZyWu/sgl-sglang that referenced this pull request Jul 2, 2026
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 26, 2026
…-chunk exception carried onto the line, and the permission withdrawn at the execution) into the flip train
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 26, 2026
…own merges moved

The merge-regression run over the day's ticket suites turned up exactly one
failure outside the recorded standing set:
test_rejected_evidence_pins.py::PpWithSpecEvidenceTest::
test_evidence_cites_land_on_BOTH_halves_of_the_guard.

Not a defect in any merged fix. sgl-project#898 re-pinned this row against
be56c4e, and the same day's server_args.py additions -- sgl-project#889, sgl-project#893,
sgl-project#894, sgl-project#897 and sgl-project#887/sgl-project#890 -- then pushed the guard down 44 lines. The
verdict did not change; its coordinates did. :19436/:19451 -> :19480/:19495,
both re-read in the merged tree rather than taken from the failure text.

This is the guard doing its job: a line pin is a coordinate into a file
other tickets edit, so it goes stale at MERGE time, not at write time, and
only a train run can see it. #704b re-pinned the same row for the same
reason, so the note now says so instead of reading as a one-off.

CLASS. test_rejected_evidence_pins.py is the only line-pin validator in the
tree (grep for _LINE_REF / "cite has drifted"), and its other five cases
pass, so no sibling pin drifted unseen behind a missing guard. 6 passed.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 27, 2026
… reports it

SLICE 1 BOUNDED THE LEAK BY QUANTITY -- one chunk is one grant, so a single
retraction can no longer license a 20 000-token TP wave. It never questioned
whether the FIRST chunk should have run. The exemption rests on a factual
claim ("the tokens were already prefilled in the PP window, their KV is in the
canonical store, the re-admission recomputes nothing"), and W37-D falsified it
on metal: 258 TP prefill batches, every one `#new-token: 4096,
#cached-token: 0`, and `#cached-token` 0 on all 1441 occurrences of the whole
boot, HiCache serving zero hits.

THE VERDICT ALREADY EXISTED AND ONLY EVER SPOKE. `layout_conformance.
work_layout_verdict` has scored exactly this since #861k -- "a batch claiming
transport while recomputing tokens is a violation, and `cached_tokens == 0 and
new_tokens > 0` is exactly that shape" -- and its caller logged it and moved
on. The premise could be disproved once per batch, loudly, and the next round
issued the exemption again on the same claim. sgl-project#501's shape: a grant checked at
issue and never revoked at execution.

WHERE THE REVOKE GOES, AND WHY NOWHERE ELSE. Into SEAM_RESTORE_REFUSED_ATTR --
the channel sgl-project#890 built for this and documented as "the one signal that says
the claim was false for this request" -- written at the detector's OWN call
site (`_note_work_layout`), from the inputs the verdict already used. No new
channel and no second reading of the batch: a revoke that could reach a
different answer than the violation that triggered it would be a second
authority over one question.

RANK-UNIFORMITY, the load-bearing question for anything feeding a group-wide
branch. `batch.is_seam_transport` is uniform by construction -- the builder's
own `transport_only`, from the replicated waiting queue and a group-unanimous
cutover stamp. `cached_tokens` is a per-rank sum of prefix matches, but in the
fault this addresses it is uniform anyway: the canonical store either serves a
prefix or it does not, and W37-D measured zero on every rank of a whole boot.
A split would need one rank to hit while another misses -- the radix-replica
disagreement #639b already owns, a different defect. The residual is stated
rather than hidden: this writes the SAME channel `restore_seam_state`'s
refusal branches already write per rank, so it adds no new uniformity class,
and `seam_transport_premise_holds` consumes it by COUNTING over the candidate
population rather than trusting any single request.

ANTI-WEDGE, PINNED RATHER THAN ARGUED. By the time the revoke runs, slice 1
has already spent the grant of every request this round admitted, so nothing
about the CURRENT chunk changes. What changes is the NEXT grant -- and a
request with no open grant is out of `seam_readmit_candidates`, which is
exactly the state that returns its remaining tokens to the policy as ordinary
pending prefill and arms the flip to PP. The revoke therefore rides the path
slice 1 proved instead of adding a second way to stop a request, and
`test_a_revoked_request_still_hands_its_tokens_back` is that as an assertion.

TEST RESULTS (desk, CUDA_VISIBLE_DEVICES="", /spinning/htsglang-gpu/.venv):
 * test_seam_credit_revoke_on_recompute_906.py -- 6 passed. Six arms: a
   transport batch that recomputed is revoked (the defect); one that RESTORED
   is not (mutant guard -- revoking every transport batch switches the seam
   off and brings back the W30 livelock the exemption exists to prevent); a
   non-transport batch is never touched; revoking is idempotent; a revoked
   request still hands its tokens back (ANTI-WEDGE); and the revoke refuses
   the NEXT grant at the premise, which is the point of the slice -- it stops
   the FIRST chunk of the next re-admission.
 * Both sgl-project#906 suites together -- 12 passed.
 * MUTATION: M1 the outcome is never checked (the pre-slice-2 behaviour,
   log and move on) -> 3 failed; M2 the revoke ignores the transport claim
   -> 2 failed; restored 12 passed.
 * REGRESSION: every purity/seam/887/890/chunk/transport/conformance/metrics/
   861 suite in managers/ -- 705 passed, 31 subtests, 0 failed. Then
   scheduler/admission/batch/flip -- 899 passed, 234 subtests, 4 failed, all
   four test_phase_flip_rotation_wiring_809 "retry() exceed maximum number of
   retries", re-run on the base 273e1ea and identically red there.
 * ruff parity: metrics_reporter clean before and after.

sgl-project#906 IS NOW COMPLETE: slice 1 bounds the credit by quantity (one chunk, one
grant), slice 2 withdraws it on the outcome that disproves its premise.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 27, 2026
… candidate set that could not see it

THE STRUCTURAL FACT, and it explains two defects at once. `scheduler.py` built
the #943b re-issue's candidate set as `{r.rid: r for r in self.waiting_queue}`.
A chunked continuation is never in the waiting queue: #797b deliberately
RESTORES it as `self.chunked_req`, because that state outlives the round and
putting it back is what stopped boot instr19 dying on `extend_range.end`. So

  * the re-issue could not nominate the request that was stuck -- measured
    `PREFETCH RE-ISSUED` 0 across six boots -- and
  * that request never re-entered through the waiting-queue path where the
    sgl-project#630/sgl-project#944 clamp applies, which is why the offer froze at `told=8192` for
    thousands of passes.

ONE cause, both symptoms, and the FOURTH instance of the compensator
reachability class -- found at the desk by the #944c ratchet rather than on a
boot, which is what that ratchet was built for.

REACHABILITY ARM FIRST, red before any fix code: the candidate set must contain
a chunked continuation. `pp_request_locations` now returns the four places a
request can live -- waiting queue, `chunked_req`, the named slot's chunked req,
running batch -- the SAME enumeration sgl-project#944 walks for the reconcile lookup.
Sharing the list is the point: a fifth place must not be discovered once per
consumer, which is exactly how #797c/sgl-project#798/sgl-project#944 became three tickets for one
class. Every lookup is a getattr, and that is load-bearing rather than
defensive here: this mapping feeds `take_agreed_reissue`, a COLLECTIVE, and a
rank that raised while building candidates would skip an all_reduce its peers
had already entered.

DECIDE AT THE VOID, ACT AT THE CHUNK BOUNDARY. The void is where the group
already agrees, but it fires after the pass was committed and launched --
replanning there rewrites a pass in flight (instr20). `scheduler.py`'s
`add_chunked_req` call site is the one legal point: `add_chunked_req` derives
everything from `len(req.prefix_indices)` and only THEN calls
`set_extend_range`, so nothing about the next chunk is committed and changing
the premise cannot contradict a report that has not been made. sgl-project#906/sgl-project#890 hole 2
already gates that exact site and its own comment establishes the safety.

THE MARK IS STAMPED WITH THE BINDING GENERATION (operator decision). It rides
on the REQUEST, because the rank that must act is not always the rank that saw
the void and #797b restores the same object. Stamped, it survives the chunked
restore (same generation -- the purpose) and invalidates ITSELF on a retract or
cutover (the generation moves, the reader sees it as absent). No
`reset_for_retract` special case and no cleanup path that can be forgotten --
the rule sgl-project#911 already uses for completion routing. `current_generation()` /
`write_back_stamp_is_current()` are module-level in `hicache_phase_binding` and
available at both ends, which was the operator's stated precondition.

RE-FETCH IS PREFERRED, AND IT IS A LAW. `told=0` on the measured rid discards
8192 tokens -- two full `--chunked-prefill-size 4096` chunks -- against a
standing user law that allows at most ONE chunk of loss. The store still holds
the pages, so the escape re-fetches under the current generation and KEEPS the
premise; `told=0` is the bounded last resort for when no fetch can be issued,
and it logs the number of tokens it throws away. A law breach may be necessary;
it may never be silent. The mark is consumed on either branch so the escape
cannot re-fire every chunk.

FOUR FALSIFIER ARMS, all on the real path:
  1 reachability -- the candidate set contains a chunked continuation (red first)
  2 stamping     -- live within a generation, absent once it moves
  3 the law      -- re-fetch preferred, keeps the prefix; `told=0` names its discard
  4 uniformity   -- THREE REAL GLOO PROCESSES, each stamping and reading its own
                    request, before and after the generation moves; a
                    single-process test cannot tell "the generation is global"
                    from "I just wrote this object"

TESTS, per file, each module alone in a fresh process, against the 70bbd98
baseline: 791-congruence 11/11, 630 5/5, 791-wiring 3/3, 798 12/12, 797 31/31,
944-unit 30, 944-gloo 6 (5 + the uniformity arm), 946 11 (new). 109 passed,
0 failed. ruff (F401,F821,UP037), ruff format clean on the touched files;
codespell unchanged from HEAD (2 pre-existing hits in scheduler.py, neither
mine).
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
…ecimens

MEASURED, both arms on tree 0840f82 with byte-identical flags and
byte-identical prompts (same seeds), each point cached_tokens=0 verified,
one request at a time against an idle server, taken in the boot's own
POLICY-driven PP window -- no manual flip involved in any prefill point:

  prompt_tok   arm A TTFT   arm B TTFT   arm B / arm A
      12,038      4.293 s      3.535 s      1.21x faster
      31,908     10.134 s      8.756 s      1.16x faster
      50,251     16.855 s     15.011 s      1.12x faster
      43,084     13.514 s     12.85 s*      1.05x faster
     114,768     47.213 s     44.482 s      1.06x faster

  * the 43k point needed a repeat: first samples 25.2 / 19.3 s, then
    12.860 / 12.838 s back-to-back. The early samples are contaminated by
    HiCache write-back of the preceding 50k/115k prefills. Reported as the
    clean repeat with the noise named, not as the first sample.

VERDICT, reported open as ordered: e2e prefill is 1.05-1.21x, BELOW the
1.39-1.46x the sgl-project#855 microbench measured on the GDN linears. The layer-level
gain is real and the system-level gain is smaller -- the collective floor and
the non-linear phases dilute it. Nobody may now say "1.4x faster" as a system
statement; the honest number is 1.05-1.21x, depth-dependent, and it SHRINKS
with depth on this ladder.

DECODE DEPTH, arm B only, policy-driven TP window, bs=1, ignore_eos:
  depth    0-2000:  52.68 tok/s
  depth 2000-5000:  77.11 tok/s
  depth    5000- :  55.48 tok/s   (7945 of 10000 tokens; the run was cut
                                   short by the livelock below)
No arm A decode comparison exists: arm A wedged before emitting a single
token. The depth axis is therefore ARM-B-ONLY and is NOT an A/B.

KLD, teacher-forced, scripts/int8_368/kld_capture_855.py:
  mean KLD (top-20 truncated, renormalised)      0.018415 nats
  mean |delta logprob| on the actual token       0.106938 nats (exact)
  top-1 argmax agreement                         465/493 = 94.32 %
CONFOUND NAMED: the arm A fingerprint was taken in a PP window and the arm B
fingerprint in a TP window, so reduction order differs and part of this
divergence is LAYOUT, not quantization. These numbers are therefore an UPPER
BOUND on the quantization divergence. The clean same-layout recapture did not
happen because the arm B boot livelocked first. Not comparable to the sgl-project#854
Reddit KLD figures either: those are against Qwen's official FP8 on the HF
path, this is incumbent-INT8 vs gdncov directly.

TWO WEDGE SPECIMENS, and NEITHER is the checkpoint (docs/dev/NOTE_855_wedge_
specimen_{1,2}.md):
  * armA (the OLD checkpoint) wedged after a manual pp_to_tp flip:
    ADMISSION-WEDGE, 1 queued / 0 running / no first token for 438 s, "work
    is admissible and nothing is serving it". Reproduces the fault on the
    incumbent, which is what rules the INT8 artifact out.
  * armB wedged twice on the flip/purity path. Mechanism, and this is the
    part worth keeping: "PHASE-POLICY ARM-UNFUNDED: armed tp_to_pp (pending
    prefill 1 tok > 0 (purity: prefill cannot run in tp, nothing decoding))",
    12x FLIP ABANDONED. The "pending prefill 1 tok" is the DEAD-MAN'S OWN
    /health_generate probe -- the liveness probe arms a flip that strict
    purity then forbids, so the probe triggers the livelock it then detects.
    This is the sgl-project#890/sgl-project#906/sgl-project#942 family, fork-own flip plumbing.
  Both are deletion-candidate findings for that layer under the
  upstream-minimal law, not repair orders from this strand.

DEAD-MAN, answering the "no process remained" question: it FIRED, correctly,
at 05:45:13Z, ~2.5 min after the 05:42:48Z onset. pgrep was empty because a
one-shot waiter EXITS when it fires. Not a miss. Arming now happens INSIDE
the launcher (scripts/int8_368/boot_855_gdncov.sh) with a pgrep proof line,
so it no longer depends on the operator remembering.

HARNESS, the gap the user caught: a livelocked server holds the socket open
and answers nothing, so a streaming read waits forever -- three arms hung
silently and the OPERATOR noticed before the harness did. ladder_855.py now
carries STALL_S=90 / ARM_BUDGET_S=900: no token within the stall window
aborts the arm LOUDLY and moves to the next one.

NOT DONE, and why, so nobody reads absence as a result: the club-3090 quality
suite (started, killed at 26/75 by the first livelock), the coupled
--pp-solve-cut re-solve with fresh census calibration, the TP weight-vector
solve, the HiCache write-through tax arm, and the lm_head boot. The lm_head
ARTIFACT is built and desk-proven (14/14, 26.357 GiB, a further -1.184 GiB)
but has never been booted.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
… die Policy vergleicht

== EIN FEHLENDES ARGUMENT, GEMESSEN STATT VERMUTET ==
`SUBCHUNK-SERVED-IN-TP` feuerte auf boot_855_1011idle NULL Mal, waehrend das
sgl-project#887-Gate 11x gewaehrte und die Policy 10x tp_to_pp auf "pending prefill 51
tok > 0" armte. Alle statischen Terme lasen erfuellbar, also war Weiterlesen
nicht die Antwort: ein Direktaufruf von `decide()` reproduzierte die LIVE-Zeile
byte-genau mit grant=0 und lieferte bei grant=51 die Unterdrueckung -- die
Policy-Haelfte ist korrekt, der Grant kam als 0 an.

WURZEL: `_pending_prefill_tokens(inflight=None)` -- der eigene Docstring sagt
"``inflight`` ... Passing it is what the flip policy MUST do". Die sgl-project#942-Sonde
liegt auf dem Flip-Policy-Pfad und uebergab es NICHT. `recv_requests` wertet
die Policy AUS, BEVOR die Requests in `waiting_queue` stehen (genau deshalb
existiert der Parameter), also mass die Sonde bei einer FRISCHEN ANKUNFT 0,
waehrend die Policy den echten Prompt sah. `0 < 0 < chunk` = False -> Grant 0
-> Unterdrueckung unmoeglich, und zwar fuer genau den Fall, fuer den sgl-project#887
gebaut wurde. Ein bs1-Strom macht ausschliesslich frische Ankuenfte.

== DER SCHNITT: EIN OPTIONALES DURCHREICHEN, EINE REGEL ==
`tp_compute_fits_in_one_chunk(scheduler, inflight=None)`. Default None haelt
JEDEN anderen Aufrufer byte-identisch -- insbesondere das ECHTE GATE
(phase_purity.py:1093) reicht bewusst nichts durch: ein Batch-Builder kann nur
bauen, was wirklich in der Queue steht. Die Fit-Regel bleibt EINE Regel (nicht
dupliziert), sie beantwortet nur je nach Aufrufer die passende Frage.
LECK-FAMILIE UNBERUEHRT (sgl-project#890/sgl-project#906): beide Sonden sind PURE READS,
`_spend_tp_compute_chunk` wird ausschliesslich aus `prefill_blocked_here`
gerufen. Zu sehen ist nicht zu verbrauchen.

== FEHLERKLASSEN-PASSENDE CHECKS ==
* Gefaehrlichste Klasse: `inflight_reqs` nicht im Scope -> NameError, vom
  umgebenden `except Exception` verschluckt -> stiller No-op. AST-geprueft:
  es ist PARAMETER von `maybe_arm_phase_policy` (13020-13664). In Scope.
* Verhalten je Aufrufer, Stand-in-Scheduler:
    frische Ankunft (Queue 0, inflight 51): Gate=False (UNVERAENDERT),
                                            Policy-Sonde=True   <- der Fix
    bereits gequeued (51):                  beide True  (unveraendert)
    ueber einem Chunk (9000):               beide False (Refusal erhalten)
    Legacy-Accessor ohne Argument:          True (TypeError-Fallback haelt)
* Diagnose-Zeile rate-limitiert (unlimitiert: 1457 Zeilen in EINER Zelle);
  Zaehler-Vorlauf per Direktaufruf belegt (3 nach 3 decide()).
* sgl-project#1011-Nichtregression per Direktaufruf: CASE1 refuses, CASE3 flips.

== ZELLEN (gleiche Harness, greedy, 600 tok, fuehrendes Unique-Token) ==
  Zelle            vorher (bc43f0d)      nachher (dieser Commit)
  bs1              25,09  n=5  Spr. 4,1%    72,0   n=7  Spr. 69,0%
  conc=4           88,64  n=3  Spr. 3,4%    134,93 n=3  Spr. 100,8%
  Flips/bs1-Zelle  12 auf 6 Requests        3
  SUBCHUNK-SERVED  0                        10
KEIN DOPPEL-PREFILL: `cached_tokens` ist in JEDEM Lauf 0, in schnellen wie
langsamen -- der Grant-Pfad fuehrt keinen Re-Prefill ein (sgl-project#939 unberuehrt).
EHRLICHE SCHRANKE: die Verteilung ist BIMODAL (bs1-Laeufe 67-80 tok/s, mit
einzelnen bei ~23), daher die grosse Spreizung. Der Median bewegt sich stark,
die Streuung ist NICHT Rauschen sondern zwei Regime -- welcher Anteil der
Requests noch ins alte Regime faellt, ist offen und nicht von diesem Commit
beantwortet.
BELEG-STUFE: BOOT-BEWIESEN (boot_855_942c, boot_855_942cfinal).
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.

2 participants