From dadc9fb4275f4b7c2984d16d6d9a7880ec76d872 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:37:12 +0200 Subject: [PATCH] Update `GPTNeoXLanguageGenerationTest` (#24193) * fix * fix * fix --------- Co-authored-by: ydshieh --- tests/models/gpt_neox/test_modeling_gpt_neox.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/models/gpt_neox/test_modeling_gpt_neox.py b/tests/models/gpt_neox/test_modeling_gpt_neox.py index c2bbbe58e1..39eac1ccc2 100644 --- a/tests/models/gpt_neox/test_modeling_gpt_neox.py +++ b/tests/models/gpt_neox/test_modeling_gpt_neox.py @@ -314,9 +314,9 @@ class GPTNeoXLanguageGenerationTest(unittest.TestCase): model.to(torch_device) inputs = tokenizer("My favorite food is", return_tensors="pt").to(torch_device) - expected_output = ( - "My favorite food is the chicken and rice.\n\nI love to cook and bake. I love to cook and bake" - ) + # The hub repo. is updated on 2023-04-04, resulting in poor outputs. + # 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_str = tokenizer.batch_decode(output_ids)[0]