🚨🚨 TextGenerationPipeline: rely on the tokenizer default kwargs (#31747)

* rely on the tokenizer default kwargs

* fix a few tests
This commit is contained in:
Joao Gante
2024-07-02 15:17:42 +01:00
committed by GitHub
parent a9701953ff
commit 82486e5995
3 changed files with 20 additions and 23 deletions

View File

@@ -398,7 +398,7 @@ class TextGenerationPipelineTests(unittest.TestCase):
self.assertEqual(outputs, [{"generated_text": ANY(str)}])
else:
with self.assertRaises((ValueError, AssertionError)):
outputs = text_generator("")
outputs = text_generator("", add_special_tokens=False)
if text_generator.framework == "tf":
# TF generation does not support max_new_tokens, and it's impossible