Fixing a hard to trigger bug for `text-generation` pipeline. (#18131)
Fixing a hard to trigger bug for `text-generation` pipeline. (#18131)

* Fixing a bug where attention mask was not passed to generate.

* Fixing zero-size prompts.

* Comment on top.
huggingface/transformers,huggingface/transformers,huggingface/transformers,huggingface/transformers