Repository navigation
Fix readme - #1236
Merged
Merged
Fix readme#1236
Conversation
may mix with Chinese
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
Sep 9, 2026
…terminal; sample r_D on concurrency The two gates boot weg2sb5g (`80de2d31d1`, 07:06-07:27Z) failed. Both are on the sgl-project#1289/sgl-project#1290 line and both are mine. The five that passed are recorded in the boot record; sgl-project#1288's loopback trust (0 x 401), sgl-project#1290's route bases (53 LONG) and sgl-project#1289's flip_s sampler (`flip_s source=live n=1,2`) all held. ====================================================================== GATE 4 -- LEG 2 IS STILL A W50 CANDIDATE, AND THE REQUEUE LOOPS TO 503 ====================================================================== 53 LONG routes, **3 served** (natural 1/27, salad 2/26), 50 x 503 after 32-64 s. `W50_Weg2TpPrefillExceeded` 104, `W50_requeue` 54, `W35_Weg2XReQueueLoop` 50, and the sgl-project#1290 one-shot refusal was never reached: **0 anchored 413, 0 W52**. (Method note carried from the boot agent: a bare `grep 413` returns 11 hits on the front log, every one a digit coincidence inside `queued_uncached=41356`; anchored on the HTTP status the count is 0 and the driver's own census agrees, `{200: 3, 503: 50}`.) ROOT, from D's own log, per request: W50 Weg2TpPrefillExceeded rid=a977bd8d87154067913632f1b8a81f09 uncached=24657 X=8742 PHASE-PURITY STORE WITNESS OBSERVATION (n=22) rid=a977bd8d... phase=None pp_rank=0 state=unprobed stamp `uncached=24657` is the WHOLE prompt -- D priced it as if P had never run -- and the witness says the store was never probed for that rid. `WEG2 X-DEFER`, the completion predicate that exists precisely to hold a request whose store read is still in flight (`scheduler.py::_weg2_x_defers`), fired **ZERO** times in the entire boot, so there was no pending read to wait for: the abstain branch (`pending_ms is None` -> never defer) took every request. D's census: X-GATE `verdict=W31` 312 / `admit` 84, `replicated_term=group` 396/396; store witness `cold` 99 / `hit` 18 / `unprobed` 75. So the P prefill's result never reached D -- and the front's answer was to run the SAME P prefill again. The bet the requeue exists to place had already been placed and lost on this exact request. THE FIX IS THE RULE: **a completed P leg 1 makes the next W50 terminal.** `_requeue_after_x_refusal` now refuses by name (W53 Weg2StoreHandbackFailed) with HTTP 413 and the numbers, before any requeue bookkeeping. W53 is deliberately NOT W52: W52 is "no route can serve this" (a sizing fact known at admission), W53 is "the route ran and its result did not reach the group that needed it" (a store/carrier fault found afterwards). Different faults, different repairs, different names. W53 is free -- the used set is W50/W51/W52, enumerated before choosing. The refusal names the evidence to collect next (D's STORE WITNESS state for the rid, `unprobed` = no read was ever issued), so the next boot does not re-derive this. SECOND FINDING, STATED AND DELIBERATELY NOT FIXED HERE. `sgl-project#1236 Store >= P-Pool` is violated on this form: P's pool is 304,655 tokens and its per-token KV across the three PP ranks is 22528 + 4096 + 6144 = 32,768 B, so a full pool is **9.30 GiB** against a store configured `{"max_size":"5G","min_free_space":"1G"}` -- ~4 GiB usable. WHICH REPAIR: size it, not refuse. A hard launch refusal would block every boot on this rig for a fault that only bites the LONG route, which W53 now terminates honestly in one shot instead of 32-64 s; and the arithmetic says sizing is not the proven cause of THIS rid's `unprobed` anyway (one 24,657-token prompt is 771 MiB and fits four times over). It is a real second fault at this arm's concurrency. Sizing lives in `launcher.py`, which this branch does not touch and cannot test on metal in this window, so it goes to that owner with the arithmetic pinned in `TheSb5gArithmetic` rather than half-done here. ====================================================================== GATE 5 -- r_d IS NEVER SAMPLED, SO X CAN NEVER RE-SOLVE ====================================================================== `WEG2 X RE-SOLVE` 0 across 64 flips -- and sgl-project#1289's own instrument named the starved term, which was the point of that ticket: WEG2 X NO-SOLVE: no r_d sample yet, so X stays at the carried-in 8742 (flip_s source=live n=2; have r_d=0 r_p=1 flip_s=2) ROOT, `front.py::leg2`: if verdict in ("single_prefill", "short_mispriced") and _unc > 0 and _w > 0: self.note_x_sample("r_d", _unc / _w) Both admitted verdicts are EXCEPTIONAL -- `single_prefill` is route CARRIER-EXCEEDS, `short_mispriced` is a SHORT the front UNDER-priced. The ordinary well-priced SHORT returns `serve` (`_leg2_verdict`), and `serve` was excluded. sb5g's front-log census: `verdict=serve` 24, `verdict=short` 20, and ZERO of either admitted verdict against 84 admitted D prefills. The gate was also incoherent: `short_mispriced` is a seated SHORT at exactly the same concurrency as `serve`, so it admitted and excluded the same physical situation depending only on how the front had priced it. r_D is D's PREFILL rate -- tokens over the wall of a prefill D ran ALONE -- so the qualifying property is CONCURRENCY. It is now measured directly and EXACTLY: `_d_admissions` (every arrival at D) not moving across the window rules out an arrival that came and went inside it, which two `len(outstanding)` snapshots cannot. A rejected sample increments `r_d_skipped_concurrent`, so an empty deque can be told from an emitter that never ran -- the denominator law. AND THE SAMPLE THAT COMPLETES THE TRIPLE NOW RESOLVES IMMEDIATELY. Without that, an `r_d` arriving last (exactly sb5g's order) would wait for the next flip or the eighth drain, so the term that was missing all boot buys nothing on the pass that finally supplies it. PROVENANCE: `r_d source=live|none n= src=` joins `flip_s source=` on all three X decision lines and in `/weg2/state`. One word ("no r_d sample yet") located this defect; r_D now carries the same. TESTS, red-first by name: `test_weg2_handback_rd_1291.py`, `ACompletedLegOneMakesTheRefusalTerminal::test_red_first_the_requeue_ terminates_after_a_completed_leg_one` and `RdIsSampledOnConcurrencyNotOnAVerdict::test_red_first_the_ordinary_serve_ verdict_is_no_longer_excluded`. The sb5g numbers are the fixture. MUTANTS, four on gate 4's danger direction (OVER-refusing, since this fix adds a terminal verdict): (1) a request with no leg 1 still gets its one requeue -- the bet has not been placed for a SHORT or CARRIER-EXCEEDS arrival and the re-offer is correct; (2) `pending is not None` alone is NOT the condition: a CARRIER-EXCEEDS arrival carries a Pending with `skip_leg1=True` and `leg1_done` False, and gating on the Pending's presence would refuse it wrongly; (3) the W52 estimate rule (sgl-project#1290 round 2) is not swallowed by W53; (4) the terminal check must precede both the X-REQUEUE line and the W35 branch, or the counters record a lap that never happened. Three on gate 5's danger direction (admitting a CONCURRENT wall, i.e. re-introducing sgl-project#1271 (a)'s latency-as-rate): (5) a concurrent leg 2 is still refused AND counted; (6) a snapshot-only witness is unsound -- the admissions counter must be in the conjunction; (7) a zero/negative sample is still ignored. Plus `test_the_counter_is_initialised_in_the_constructor`, because a hand-built Front in a test is not proof that the real one has the field. METAL PROOF OWED (UNPROVEN): `W53` > 0 with 413s replacing the 503 loop and `W35_Weg2XReQueueLoop` = 0; `r_d source=live n>=1` by the second flip and `WEG2 X RE-SOLVE` > 0; served fraction on the LONG arm above 3/53. Author: efschu
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 9, 2026
…meter is a str, not a float Boot weg2sb5h died pre-launch at ring_table.p_form_key: 4c06811 changed the store parameter of common_flags/argv_p/argv_d from store_gib: float to store_cfg: str (the rendered extra-config JSON) and left the form-key path (launcher.py:6684, :6571) passing RING_FORM_SENTINEL_STORE_GIB = -1.0 and five helper call sites passing the literal 1.0; the float reached _flag_pairs and .startswith() raised AttributeError, zero groups started. Fix: RING_FORM_SENTINEL_STORE_CFG (an impossible JSON string; the flag is in FORM_KEY_EXCLUDED_FLAGS so the value never enters the key) at all seven sites. In-process check (CVD='', no GPU): argv_p/common_flags with the sentinel are all-str, p_form_key resolves, the three helpers return. Class: stale call site after a signature change (same shape as the vars() second producer). Remote suites: the store agent's set already covers these helpers only through the shipped-argv path — a hermetic pin for the form-key path is owed (test agent).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 10, 2026
USER VERBATIM 2026-09-10 ~04:4xZ: "das ist nicht akzeptabel und widerspricht dem design." The forced route was an operator-sanctioned soft-rule deviation from law 4; the user has vetoed it. Reverted in full. EXACT REVERT, verified rather than asserted: `git diff 1c29ac3 --stat` over the working tree is EMPTY, i.e. every file the three sgl-project#1317 commits touched is byte-identical to the pre-sgl-project#1317 tip. Reverts: 2154f9e front: forced_direct + W68 + --max-kv-per-request plumbing bd451fa D: exempt_no_carrier_route arm (and its strip of the dead flag, which had itself only existed inside this deviation) 9b0430c the sgl-project#1290 guards re-pointed at the moved rule NET STATE, each property checked in the same commit rather than assumed: * front `serviceable_route` returns "none" for the band again -> 413 W52; no `forced_direct`, no W68, no `--max-kv-per-request` plumbing (its only purpose was that route's terminal, so it goes with it -- keeping it would have left an unreachable branch and a dead flag on the front and the launcher); * D's `exempt_no_carrier_route` arm and `_weg2_carrier_limit_tokens` are GONE; * D's PRE-EXISTING carrier-exceeds exemption (`uncached > carry`, sgl-project#1290 R-3) is UNTOUCHED -- it is not part of this deviation, it fired 42x on boot weg2sn5u for the fleet's cold long prompts, and the user is being asked about it separately; * the Q0 give-back (`release_admission_acquired_mamba_slot`, 3 call sites) is UNTOUCHED -- a different ticket, still fixed; * `test_weg2_no_route_1290.py` is back to its ORIGINAL assertions and the band guard I added to it is deleted, so the suite guards the rule as written; * both sgl-project#1317 test files are deleted. THE FLEET-FACING COST RETURNS, and it should be stated plainly rather than discovered again: an exact-count REPEAT whose total exceeds carrier_max (27466) and whose uncached extent exceeds X gets HTTP 413 `W52 Weg2NoServiceableRoute`. Measured on boot weg2sn5t, that was 15 of 24 fleet-shape requests -- a cache hit makes the request worse than a cold one. That is now the expected, design-conformant verdict until the CARRIER itself is fixed. The design-conformant fix is pending a user decision; the registered direction is sgl-project#1236's staging knob after the VRAM exchange (unfundable today at +10.24 GiB, because the host rings scale with s_gb).
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 10, 2026
…ator set it USER ORDER 2026-09-10, verbatim: "der l3 auf der platte hatte ich mal auf 150gb groesse festgelegt, nicht 28gb". WHY A NEW FLAG AND NOT AN EXISTING ONE, since the brief said prefer the existing knobs and say which was used: neither existing knob can express this. sgl-project#1236 derives `max_size = P pool bytes x --store-sidecar-factor`, and that factor is a MEASURED census ratio (3.02, from boot weg2sb5g's own store census, provenance recorded beside the constant). Bending it to hit 150 GB would need ~9.92 and would turn a measured ratio into a size knob -- and worse, it would peg the store's size to the P cut: re-solve the cut and the store silently moves. The derived figure answers "how big must the store be to hold one prefill leg plus its sidecars" (a FLOOR); the user is stating a DISK BUDGET. Two different questions, so two knobs. `--store-disk-min-free-gib` is the other existing flag and is about the disk's reserve, not the store's size. In GB (10^9): the unit the user used and the unit HiCacheFile's `max_size` already speaks. Default 0 = derive exactly as before, so a boot that does not pass it is unchanged. THE sgl-project#1236 FLOOR STILL BINDS. A store below the P pool cannot hold what one prefill leg produces -- boot weg2sb5g logged that refusal 1,324 times -- so a user value under the pool is REFUSED BY NAME (W57) with the minimum spelled out, never silently clamped. An operator asking for less than the law allows should be told, not overridden. Current serving base for scale: P pool 461690 tokens x 32768 B = 14.09 GiB, x3.02 = 42.5 GiB derived (the "28gb"-class figure the user is correcting). 150 GB against /spinning: 601 GiB available, so 150 GB + 32 GiB min_free is funded and W57's disk check passes. Tests: 5 cases -- the user-set size ships verbatim; the derived path is unchanged when the flag is absent; below the pool is refused by name and the refusal names the fix; the absolute size is NOT also scaled by the factor; min_free stays independent. ruff clean.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 10, 2026
… longer prove TestWeg2dk5WouldHaveBeenNamedBeforeItBooted was named for "the arm that died is still refused". That sentence stopped being true at sgl-project#1318, and the test's own comments said so while still asserting a launch-leftover number instead. The reap currency moves that number again (+2.70 -> +14.70), so the choice was to edit a constant a third time or to pin what the suite can actually prove. MEASURED ATTRIBUTION of weg2dk5's death (2026-09-07 21:15:30Z), all from that boot's own instruments rather than from this tree: measured non-reclaimable 94.80 GiB (anon 42.16 + shmem 52.65, memts_weg2_weg2dk5.csv 21:15:30Z; cg_current 95.93) predicted run peak 83.66 GiB at dk5's own arm and ring table gap 11.14 GiB, decomposed without residue: 5.10 GiB tmpfs page store -> sgl-project#1236 put it on a ZFS directory, so it is page cache/ARC and no longer shmem in this cgroup (BOOT_weg2dk5_0907.md: "the store held 5.1 GiB in tmpfs ... tmpfs is shmem") 7.68 GiB interleave anon -> C19 charges Sigma H (32.19 GiB) once in place of image + flip transient (38.63 + 9.97), and the anon delta that killed dk5 was exactly that transient (+8,056,452 kB across memts 21:15:20 -> 21:15:30, with shmem FLAT) reconstruction 82.02 GiB, 1.64 GiB BELOW the prediction, so the ledger errs conservative on the box that died. dk5 died in the RUN moment (flip epoch 9, waking D's weights_2, 7 min 47 s after launch and after ten served requests) in a NON-RECLAIMABLE class, with page cache at 28.2 MiB. The launch-side currency change therefore cannot be what makes its arm fundable -- the two removed terms are. THE SAFETY PROPERTY: the arm is fundable only because both terms are gone, so the test fails if either returns -- a tmpfs (shmem) store charged into this cgroup, or a residency model charging image + transient instead of one Sigma H. The PRE-C19 form is deliberately not asserted: it cannot be priced at all now (W20 "the host weights term has no measured source ... there is no third option"), which is a missing-source refusal and would pin nothing.
efschu
pushed a commit
to efschu/htsglang
that referenced
this pull request
Sep 28, 2026
…en persistenten L3-Store nicht mehr sgl-project#1236 raeumte beim Teardown store_dir per rmtree -- aus der Zeit des Stores je Boot. Mit L3P ist store_dir das persistente l3-<profil>-<modell>-<id>-Verzeichnis: b1 loeschte beim Stopp 6,5 GB / 172795 Dateien (teardown.log 'store dir ... removed'), b5 fand identity=new files=0. l3_persistent_store() (l3-Name oder L3_IDENTITY.json) haelt es; der Store je Boot ohne L3P geht wie bisher. Test test_weg2_l3_teardown_keep_0928.py: Basis 8340ee4 rot (Modul-Attribut fehlt), Fix 4/4.
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.
may mix with Chinese
Motivation
Modifications
Checklist