T5 reshapes all natural language processing tasks — whether translation, summarization, classification, or question answering — as text generation tasks. The model receives a text input with a task instruction and directly generates another text string as output. The key to achieving this is prepending a task prefix to the input, such as "translate English to German: " or "summarize: ". This prefix acts as a natural language instruction telling the model which task to perform. Consequently, to switch tasks, you only need to change the prefix instruction in the input text, without touching the model's structure or parameters at all. Once the downstream task data is prepared, you simply construct the input as "task prefix + input text" and the target text as the desired output. You can then fine-tune the entire pretrained T5 model on the task-specific data using standard sequence-to-sequence training, without adding any new layers.