transformers
fa9c04ea - Fix flaky OWL-ViT / OWLv2 `test_eager_matches_sdpa_inference` (bf16) (#51148)

Commit
7 hours ago
Fix flaky OWL-ViT / OWLv2 `test_eager_matches_sdpa_inference` (bf16) (#51148) `logits_per_text` is scaled by `exp(logit_scale)` (~14), which amplifies the bf16 eager/sdpa difference: on CPU with 4 threads, 1 in ~2000-6000 runs had 2 of the 7 rows over the bf16 tolerance (the test needs >= 80% of the rows to match). Relax only the bf16 atols to 5e-2, as aimv2 / blt / deimv2 do. Owlv2ModelTest is `# Copied from` OwlViTModelTest, so it gets the same override. Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Author
Parents
Loading