Skip to content

Commit

Permalink
[InstructBlip] Fix instructblip slow test (huggingface#25171)
Browse files Browse the repository at this point in the history
* fix instruct blip slow test

* Update tests/models/instructblip/test_modeling_instructblip.py
  • Loading branch information
younesbelkada authored Jul 28, 2023
1 parent add0895 commit dd9d45b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/models/instructblip/test_modeling_instructblip.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def test_inference_vicuna_7b(self):
logits = model(**inputs).logits

expected_slice = torch.tensor(
[[-3.5410, -12.2812, 8.2812], [-5.2500, -12.0938, 7.8398], [-4.1523, -13.8281, 9.0000]],
[[-3.5020, -12.3281, 8.4453], [-5.1406, -11.9609, 7.8711], [-4.0430, -13.4375, 9.1172]],
device=torch_device,
)
self.assertTrue(torch.allclose(logits[0, :3, :3].float(), expected_slice, atol=1e-3))
Expand Down

0 comments on commit dd9d45b

Please sign in to comment.