Repository navigation
Support Triton fp8 e5m2 kv cache - #1286
Conversation
|
Nice work! |
|
ref #1156 |
|
hold on, we should also verify on H100 |
|
Note: the current fp8 prefill kernels in flashinfer is a mixed-precision kernel (upcast fp8 K/V to fp16 inside kernels and use fp16 tensor cores), which is slow because of the online dequantization overhead, and it's different from the triton kernel logic here (where you downcast fp16 query to fp8 and use fp8 tensor cores). The native fp8 prefill attention kernel in flashinfer will land together with fa3, where we use fp8 tensor cores, but the accuracy landscape might change (and might align with your triton implementation). |
Looking forward to it very much! |
Co-authored-by: Yineng Zhang <[email protected]>
… read from A HARD LOWER BOUND on the priced world pool of whatever the objective ships. It CONSTRAINS the one objective knob rather than becoming a second one: the objective still ranks, over the cuts that clear the floor, and "fastest above F" is the same ranking on a smaller set. Default None = no floor = today's behaviour, and the byte-identity of that path is asserted twice -- once field by field against a call that does not pass the argument at all, and once against the pre-#1286b selection rule restated independently in the test. WHY NOW. sgl-project#1286 repriced every candidate against the boot's own sizing formula and the makespan winner came out at 304,946 tokens against the incumbent's 715,089. The speed arm ships 43 % of the capacity, and until now the only way to put a bound under that was to pin a layer cut by hand -- the act the solver exists to replace. NO SILENT FALLBACK. When nothing clears the floor the answer is a W40 refusal carrying the frontier: the fastest cuts that DO clear it, or -- when none do -- the best pool anywhere in the field with the shortfall named. A floor that degrades to the fastest cut below it is worse than no floor, because every line of the boot still reports the floor as honoured. ONE WRITER, THREE CALLERS. _refuse_below_pool_floor is EXTENDED (floor_flag + field), not duplicated: the two floors differ only in which flag the operator must move. refuse_below_floors applies both, for the solver's pinned paths, its solved path, and the launcher's check on the candidate that actually ships -- that last one because --pp-solve-objective incumbent names a CANDIDATE, not a ranking, and so never passes through the narrowed set. PROVENANCE. PP-CUT SHIPPED gains pool_floor=<F|none> and renames pool_tokens= to chosen_pool= (no parser reads that key; the table rows and PP-POOL-JOIN keep pool_tokens=). New PP-CUT FRONTIER line prints the Pareto non-dominated (makespan, pool) pairs over the whole servable field with its own denominator, each point marked CLEARS/BELOW against the floor, so the cost of a floor is a subtraction between two rows of one line and a value for the flag can be chosen from any boot log. Truncation bounds RESOLUTION, never range: both ends are always printed.
…emessene Transiente (fnFL2 sgl-project#114) fnFL2x121/x122 (24.09.): die 5090-Stufe bootete mit Residenz 0.45 bzw. 0.40 bei Chunk 16384, passierte jeden Riegel (W120/W122, das KV-Sizing der Runtime) und starb im ERSTEN Chunk-Forward mit CUDA-OOM (320 bzw. 384 MiB fehlend). Beide Buecher preisten den 1024-MiB-Aktivierungsposten der Referenzboots (Chunk 4096) auf einem 16384er Chunk; das eigene [vram-peak]-Instrument des Boots misst dort 3,58 GiB, linear im Chunk auf jeder Stufe: PP0 (5090) 8192 -> 1,79 GiB 16384 -> 3,58 GiB (x113/x116, x118) PP1 (3080) 8192 -> 1,59 GiB 16384 -> 3,19 GiB PP2 (3080) 8192 -> 1,21 GiB 16384 -> 2,43 GiB x118 (0.26) ueberlebte nur, weil 7,5 GiB ungebuchte Luft hinter dem KV-Pool blieben; x122 (0.40) hatte 2,4 GiB und starb. Zwei Naehte, eine Messung: * Pool-Modell (Dry-Run, Cut-Solver mit Pool-Boden Kappe+Chunk): activation_reserve_mib = max(1024, gemessene Transiente der bindenden Stufe fuer den Chunk, mit dem P bootet). --pp-cut-activation-reserve-mib pinnt weiterhin; unter Chunk <= 4096 bleibt die Rechnung byte-identisch zu sgl-project#1286. Eigene Provenienzzeile "PP-CUT activation post (sgl-project#114)". * Rang-Env der Gruppe P: SGLANG_KV_BUDGET_PREFILL_TRANSIENT_MIB (der vorhandene Restposten des Sizers, Task sgl-project#48 C, bislang von niemandem gesetzt) traegt den gemessenen Vektor je Stufe; der Sizer zieht ihn vor dem KV-Pool ab. Operator-Wert gewinnt, andere Gruppen erben ihn nicht. In der Bestform x118 halten alle drei Stufen nach der Buchung weiter Kappe+Chunk (PP0 6,2 GiB Rest gegen 2,3 GiB KV, PP1 5,1/1,1, PP2 3,8/0,9). Tests: test_weg2_p_prefill_transient_114.py (Messpunkte, Linearitaet, Referenz-Floor, Pin, Env-Vektor und Rueckleser der Runtime, Gruppen- Trennung). Gate der Hebel gruen.
Motivation
Previously fp8 kv cache for Flashinfer was supported in #1204.
This PR support this feature for Triton runtime.
Evaluation
DeepSeek-Coder-V2-Lite-Instruct
Meta-Llama-3.1-8B-Instruct
Checklist