Pull requests / #3494
#3494 [Benchmark] Paired stats for bench comparisons: the test says, and a size note next to it
open · @victorgabr · 0 comentários · No GitHub
BenchmarksSetup & installAMD / HIPNVIDIA / CUDAModels & quantsDocumentationWindowsLinux
Descrição
## Problem and result `--compare` and `ab_engine` printed a median delta only. Three runs carry 1-2% noise easily, so a 1% delta read as an improvement. That is how phantom improvements and regressions reach reports. Now both tools match runs slot by slot (same question, same prompt size) and test the speed ratios: Wilcoxon signed-rank, Holm-corrected across the metrics. The compare table gets two columns, kept apart on purpose: - `the test says (Wilcoxon, Holm)` - the ground result. It says yes or no whatever the size, and nothing else in the table can overturn it. - `size vs the floor` - magnitude only: `faster/slower, over/under the floor` (default 2% prefill / 5% decode, set with `--floor-prefill` / `--floor-decode`). Over the floor is never a statistical claim; under it never cancels a real one. A run also says up front when its `--runs` cannot reach significance (with three runs the prompt pairs' p cannot drop below 0.25), the report README writes the same, and a footer answers "was this many runs enough". Also fixed here: the redactor order broke when the user name sits inside the Strata folder path; the no-scipy fallback crashed on the None verdict tuple. The `port` NameError is NOT here - that is #3320. ## Why this approach `tools/paired_stats.py` wraps scipy and statsmodels; nothing is re-implemented in-tree. Optional via `requirements-bench.txt` (the core install stays light). Without the packages every table prints as before, with a line naming the install. The measurement run stays standard library only. ## Validation **Passed** (Linux, Python 3.10.9 venv, scipy 1.15.3, statsmodels 0.15.0): - `python tools/test_strata_bench.py`: 20/20. - `python tools/test_paired_stats.py`: 4/4; and 4 clean skips on system Python without the packages (degraded path proven). - Live A/B on this machine: a same-day paired A100 run pair whose configs differ by one argument, `--vram-reserve-mib 700` vs `1600` (A100 SXM4 80 GB, Qwen3.8-Flash-Next IQ3_S, `--runs 3`, medians). Raw deltas up to -3.6% - none survives the test, so the reserve change is not shown to have moved speed, and a false regression claim from the -3.6% is exactly what the test stops: | metric | old | new | change | the test says (Wilcoxon, Holm) | factor (CI), pairs | |---|---|---|---|---|---| | chat decode tok/s | 121.00 | 116.60 | -3.6% | no (p=0.7344, Holm 1.000) | x0.992 (x0.957-x1.038), n=9 | | chat first token s | 0.24 | 0.24 | -0.4% | no (p=0.5703, Holm 1.000) | x1.008 (x0.978-x1.015), n=9 | | 4K prompt tok/s | 2550.30 | 2567.40 | +0.7% | no (p=0.2500, Holm 1.000) | x1.007 (x1.002-x1.008), n=3 | | 16K prompt tok/s | 3258.50 | 3275.10 | +0.5% | no (p=0.2500, Holm 1.000) | x1.005 (x1.002-x1.006), n=3 | With 3 runs the prompt pairs' p cannot drop below 0.25; the run itself says `--runs 8 or more` can decide. All four size cells read `size unknown (test not passed)`. **Failed**: none. **Not run**: Windows. No CUDA/HIP/SYCL file touched. ## Limits - Depends on #3320: on this branch alone, a fresh-server bench run still hits the port NameError. - The agent rows cannot be paired (different conversations), so they stay descriptive. - Verdicts need the optional packages; the significance floor warning prints either way. Commit: `16d3ae05` (one commit).
No site
Links install, modelos, releases.