Skip to content

ci: add nightly eval - #1291

Merged
zhyncs merged 1 commit into
mainfrom
ci
Sep 1, 2024
Merged

zhyncs merged 1 commit into
mainfrom
ci

Conversation

@zhyncs

@zhyncs zhyncs commented Sep 1, 2024

Copy link
Copy Markdown
Contributor

Motivation

add Llama 3.1 8B for test

This PR will continue to be improved upon.

Modifications

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@zhyncs
zhyncs merged commit 6487ef6 into main Sep 1, 2024
@zhyncs
zhyncs deleted the ci branch September 1, 2024 17:19
@zhyncs

zhyncs commented Sep 1, 2024

Copy link
Copy Markdown
Contributor Author

@zhyncs

zhyncs commented Sep 1, 2024 •

Copy link
Copy Markdown
Contributor Author

ref
main...ci
#1272

TODO

  • add more models

TP1:
meta-llama/Meta-Llama-3.1-8B-Instruct
mistralai/Mistral-7B-Instruct-v0.3
deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct
google/gemma-2-27b-it

TP2:
meta-llama/Meta-Llama-3.1-70B-Instruct
mistralai/Mistral-7B-Instruct-v0.3
Qwen/Qwen2-72B-Instruct
Qwen/Qwen2-57B-A14B-Instruct

  • add result threshold verification

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
REFUTER A MF-1. The W52/W53/W54 -> W57/W58/W59/W60 renumber moved every
form the census reads (emitter, counter key, concatenation) and left
SEVEN bare-number strings in shipped launcher prose, four of which now
name a LIVE DIFFERENT refusal: W52 is Weg2NoServiceableRoute (sgl-project#1290) and
W53 is Weg2StoreHandbackFailed (sgl-project#1291) at this tip, so a human grepping
either number in the source or a boot log lands on the wrong exception.

The census cannot see these by construction -- the pattern is
"W<nn> Weg2<Name>" and a docstring that opens "W52: the disk cannot
fund ..." carries no name -- which is exactly the channel
test_weg2_wcode_uniqueness_1263.py's own docstring says the guard is for.

Class docstrings of Weg2StoreDiskRefused and Weg2StoreArcRefused now open
with their real numbers and state the renumber and the holder that kept
the old one; the plan_store / arc_preflight_line / --store-* argparse
prose follows. Weg2ChunkCardMismatch W52 -> W59 and
Weg2CarrierFloorUnreachable W54 -> W60, same treatment.

Two siblings: the argparse help pinned "front.py:556's 'W52 is free'
comment" at a line that is now 560 -- the pin drops, the file stays; and
the teardown funnel test fabricated a third W53 holder
("W53 Weg2TpOperatingPointDisablesUnevenAxis") plus a bare "W53 fake
post-spawn refusal". Both now use W45 Weg2CarrierCensusRefused, a REAL
post-spawn refusal of this tree, which the test's own docstring already
enumerates.

Census unchanged: 51 codes, the five KNOWN collisions, no new one.
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