Skip to content

Commit f57f294

Browse files
justinchubyCopilot
andauthored
Fix Bamba synthetic parity CI tolerance (#476)
## Summary - add a Bamba-specific `atol=0.002` override for L3 synthetic parity - document the stable hybrid Mamba2/attention floating-point accumulation difference - preserve the existing argmax and cosine correctness gates ## Root cause Both deterministic Bamba seeds exceed the generic `1e-3` threshold under the CI dependency set: | Seed | Max abs diff | Cosine | Argmax | |---|---:|---:|---| | 0 | 0.001375 | 0.999997 | match | | 1 | 0.001662 | 0.999996 | match | The same failures occur on unrelated PRs, confirming this is a baseline tolerance issue rather than a model change regression. ## Validation - `pytest tests/synthetic_parity_test.py -q --models bamba --tb=short`: `2 passed, 201 skipped` - reproduced the exact CI failures before the change Signed-off-by: justinchuby <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 78437cd commit f57f294

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/synthetic_parity_test.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108
# dispatch, plus Mamba1 SSM single-token decode FP path differences.
109109
# Argmax correct, cosine=0.998 — model is functionally correct.
110110
"jamba": 0.04,
111+
# Bamba's hybrid Mamba2 + attention path differs slightly in FP accumulation
112+
# order from HuggingFace. Both deterministic seeds keep the same argmax and
113+
# cosine >= 0.999996 with max absolute error below 0.0017.
114+
"bamba": 0.002,
111115
# ModernBERT decoder has a 3-component LM head (dense→norm→decoder) whose
112116
# FP accumulation differs from PyTorch → ~0.043 max diff.
113117
# Argmax correct, cosine=0.996 — model is functionally correct.

0 commit comments

Comments
 (0)