summaryrefslogtreecommitdiff
path: root/experiments/measure_direction_quality_existing_ckpt.py
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-04-07 22:52:41 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-04-07 22:52:41 -0500
commitede7cca3e4f9048e3fc6d99077f8842e9b598ff4 (patch)
tree720562461cfd2672a6f9c1b74bad6fc088bd6872 /experiments/measure_direction_quality_existing_ckpt.py
parent4420af372024ef12b28eac21678504dd75484dca (diff)
Add reproducers for pitfalls 1-3 in CHECKLIST.md
Each bug from the catalog has a synthetic reproducer that runs in <1 sec without GPU: Bug 1: x.norm(-1) on a 2x2 tensor returns 1.143 (L_{-1} of whole tensor) instead of [5, 10] (per-row L_2 along dim=-1). Bug 2: F.cosine_similarity(a, b) with ||b||=5e-10 returns +0.000905 instead of the true +0.018101. The clamp (eps=1e-8) underestimates the divisor 20x. Bug 3: 5e-10 in fp16 -> 0 (underflows smallest subnormal ~6e-8). Downstream F.cosine_similarity returns NaN. bf16 works because it shares fp32's exponent range. Bugs 4-6 (Bs reproducibility, aggregation, layer-0 dominance) require a trained network and are demonstrated inside audit_table and ablation_decision_utility.
Diffstat (limited to 'experiments/measure_direction_quality_existing_ckpt.py')
0 files changed, 0 insertions, 0 deletions