Unverified Commit dadc9fb4 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Update `GPTNeoXLanguageGenerationTest` (#24193)



* fix

* fix

* fix

---------
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent a9cdb059
...@@ -314,9 +314,9 @@ class GPTNeoXLanguageGenerationTest(unittest.TestCase): ...@@ -314,9 +314,9 @@ class GPTNeoXLanguageGenerationTest(unittest.TestCase):
model.to(torch_device) model.to(torch_device)
inputs = tokenizer("My favorite food is", return_tensors="pt").to(torch_device) inputs = tokenizer("My favorite food is", return_tensors="pt").to(torch_device)
expected_output = ( # The hub repo. is updated on 2023-04-04, resulting in poor outputs.
"My favorite food is the chicken and rice.\n\nI love to cook and bake. I love to cook and bake" # See: https://github.com/huggingface/transformers/pull/24193
) expected_output = "My favorite food is a good old-fashioned, old-fashioned, old-fashioned.\n\nI'm not sure"
output_ids = model.generate(**inputs, do_sample=False, max_new_tokens=20) output_ids = model.generate(**inputs, do_sample=False, max_new_tokens=20)
output_str = tokenizer.batch_decode(output_ids)[0] output_str = tokenizer.batch_decode(output_ids)[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment