src/transformers/generation/utils.py/GenerationMixin/prepare_inputs_for_generation
class GenerationMixin:    def prepare_inputs_for_generation(self, *args, **kwargs):
        raise NotImplementedError(
            "A model class needs to define a `prepare_inputs_for_generation` method in order to use `generate`."
        )