AI & Machine Learning
Bug Report
Batched LLM generation garbles short prompts: right-padding with a decoder-only model
Our batch classification job with a small open model produced good output for the longest prompt in each batch and nonsense for the rest. Transformers warned that right-padding was detected for a decoder-only model. Left padding, a proper pad token and the attention mask fixed it.