Skip to content

Update readme - #769

Merged
merrymercy merged 1 commit into
mainfrom
update-readme
Jul 27, 2024
Merged

merrymercy merged 1 commit into
mainfrom
update-readme

Conversation

@Ying1123

Copy link
Copy Markdown
Contributor

No description provided.

@Ying1123
Ying1123 requested a review from merrymercy July 27, 2024 13:11
@merrymercy
merrymercy merged commit 9f95dcc into main Jul 27, 2024
@merrymercy
merrymercy deleted the update-readme branch July 27, 2024 13:12
timethink pushed a commit to timethink/sglang that referenced this pull request Mar 9, 2025
litmei pushed a commit to litmei/sglang_litmei that referenced this pull request Jun 16, 2026
Add --grammar-backend,BenchServing testcase
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
…3080s are the wall

INSTRUMENTED BOOT (boot_855_regime_0840f82601_0830_090705): --regime-controller
observe + SGLANG_REGIME_OBSERVE=1 + --kv-pressure-consensus-interval 1. That
combination is the knob I had located: the split is produced at
metrics_reporter.py:470-497 and consumed via regime_runtime.rank_split_ms_from
(:1666); without the controller running it is never read. Coverage went from
~3 hits to 10,158 REGIME-OBSERVE lines and 57 measurable prefill batches.

THE BUDGET, one 50k prefill (23.484 s TTFT) + one 12k (3.945 s), n=19 prefill
batches per rank, 62,254 tokens seen by every rank (PP: all ranks see all
tokens, each owns its layer slice):

  rank        compute      wait     pure-compute rate
  PP0 (5090)   5,657 ms    0.0 ms      11,005 tok/s
  PP1 (3080)  15,334 ms    0.0 ms       4,060 tok/s   <- PACER
  PP2 (3080)  12,722 ms    0.0 ms       4,893 tok/s
  ALL         33,713 ms    0.0 ms      wait share 0.00 %

(1) WAIT IS ZERO ON EVERY RANK, EVERY BATCH -- 57/57 samples. There is no
collective or pipeline-bubble term in prefill on this boot form. That
FALSIFIES the hypothesis I have been carrying since the microbench, that "the
collective floor eats the layer-level gain". Whatever eats it, it is not
collective wait. The wait-by-family decomposition emitted nothing for the same
reason: with wait 0.0 there is no family to attribute.

(2) THE PACER IS PP1 AT 4,060 tok/s OF PURE COMPUTE. PP0 is 2.7x faster
(11,005). Under PP the world rate cannot exceed the slowest stage, so the
5090 spends most of the prefill waiting on a 3080 -- structurally, not through
a measurable wait term, because each rank's batch is timed in isolation.

(3) AN ASYMMETRY BETWEEN TWO IDENTICAL 3080s: PP1 15,334 ms vs PP2 12,722 ms
for the SAME 62,254 tokens -- 21 % apart on identical hardware. That is the
[32,18,14] layer split showing up as time: PP1 carries 18 layers, PP2 carries
14. The cut is balanced for MEMORY and not for TIME, and PP1 pays for it.

(4) COUNT-CHECK AGAINST WALL, with the residue named honestly: the pacer spent
15,334 ms of prefill-batch GPU time against 27,429 ms of measured wall
(23.484 + 3.945 s). So 56 % of wall is attributed prefill compute and
44 % (12,095 ms) is UNATTRIBUTED by this instrument. The instrument covers
"Prefill rank batch" GPU time ONLY -- not tokenization, scheduling, the HTTP
path, HiCache write-back, or the gaps between chunk batches. I am NOT calling
that residue overhead; it is unmeasured, and naming it is the point.

WHAT THIS MEANS FOR THE 3.4k vs 5.1k QUESTION: the e2e ladder measures
2,140-3,042 tok/s while the pacer's pure compute is 4,060 tok/s. The gap is
therefore NOT collectives. It is (a) the 44 % unattributed wall, and (b) the
3080 pacer itself. A 19.08-era comparison still needs the old log decomposed
the same way; I have not done that and do not claim the diff.

Serving restored to standard form afterwards: world 591,726 (within the
+/-5.3 % boot-to-boot band this strand measured), coherent, deadman armed.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
…budget, lm_head retry recipe, queue, traps
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
… time imbalance halves, at no capacity price

QUEUE ITEM 2 -- DECISION BOOT, ANSWERED YES.
Boot: /spinning/evidence-665-f1/boot_855_makespan_0840f82601_0830_093650.log
Form: gdncov checkpoint, rank_mib 31800,18800,19800, cut [32,17,15] attn
[8,4,4], with the sgl-project#769 instrument knob set (--regime-controller observe +
SGLANG_REGIME_OBSERVE=1 + --kv-pressure-consensus-interval 1).
`--pp-stage-ratio` is the deterministic route here: it is a VALIDATED
OVERRIDE and MUTUALLY EXCLUSIVE with `--pp-solve-cut` (server_args.py:
16611-16621), so the solver cannot be asked for the same cut in one boot.

THE QUESTION (§2 of the handover): the [32,18,14] cut showed a 21 % compute
imbalance between two IDENTICAL 3080s -- the cut is balanced for memory, not
for time. Does the makespan cut address it?

MEASURED, compute-honest instrument (`Prefill rank batch ... (compute X,
wait Y)`), FULL CHUNKS ONLY (4096 tok; the mode, not the max), n=29 samples
per rank, 118,784 tokens seen by every rank:

  rank         compute     wait    pure-compute rate
  PP0 (5090)   12,035.0 ms  0.0 ms   9,870 tok/s
  PP1 (3080)   30,900.2 ms  0.0 ms   3,844 tok/s  <- pacer
  PP2 (3080)   28,492.9 ms  0.0 ms   4,169 tok/s

  3080 imbalance: 8.45 %   (was 20.53 % on [32,18,14], §2: 15,334/12,722)

THE COMPARABLE QUANTITY IS THE RATIO, NOT THE ms. The two boots ran
different token totals (118,784 vs 62,254) and different chunk mixes, so
the absolute compute figures are not an A/B. The imbalance is dimensionless,
same instrument, same rank pair, same hardware -- that one compares, and it
more than halves.

CAPACITY PRICE: NONE MEASURABLE. World (min over ranks) 592,677 vs 591,726
on the [32,18,14] std boot = +0.16 %, far inside the mandatory +/-5.3 %
boot-to-boot band. The predicted -3.9 % pool delta did not show up above
noise, so the cut is free on this axis.

WAIT IS ZERO AGAIN: 0.0 ms on 105/105 rank-batch samples, now on a SECOND
cut. The "collective floor eats the gain" thesis stays falsified for prefill
on this boot form, and it is no longer a single-cut result.

COHERENCE: /generate greedy "The capital of France is" -> " Paris." Serving
is UP on this form.
e2e ladder, unique-token-leading prompts (cache hit impossible by
construction), wall-confounded instrument, stated as such: 12,024 tok in
13.241 s; 49,948 tok in 14.584 s.

EVIDENCE TIER: BOOT-PROVEN, n=29 full chunks per rank.
NOT CLAIMED: that the halved imbalance shows up as e2e throughput -- the
44 % unattributed residue of §2 is untouched and is queue item 3.
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
…eite, nicht Abwesenheit von Warten

NUTZER-FANG 2026-08-30, woertlich: "aber wenn die 5090 12,035.0ms computed
und die 3080er 30, dann sollte da doch ein wait von 18 sein und nicht 0?"
Die Frage ist richtig, meine Meldung war falsch gerahmt. Das korrigiert
acac781 (dieser Strang, heute) UND die §2-Rahmung des Handovers.

WAS DAS FELD WIRKLICH MISST -- am Produzenten gelesen, nicht interpretiert:
scheduler_components/metrics_reporter.py:466-472
    args += [max(gpu_s - wait_s, 0.0) * 1000.0, wait_s * 1000.0]
mit dem Kommentar darueber (:468-470): "the collective spans are measured
INSIDE THE FORWARD WINDOW". Also:
  gpu_s   = das Forward-Fenster dieses Rangs
  wait_s  = Summe der KOLLEKTIV-Spannen INNERHALB dieses Fensters
  compute = gpu_s - wait_s
`wait` ist damit NCCL-Zeit INNERHALB eines Forwards -- NICHT Leerlauf
zwischen Forwards. Ein PP0, der seine Layer-Scheibe frueh fertig hat und auf
den naechsten Microbatch wartet, ist ausserhalb des Forward-Fensters: die
Zeit ist nie in gpu_s, kann also strukturell nie in wait erscheinen. Eine
Null dort ist eine Eigenschaft der Fenstergrenze, keine Aussage ueber
Pipeline-Leerlauf. Klasse `instrument-text-luegt` (A: der Text beschreibt
nicht, was das Instrument tut) -- dritter Fall an einem Tag.

WAS ICH ZU BREIT BEHAUPTET HABE: "wait 0,0 auf 105/105 Samples -> die
Kollektiv-Boden-These ist falsifiziert". Zulaessig ist nur die schmale
Fassung: INNERHALB der Forward-Fenster liegt keine messbare Kollektivzeit.
Ueber den Bubble sagt das nichts, und ich habe es so praesentiert, als
warteten die Raenge ueberhaupt nicht.

WO DIE ~18 s TATSAECHLICH LIEGEN -- unabhaengig gemessen, Chunk-Grenz-
Zerlegung desselben Logs (Queue-Posten 3, Desk-Haelfte), 39 Chunks/Rang,
Intra-Request-Grenzen (Request-Grenzen > 5 s ausgeschlossen und gezaehlt):

  Rang   compute    Intra-Req-Gap        compute+gap
  PP0    13.96 s    23.18 s  (n=29)      37.14 s
  PP1    35.63 s     6.62 s  (n=14)      42.25 s
  PP2    32.60 s     9.23 s  (n=16)      41.83 s

Genau die vom Nutzer vorhergesagte Groesse, nur unter anderem Namen
verbucht: PP0 hat den GROESSTEN Gap und die kleinste Compute-Zeit. Die
Compute-Differenz PP1-PP0 = 21.67 s steht der Gap-Differenz PP0-PP1 =
16.56 s gegenueber -- gleiche Groessenordnung, umgekehrtes Vorzeichen. Und
compute+gap ist ueber die Raenge fast gleich (37.1/42.3/41.8) gegenueber
compute allein (14.0/35.6/32.6). Das ist die Lockstep-Signatur: der
Ueberschuss des schnellen Rangs erscheint als Chunk-Gap.

SCHRANKE DER ZAHLEN, benannt statt geglaettet: von 38 Grenzen je Rang
fielen bei PP1 16 und bei PP2 14 auf einen NEGATIVEN Gap (Compute laenger
als der Wanduhr-Abstand der Log-Zeilen = ueberlappende Forwards) und sind
ausgeschlossen. Der Gap ist damit fuer die Pacer-Raenge UNTERSCHAETZT und
fuer PP0 (0 negative Grenzen) vollstaendig. Die Richtung des Befunds wird
dadurch nur staerker, nicht schwaecher.

FOLGE FUER sgl-project#769: die "44 % unattributed" sind zu einem grossen Teil KEIN
mysterioeser Overhead, sondern der PP-Bubble -- und er ist messbar, nur
nicht ueber das wait-Feld. Damit ist Queue-Posten 3 desk-seitig beantwortet
und der sgl-project#692-Arm (pp_async_batch_depth) hat eine Zielgroesse.

BELEG-STUFE: DESK-BEWIESEN am Produzenten-Code (file:line oben) +
BOOT-GEMESSEN an der Gap-Zerlegung
(boot_855_makespan_0840f82601_0830_093650.log, n=39 Chunks/Rang).
efschu pushed a commit to efschu/htsglang that referenced this pull request Aug 30, 2026
…TIGT -- der Makespan-Cut bezahlt Balance mit Welt. Posten-2-Verdikt KORRIGIERT.

Einschub-Boot boot_855_arena3218_0840f82601_0830_103720.log, [32,18,14]/[8,4,4],
sonst byte-gleiche Flags, sgl-project#1026-Zeile und Regime-Instrument mitgefahren.
Verdikt-Regeln (a)-(d) des Koordinators vorab festgenagelt, hier abgearbeitet.

== (a) PRIMAERE LESEGROESSEN, [32,18,14] gegen [32,17,15] ==

  Groesse                    [32,18,14]      [32,17,15]     Delta
  PP2 Arena-Tail             1126.95 MiB     1493.22 MiB    -366 MiB (-24,5%)
  PP1 Arena-Tail              167.02 MiB        0.00 MiB
  PP0 Arena-Tail              436.45 MiB      436.45 MiB    unveraendert
  PP2 Pool (der Binder)        637.726         533.333      -16,4%
  Welt (min ueber Raenge)      618.778         533.333      -13,8%
  Bindender Rang               PP0             PP2          WECHSELT
  unaccounted wr0/1/2      +3.013/+3.684/+2.440   +3.013/+3.617/+2.507

== (b) VERDIKT: BESTAETIGT, beide Bedingungen erfuellt ==
PP2s Arena-Tail faellt materiell (-24,5%), UND die Welt ist trennbar: -13,8%
liegt ueber dem gemessenen ~10%-Welt-Varianzboden, und am BINDER ist es
eindeutig -- PP2s Pool ueber zwei Boots je Arm:
  [32,17,15]: 533.333 / 592.677   (Spanne 533-593k)
  [32,18,14]: 637.726 / 635.826   (Spanne 636-638k, 0,3% auseinander)
Die Spannen ueberlappen NICHT, und die [32,18,14]-Stichprobe ist eng. Der
Arena-Tail selbst ist ohnehin keine verrauschte Groesse (die Probe meldet
derived == measured, Fehler 0.00).

== (c) DER PREIS DER GEGENRICHTUNG, wie verlangt beziffert ==
Gleiche Ladder wie beim Makespan-Boot (74k/12k/50k), volle Chunks (4096):

  Rang   [32,18,14] n=32      [32,17,15] n=29
  PP0    13.271,8 ms           12.035,0 ms
  PP1    34.858,4 ms  Pacer    30.900,2 ms  Pacer
  PP2    29.869,7 ms           28.492,9 ms
  3080-Imbalance   16,70%              8,45%
  Pacer-Rate      3.760 tok/s         3.844 tok/s   (+2,2%)

Der Makespan-Cut HALBIERT die Imbalance-Kennzahl -- das war richtig gemessen.
Aber der Pacer gewinnt dabei nur 2,2%, und das liegt INNERHALB des
Decode-/Mess-Rauschens dieses Rigs. Die Kennzahl bewegt sich, der Durchsatz
nicht. Bezahlt werden dafuer 13,8% Welt.

== SELBSTKORREKTUR (vierte heute, und die folgenreichste) ==
Mein Posten-2-Commit acac781 verkuendete den Makespan-Cut als Gewinn "at
no capacity price", gestuetzt auf Welt 592.677 gegen 591.726 = +0,16%. Dieser
Vergleich war WERTLOS: er lag in einem Rauschen von ~10%, das ich selbst erst
danach gemessen habe (A/A-Paar), und er war zusaetzlich durch die
Seam-Record-Vererbung konfundiert. Sauber gegengetestet kostet der Cut 13,8%
Welt und 16,4% am Binder. Das Verdikt "Makespan-Cut ist ein Gewinn" ist
HIERMIT ZURUECKGEZOGEN. Es war ein Handel, und auf einem Kapazitaets-Strang
ist es derselbe schlechte Handel, den ich beim TP-Vektor-Arm 42,11,11
abgelehnt habe -- ich habe ihn dort erkannt und hier nicht, weil dort die
Zahl gross war und hier im Rauschen lag.

== EMPFEHLUNG FUER DIE SHIPPING-FORM: [32,18,14] ==
Serving steht bereits darauf (dieser Boot). Die Abnahme-Suite sollte auf der
Form laufen, die wir ausliefern -- also auf dieser, nicht auf dem Makespan-Cut.

== (d) MESSBASIS FUER sgl-project#1019 ==
Der Objective-Rebuild des Planner-Agenten bekommt hiermit einen zweiten
Datenpunkt, an dem BEIDE Objectives falsch liegen: makespan waehlt
[32,17,15] und optimiert eine Kennzahl, die sich nicht in Pacer-Durchsatz
uebersetzt, waehrend die Welt 13,8% faellt. Die fehlende Groesse im
Kostenmodell ist der ARENA-TAIL: er ist cut-abhaengig, deterministisch und
trifft genau den Rang, der die Welt bindet. Ich baue daran NICHT weiter.

BELEG-STUFE: BOOT-GEMESSEN, n=32 volle Chunks je Rang fuer Compute, n=2 Boots
je Arm fuer den Binder-Pool, n=1 je Arm fuer Arena-Tail (deterministische
Groesse). Kein Suiten-Lauf.
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.

4 participants