[CI Flaky] test_other_bits 2-bit UT fails intermittently (Accuracy 0.18 < threshold 0.195)
Maintainers usually reply within 1 day
@luoyu-intel is already working on this.
Since Oct 29, 2026.
Assessment
This issue has not been assessed yet.
Description
Bug Description
TestAutoRoundARKBackend::test_other_bits[cpu-dtype0-2-32-False-auto_round] (the only 2-bit / w2g32 case in the ARK UT suite) fails intermittently in CI with:
E AssertionError: Accuracy 0.18 is below threshold 0.195
FAILED unit/test_ark/test_model.py::TestAutoRoundARKBackend::test_other_bits[cpu-dtype0-2-32-False-auto_round]
Same code, same runner — sometimes passes, sometimes fails. This is a flaky/borderline threshold issue, not a real accuracy regression.
Root Cause Analysis
Evidence from the failing CI log (Azure DevOps build 78323, log 58):
-
2-bit quantization on opt-125m is inherently near-random quality.
The quantized model generates garbage text (Prompt: "Hello,my name is" -> Generated: " Mys. I am"), consistent with a lambada accuracy of ~0.18 — barely above random chance. -
The threshold 0.195 is calibrated for 4/8-bit, not 2-bit.
All other cases (formats, awq_fp16) run at 4/8-bit and pass; the 2-bit case is the only one sitting at the edge of the noise band. -
Evaluation uses only ~100 lambada_openai samples (
limit), with no fixed seed.
Binomial standard error ≈ sqrt(0.19 * 0.81 / 100) ≈ ±0.04 (2σ ≈ ±0.08) — far wider than the 0.015 gap between measured 0.18 and threshold 0.195. Run-to-run eval-subset sampling (plus CPU quantization nondeterminism) swings the measured accuracy across the threshold, so pass/fail is essentially a coin flip.
Conclusion: The test design is at fault — a hardcoded 0.195 threshold applied to a 2-bit model measured on a tiny unseeded sample set. It will keep flaking regardless of code changes.
Suggested Fixes (pick one)
- Preferred: For the 2-bit case, drop the accuracy assertion (or use a separate relaxed threshold) and only verify quantization + repack + inference succeed. 2-bit has no accuracy-parity requirement in this test.
- If accuracy must be asserted: raise
limit(e.g. 100 → 500, dropping SE to ~±0.02) and fix the random seed so the measurement is deterministic, then set the threshold against a measured 2-bit baseline with margin.
Environment
- Runner:
azure-xpu-runner3(Linux, CPU test) - Python 3.14.7, pytest 9.1.1
- Test:
unit/test_ark/test_model.py::test_other_bits[cpu-dtype0-2-32-False-auto_round](bits=2, group_size=32, auto_round kernel, CPU) - Failing log: https://dev.azure.com/lpot-inc/b7121868-d73a-4794-90c1-23135f974d09/_apis/build/builds/78323/logs/58
Error Output
helpers.py:139: in evaluate_accuracy
assert acc > threshold, f"Accuracy {acc} is below threshold {threshold}"
E AssertionError: Accuracy 0.18 is below threshold 0.195
FAILED unit/test_ark/test_model.py::TestAutoRoundARKBackend::test_other_bits[cpu-dtype0-2-32-False-auto_round] - AssertionError: Accuracy 0.18 is below threshold 0.195
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 195
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 59
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/auto-round
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
intel/auto-round#2525 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
[Bug]: remove enable_minmax_tuning since it's opened by default, unify with disable_minmax_tuningOpenbug
Difficulty 3/5 1-2 days Newbie friendliness 40/100
intel/auto-round#2565 ·
Maintainers usually reply within 1 day
-
[Bug]: ARK return_lse gives the same LSE for every 16 query rows (sdpa, sagev1, sageattn) on XPUPossibly taken @luoyu-intel claimed this 4 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 55/100
intel/auto-round#2556 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: support NVFP4_E5M3_GSPossibly taken @xin3he claimed this 5 days ago. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 44/100
intel/auto-round#2532 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
[Feature]: split special_model_handler to a folderPossibly taken @Cross2pro claimed this 6 days ago. Openenhancement
Difficulty 3/5 Half a day Newbie friendliness 42/100
intel/auto-round#2514 · 5 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in intel/auto-round
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
elviskahoro/sdk-python-attio#144 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
RenyiELBO raises TypeError when model has no sample sitesPossibly taken @alibb007 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day