Skip to content

Commit 3613607

Browse files
authored
Fix failing BartModelIntegrationTest (#43160)
Fix failing BartModelIntegrationTest
1 parent 93d7aff commit 3613607

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/models/bart/test_modeling_bart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ def default_tokenizer(self):
894894

895895
@slow
896896
def test_inference_no_head(self):
897-
model = BartModel.from_pretrained("facebook/bart-large").to(torch_device)
897+
model = BartModel.from_pretrained("facebook/bart-large", dtype=torch.float32).to(torch_device)
898898
input_ids = _long_tensor([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
899899
attention_mask = input_ids.ne(model.config.pad_token_id)
900900
with torch.no_grad():

0 commit comments

Comments
 (0)