diff --git a/tests/models/opt/test_modeling_opt.py b/tests/models/opt/test_modeling_opt.py index da0ac8b9c420..6133953ba3e4 100644 --- a/tests/models/opt/test_modeling_opt.py +++ b/tests/models/opt/test_modeling_opt.py @@ -281,7 +281,7 @@ def test_inference_no_head(self): attention_mask = input_ids.ne(model.config.pad_token_id) with torch.no_grad(): output = model(input_ids=input_ids, attention_mask=attention_mask).last_hidden_state - expected_shape = torch.Size((1, 11, 1024)) + expected_shape = torch.Size((1, 11, 512)) self.assertEqual(output.shape, expected_shape) expected_slice = torch.tensor( [[0.7144, 0.8143, -1.2813], [0.7144, 0.8143, -1.2813], [-0.0467, 2.5911, -2.1845]], device=torch_device @@ -306,7 +306,7 @@ def test_load_model(self): def test_logits(self): model = OPTForCausalLM.from_pretrained(self.path_model) model = model.eval() - tokenizer = GPT2Tokenizer.from_pretrained("patrickvonplaten/opt_gpt2_tokenizer") + tokenizer = GPT2Tokenizer.from_pretrained(self.path_model) tokenizer.add_special_tokens({"pad_token": ""}) prompts = [