src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py/TFTransfoXLLMHeadModel/prepare_inputs_for_generation
class TFTransfoXLLMHeadModel:    def prepare_inputs_for_generation(self, inputs, past, **model_kwargs):
        inputs = {"input_ids": inputs}

        # if past is defined in model kwargs then use it for faster decoding
        if past:
            inputs["mems"] = past

        return inputs