def METHOD_NAME(self) -> None:
    generation_model = self.t5_base.get_model(with_generation_utils=True)
    assert isinstance(generation_model, GenerationUtils)
    scripted_model = torch.jit.script(generation_model)
    tokens = scripted_model.generate(self.transformed_inputs, num_beams=1, max_length=30)
    generated_text = self.transform.decode(tokens.tolist())
    expected_generated_text = [
        "owning a dog is good for you, according to studies . a dog is a good companion for a variety of reasons",
        "Das ist gut so.",
        "acceptable",
        "4.0",
        "mississippi authorities dispatch emergency crews to survey damage . severe weather in mississippi has caused extensive damage",
    ]
    self.assertEqual(generated_text, expected_generated_text)
    inputs = self.transform([self.inputs[0]])
    tokens_for_single_example = scripted_model.generate(inputs, num_beams=1, max_length=30)
    generated_text_for_single_example = self.transform.decode(tokens_for_single_example.tolist())
    self.assertEqual(generated_text[0], generated_text_for_single_example[-1])