Skip to content

test(awq): widen CPU dense logit-RMSE bound to measured cross-CPU range - #4435

Merged
Qubitium merged 1 commit into
mainfrom
fix/awq-cpu-dense-triage
Nov 16, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/awq-cpu-dense-triage

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

Summary

The AWQ CPU (dense) job fails deterministically in the environment-dependent way: tests/test_awq_hf_cpu.py::test_real_checkpoint_awq_cpu_roundtrip[dense] measures 0.2582 logit RMSE on ubuntu-24.04 x86 CI and 0.2073 on an aarch64 SVE128 host, against a 0.20 bound. Torch dispatches to a CPU-capability-specific kernel, so identical deterministic weights round differently per microarchitecture; the value is stable within an environment (bit-identical at 842d666 and 89fa9f4).

Bisect of the value: 0.1827 through 870fb44, 0.2073 from 241087a (#4176/#4243). That commit made token-row replay use the retained rows' real rotary positions instead of a synthetic arange for position-embeddings-only attention modules — a documented correctness fix. It lowers the NLL delta against fp16 from 0.2259 to 0.1579 while raising logit RMSE, so this is a metric trade-off, not a quality regression. The 0.20 bound predates the fix and was never re-validated against it.

What Changed

  • tests/test_awq_hf_cpu.py: widen the dense logit-RMSE bound 0.20 -> 0.30 (~16% headroom over the worst observed value, still catches a real quality collapse). The NLL-delta, finiteness, packing and dtype assertions are unchanged.

Tests

HF_HUB_OFFLINE=1 PYTHONPATH=/root/work-awqdense /root/venv/bin/python -m pytest \
  "tests/test_awq_hf_cpu.py::test_real_checkpoint_awq_cpu_roundtrip[dense]" -q
1 passed in 120.21s
# AWQ_HF_CPU_METRICS relative_logit_rmse = 0.20733 (aarch64 host), quantized_nll - baseline_nll = 0.15788

The x86 CI value (0.2582) is from the job logs that motivated the change; both are inside the new bound.

Logic Flow Documentation

Not applicable — test threshold only, no code path changed.

Review Requirements

  • Reviewed; threshold change is justified by measured, environment-stable data and preserves the other quality assertions.

The dense AWQ CPU job failed deterministically per environment: 0.2582 on
ubuntu-24.04 x86 CI and 0.2073 on an aarch64 SVE128 host, against a 0.20
bound. Torch dispatches to a CPU-capability-specific kernel, so identical
deterministic weights round differently per microarchitecture; the value is
stable within an environment (bit-identical at 842d666 and 89fa9f4).

Bisect of the value: 0.1827 through 870fb44, 0.2073 from 241087a
(#4176/#4243). That commit made token-row replay use the retained rows'
real rotary positions instead of a synthetic arange for
position_embeddings-only attention modules, which is a documented
correctness fix. It lowers the NLL delta against fp16 from 0.2259 to
0.1579 while raising logit RMSE, so this is a metric trade-off, not a
quality regression. The 0.20 bound predates the fix and was never
re-validated against it.

Widen to 0.30: ~16% headroom over the worst observed value, still catches a
real quality collapse. NLL-delta, finiteness, packing and dtype checks are
unchanged.
@Qubitium
Qubitium merged commit 3bda17d into main Nov 16, 2026
9 checks passed
@Qubitium
Qubitium deleted the fix/awq-cpu-dense-triage branch November 16, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant