Add atol for sliding window test (#30303)

atol for sliding window test
This commit is contained in:
fxmarty
2024-04-18 11:08:34 +02:00
committed by GitHub
parent 3f20877da9
commit 9459efb807

View File

@@ -3925,7 +3925,7 @@ class ModelTesterMixin:
# Only non-padding tokens are expected to match. # Only non-padding tokens are expected to match.
self.assertTrue( 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 @require_flash_attn