[Perf] Reduce DFlash2 long-context verification decay - #587
Draft
yangzhuxinyzx wants to merge 14 commits into
Draft
[Perf] Reduce DFlash2 long-context verification decay#587yangzhuxinyzx wants to merge 14 commits into
yangzhuxinyzx wants to merge 14 commits into
Conversation
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Retain raw byte differences while checking bijective slots and the source-defined convolution history window. Keep live state, verifier output storage and full-vocabulary probabilities under exact comparison. Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Complete the three-startup paired curve and fixed-prefix comparisons, add explicit 17/18/20/22 ms context targets, and extend operator boundary checks to 256K. Preserve the slower bit-exact QK/PV prototype as a rejected, opt-in benchmark candidate. Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Retain raw storage mismatches while requiring a bijection across every observed state access. Live value changes and aliased mappings still fail. Validated with 22 focused tests; one GPU-only case skipped. Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Retain independent native builders, resource diagnostics and failed candidates. PV reuse remains gated after a free-generation mismatch. Correct the private pipeline softmax extraction before repeating its operator checks. No serving route is enabled by these experiments. Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
The first paired startup reduces the 261888-input complete round from 38.563 to 36.428 ms with identical output and acceptance. Add a reviewable opt-in worker probe and native harness, retain all sanitizer evidence, and record rejected warp pipelines and the lossless KV mirror. Repeated startup admission remains pending. Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
…hases Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Record three paired startups, exact scalar page-map resource controls, small-Q native reference coverage, and rejected QK schedules. Keep all experiments disabled by default. Assisted-by: Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
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.
Purpose
Reduce complete DFlash2 verification-round latency and long-context growth on rear GPUs 4–7, TP4/B1/q8. Targets are 32K ≤17 ms, 64K ≤18 ms, 128K <20 ms and 256K <22 ms, with no quality or acceptance regression. Targets remain unmet; keep Draft and defaults disabled. Service capacity remains 262144; the boundary-window test uses 261888 input plus 256 output tokens.
This continues #587, stacked on #586, without opening a duplicate PR. Integration freeze:
80545c010bbf6f5ed06458d992c189d75d0eff8f. Serving source remains239d71c7100b3bce5526268be2cafb4cff8ba8f2; review head is1994baff8f188a2c915e883395ae96e682db0577. Source/library hashes, dispatch and retained failures are in the worklog.Implementation
Test Plan and Result
Visible-tile q8 versus its PV-reuse parent completes three paired independent starts, 180 requests and 90 exact pairs, including tokens, finish reason and acceptance. One cold and five measured requests per context/arm; no profiler or tensor dump. Original scalar q1 is retained in both arms:
These are medians of startup medians. The third 32K pair is 0.005 ms slower and remains included. Request-average quantiles, cold TTFT/prefill and incremental costs are separately reported in the worklog. Native output/full-workspace checks and the visible operator's own three sanitizers pass.
Compact scalar lookup plus a 4096-byte shared reservation passes 45 operator byte checks and all three sanitizers. Its first service A/B holds visible-tile q8 fixed, hits 384 scalar calls per rank and preserves all 12 request pairs: 261888 round 37.160→35.602 ms, pure decode 137.245→143.250 tokens/s, accepted drafts 4.02/round and emitted tokens 5.12/round unchanged. This is one startup; it cannot be ranked against a different earlier trajectory. A separate actual-input diagnostic retains 96 exact comparisons but samples only eight unique K/V pointer pairs per rank; its incorrect sixteen-pair final assertion and incomplete full-layer coverage remain recorded.
New full-round traces confirm q6 and q1 eager work at the capacity boundary. Every q2–q7 shape now passes 60 output/full-FP32-workspace checks against the actual frozen production library. The q6 16-layer working set improves 12.176→7.796 ms at 128K and 23.717→15.066 ms at 261888. This is an operator screen; small-Q sanitizers and service-route admission are still required.
The original selected natural-EOS campaign has 26/30 complete exact pairs, including all 12 structured/tool cases; four seed-2 code cases remain. These are paired non-regression observations, not new benchmark scores. Unchanged-control startup drift remains unresolved and is never an allowed numerical tolerance.
Scoped pre-commit passes. GPU commands use
benchmark_sm70_grouped_attention_long,benchmark_sm70_scalar_attention, andbenchmark_sm70_grouped_attention_precision; source/library identities and raw reports are retained. NCU counters remain unavailable. Static resources, CTA clocks and data-derived bank proxies are not achieved hardware utilization.Remaining gates
Finish tail-route attribution and actual-input coverage, then paired service/repeated-start admission for the best tail combination. Continue reducing the major costs exposed by the complete trace. N64 variants, register-held softmax state, M8/N32 QK, operand rotation and the FP64-sum candidate fail their gates and remain closed. No main merge or default enable until the applicable quality and performance gates pass.
AI assistance: implementation, audit tooling and this report were assisted by Codex. Human review of the full diff and acceptance evidence is required before promotion.