Negative controls for the reference comparators: a rejected variant must fail
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- testing-qa
Direzione di ricerca
Start with tests/test_dspark_eos_contract.py to follow the existing negative-control convention, then inspect tests/ds4_test.c at test_local_golden_overlap, test_local_golden_max_abs, and test_glm53_continued_prefill. Run the relevant local-golden, continued-prefill, and logprob-vector selectors with existing backend switches to establish failure margins. Done means each comparator has a documented negative control, reports observed_negative, and leaves the default make test path unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
ds4_test has several comparators that judge a backend against a reference
(official continuation vectors, local golden vectors, cold-vs-resumed
prefill). Each one is only evidence when it is known to reject a wrong
backend, and today only one test in the tree demonstrates that. This issue
proposes adding a "rejected variant must fail" control to each comparator,
before any of the thresholds are touched or reused for new backends. It is
test infrastructure, so it is filed as an issue first rather than a PR.
What exists
The one control is tests/test_dspark_eos_contract.py: line 6 says
"An optional source path admits a pre-fix negative control without editing
it", --source points the harness at a pre-fix ds4.c, and the report
line prints observed_negative so a run against the fixed tree and a run
against the old tree are distinguishable. That is the shape this issue asks
for elsewhere.
The comparators without one (line numbers on main at 0aaea5a):
tests/ds4_test.c:5964test_local_golden_overlapand:5975
test_local_golden_max_abs, used by--local-golden-vectors
(:6036-6062). Thresholds: top-1 equal, top-5 overlap >= 4, top-20
overlap >= 15, top-64 overlap >= 40, top-20 max-abs logit delta <= 8.0.
The comment says it is "intentionally tolerant" and meant to catch
"wrong tiling, skipped work, bad dispatch". Nothing in the tree shows
that a wrong-tiling or skipped-work backend actually lands outside those
bounds; 8.0 logits and 40/64 could be wide enough to pass a mis-dispatched
layer on a long prompt.tests/ds4_test.c:5301test_glm53_continued_prefill(:5366-5384):
asserts resumed and cold top-1 agree and top-8 sets overlap, and only
printsmax same-rank logit delta. A resumed prefill that attends
through a wrong schedule can keep the same argmax and still be a
different model; the number that would show it is logged, not asserted.--logprob-vectors(CONTRIBUTING's "catches tokenizer, template,
attention, and logits regressions"): same question, which class of fault
has it been shown to catch, at what margin.
Proposal
For each comparator, one control that runs the comparator against a
variant known to be wrong and asserts the comparator fails at the
calibrated floor. The control must be a real, shipped drift path, not a
synthetic perturbation of the reference, otherwise it only tests the
assertion, not the floor.
--local-golden-vectors: addDS4_TEST_LOCAL_GOLDEN_EXPECT_FAIL=1
(or a--local-golden-negativeselector) that runs the same cases with
a known-bad backend knob and requires at least one of the five
assertions to trip on every case. Candidate knobs that already exist and
change numerics:DS4_METAL_MATH_SAFE, the pre-M5 router transform
switch (DS4_METAL_DISABLE_PRE_M5_ROUTER_TRANSFORM_FINALIZE_FUSION),
and the prefill chunk override. If none of those trips the floor, the
floor is not calibrated and that is the finding: the control then
documents the smallest margin (top-20 max-abs, overlap counts) each knob
produces, so the thresholds can be tightened to sit between "sane kernel
change" and "wrong dispatch".--glm53-continued-prefill: promotemax same-rank logit deltafrom a
log line to an assertion with a floor chosen from a cold-vs-cold repeat
(the noise floor), then add the negative: resume with the split placed
one token too far (reuse one token too many) and require the assertion
to trip. That fault is the first of the four colibri #1453 used to
qualify its resumed-prefill test ("reuse one token too many, the old
schedule condition, no rollback truncation, unguarded undo buffers, all
four are caught"); it is the one that maps directly onto ds4's
ds4_session_syncresume path without a new fixture.--logprob-vectors: record, indocs/TESTING.md, one fault class the
test was run against and the margin it failed by (for example the
Q8 output-head tile vs the few-row matvec, both already in the tree
under env switches). If the run does not exist, the control is that run.
Each control follows test_dspark_eos_contract.py's convention: a flag or
env var selects the negative variant, the report line says
observed_negative=true/false, and the default make test path is
unchanged. No new model files; every control reuses the same GGUF the
positive test already needs, so the cost is one extra pass per comparator.
Why now
The thresholds in test_local_golden_case_run are reused as the acceptance
gate for new Metal work (router softplus in 0719a0b, Q8 tiles, TP paths).
A comparator that has never been shown to fail on a wrong backend is not a
gate, it is a log. One negative control per comparator makes the tolerance
numbers falsifiable and gives contributors a way to state "my change is
inside the floor" with something behind it.
I can send the --glm53-continued-prefill piece as a PR first if the
approach is acceptable; it is the smallest (an assertion plus one
mis-split resume) and needs only the GLM 5.3 GGUF the test already loads.
- Lingua principale
- C
- Stelle
- 24.4k
- Fork
- 2.4k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di antirez/ds4
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
antirez/ds4#1189 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
antirez/ds4#1173 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
antirez/ds4#1032 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
awslabs/aws-c-common#1319 ·
-
editor/integration
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DeusData/codebase-memory-mcp#3130 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 13 giorni
-
DBMS_UTILITY.FORMAT_ERROR_STACK exceeds the 2000-byte limitForse già presa @coder999o l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
zephyrproject-rtos/zephyr#127560 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni