Skip to content

Commit

Permalink
test(tgi): update decode expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Sep 27, 2024
1 parent a06ac6d commit 337d882
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions text-generation-inference/tests/server/test_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ def _test_decode(config_name, generator, do_sample):
assert output.generated_tokens == max_new_tokens
assert output.finish_reason == 0
if do_sample:
expected_text = {
"gpt2": " The sun was set just after eleven and the clouds were still beating down. And as he approached the",
"llama": " George Orwell, 1984\nThe government is tracking your every move, recording your phone calls,",
"mistral": " The sky was as pale as a ghost. The sun had risen as the sun never rose",
}[config_name]
expected_text = {"gpt2": " The sun was set", "llama": "George Orwell, 1984", "mistral": "The sky was"}[
config_name
]
assert expected_text in output.text
else:
expected_text = {
"gpt2": '\n\n"I\'m going to go to bed," I said.\n\n"I\'m going',
"llama": " George Orwell’s classic dystopian novel, 1984, begins with this ominous sentence. The story",
"mistral": "\nThe clocks were striking thirteen.\nThe clocks were striking thirteen.",
}[config_name]
assert output.text == expected_text
assert output.text == expected_text

0 comments on commit 337d882

Please sign in to comment.