diff --git a/tests/test_modeling_common.py b/tests/test_modeling_common.py index 5e6be8c04044e9..71cb28d7548555 100755 --- a/tests/test_modeling_common.py +++ b/tests/test_modeling_common.py @@ -3925,7 +3925,7 @@ def test_sdpa_matches_eager_sliding_window(self): # Only non-padding tokens are expected to match. self.assertTrue( - torch.allclose(res_eager[attention_mask == 1], res_sdpa[attention_mask == 1], rtol=1e-3) + torch.allclose(res_eager[attention_mask == 1], res_sdpa[attention_mask == 1], rtol=1e-4, atol=1e-4) ) @require_flash_attn