Skip to content

Commit

Permalink
Fix SeamlessM4Tv2ModelIntegrationTest (#27911)
Browse files Browse the repository at this point in the history
change dtype of some integration tests
  • Loading branch information
ylacombe authored Dec 11, 2023
1 parent e96c1de commit 5e620a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/models/seamless_m4t_v2/test_modeling_seamless_m4t_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,8 +1014,9 @@ def input_audio(self):
)

def factory_test_task(self, class1, class2, inputs, class1_kwargs, class2_kwargs):
model1 = class1.from_pretrained(self.repo_id).to(torch_device)
model2 = class2.from_pretrained(self.repo_id).to(torch_device)
# half-precision loading to limit GPU usage
model1 = class1.from_pretrained(self.repo_id, torch_dtype=torch.float16).to(torch_device)
model2 = class2.from_pretrained(self.repo_id, torch_dtype=torch.float16).to(torch_device)

set_seed(0)
output_1 = model1.generate(**inputs, **class1_kwargs)
Expand Down

0 comments on commit 5e620a9

Please sign in to comment.