Skip to content

Commit dd6816d

Browse files
committed
match test outputs
1 parent a1e2a50 commit dd6816d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/models/helium/test_modeling_helium.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ def test_model_2b(self):
9898
"Hello, today is a great day to start a new project. I have been working on a new project for a while now and I have"
9999
]
100100

101-
model = AutoModelForCausalLM.from_pretrained(model_id, low_cpu_mem_usage=True, torch_dtype=torch.bfloat16).to(
101+
model = AutoModelForCausalLM.from_pretrained(model_id, low_cpu_mem_usage=True, torch_dtype=torch.bfloat16, revision="refs/pr/1").to(
102102
torch_device
103103
)
104-
tokenizer = AutoTokenizer.from_pretrained(model_id)
104+
tokenizer = AutoTokenizer.from_pretrained(model_id, revision="refs/pr/1")
105105
inputs = tokenizer(self.input_text, return_tensors="pt", padding=True).to(torch_device)
106106

107107
output = model.generate(**inputs, max_new_tokens=20, do_sample=False)
108-
output_text = tokenizer.batch_decode(output, skip_special_tokens=False)
108+
output_text = tokenizer.batch_decode(output, skip_special_tokens=True)
109109

110110
self.assertEqual(output_text, EXPECTED_TEXTS)

0 commit comments

Comments
 (0)