Skip to content

Commit ae5e987

Browse files
justinchubyCopilot
andcommitted
Relax Bamba synthetic parity tolerance
Account for the stable floating-point accumulation difference between the Hugging Face and ONNX hybrid Mamba2/attention paths while retaining exact argmax and high-cosine correctness gates. Co-authored-by: Copilot <[email protected]> Signed-off-by: justinchuby <[email protected]>
1 parent 78437cd commit ae5e987

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)