prep_txt = '<startoftext>Title: Test title\nGenerated Text: I love apples very much<endoftext>'
encodings_dict = tokenizer(prep_txt, truncation=True, max_length=20, padding="max_length")
encodings_dict.input_ids [50257, 19160, 25, 6208, 3670, 198, 8645, 515, 8255, 25, 314, 1842, 5413, 845, 881, 50258, 50259, 50259, 50259, 50259]
Получается вот такой выход