The messy code generated by opt125m.
### System Info

```shell
transformers version is 4.19.3
```


### Who can help?

_No response_

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

import torch
from transformers import AutoModelForCausalLM
from transformers import TextGenerationPipeline, AutoTokenizer, AutoModelWithLMHead

tokenizer = AutoTokenizer.from_pretrained("facebook/opt-125m")
transformers_opt = AutoModelForCausalLM.from_pretrained("facebook/opt-125m")
transformers_opt.eval()

text = "The trophy doesn’t fit in the suitcase because "
text_generator = TextGenerationPipeline(transformers_opt, tokenizer)
out = text_generator(text, max_length=300, do_sample=True, top_p=0.9)
print(f"transformers model out is {out}")



### Expected behavior

```shell
I want to get normal output.
```

Hi @920232796 👋  `facebook/opt-125m` is a relatively small model, so it's normal that its outputs are not great (especially with `do_sample=True`). I'd suggest trying `facebook/opt-350m`.

As per our [issues guidelines](https://github.com/huggingface/transformers/blob/main/ISSUES.md), we reserve GitHub issues for bugs in the repository and/or feature requests. For any other requests, we'd like to invite you to use our [forum](https://discuss.huggingface.co/) 🤗<|||||>Thank you for your patient reply.<|||||>@920232796 actually we have found a problem in the OPT files -- https://github.com/huggingface/transformers/pull/17785

It may improve the quality of the generation, but the comment above remains true :)<|||||>Thank you very much!