CourseTransformers: From Attention to Trained, Served and Interpreted Models · Module 12: Adaptation and Alignment · part 94 of 111
Part 94 · Module 12: Adaptation and Alignment

Incident: Fine-tuned models that never learned to stop

18 min read·13 Oct 2026
Module 12 · Incident file · About 35 minutes

What happened

THE SAME REPORT, TWO YEARS APART 7 Mar 2022 distilgpt2 never stops (forum) 2 Jun 2022 cause: pad = eos, masked 22 Jan 2024 Llama 2 notebook issue #33 25 Jan 2024 pad = eos line dropped: works collator rule unchanged in transformers v5.19.0 (checked Oct 2026)
Two public reports of the same failure (red), the cause found by users (amber), the workaround (green); the library rule behind it (grey) is still in place.

On 7 March 2022 a user posted on the Hugging Face forums, in "GPT2 finetuned with eos token will never yield eos token during generation" (discuss.huggingface.co), that a fine-tuned distilgpt2 never ended its text: "no matter what the model will always output tokens till the max_length has been reached." The training texts did contain the end-of-sequence token. On 2 June 2022 another user posted the cause: "The DataCollatorForLanguageModeling always masks the pad_token in the labels and I set the pad_token = eos_token."

Two years later the same failure was filed against a popular course. In issue #33 of mlabonne/llm-course (github.com, 22 January 2024), a reader who adapted its Llama 2 fine-tuning notebook to mask personal data wrote that the model "was continuously generating text, effectively never producing the EOS_TOKEN and thus only stopping at the max sequence length." The notebook set tokenizer.pad_token = tokenizer.eos_token. Three days later the reader reported that dropping that line, and a duplicated start token, "made the fine-tuning process work". The issue is still open, with no maintainer reply.

Neither report quotes a bill. The cost is in the symptom: every reply runs to the length limit, so each one costs the most tokens it can, and the text after the answer is whatever the model invents.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.