Skip to content

Commit

Permalink
Add atol for sliding window test (#30303)
Browse files Browse the repository at this point in the history
atol for sliding window test
  • Loading branch information
fxmarty authored Apr 18, 2024
1 parent 3f20877 commit 9459efb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9459efb

Please sign in to comment.