LlamaForCausalLM generate() runtime error when top_p=0
### System Info

- `transformers` version: 4.29.2
- Platform: Linux-4.4.0-210-generic-x86_64-with-debian-stretch-sid
- Python version: 3.7.3
- Huggingface_hub version: 0.14.1
- Safetensors version: not installed
- PyTorch version (GPU?): 1.13.1+cu117 (True)
- Tensorflow version (GPU?): 2.5.0 (True)

### Who can help?

_No response_

### Information

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

### Tasks

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

### Reproduction

This example follows and modifies the LLaMA documentation at: https://huggingface.co/docs/transformers/v4.29.1/model_doc/llama.

```python
from transformers import AutoTokenizer, LlamaForCausalLM

model = LlamaForCausalLM.from_pretrained(PATH_TO_CONVERTED_WEIGHTS).cuda()
tokenizer = AutoTokenizer.from_pretrained(PATH_TO_CONVERTED_TOKENIZER)

prompt = "Hey, are you conscious? Can you talk to me?"
inputs = tokenizer(prompt, return_tensors="pt").cuda()

# Generate
generate_ids = model.generate(
    inputs.input_ids, max_length=1024,
    do_sample=True,
    temperature=0.6,
    top_k=1000,
    top_p=0.0,  # cause error
    repetition_penalty=(1.0 / 0.85),
    )
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
```

>RuntimeError: probability tensor contains either `inf`, `nan` or element < 0

### Expected behavior

`generate()` should check if `top_p==0` and disables it to avoid numerical error. This behavior is the same as when `top_p==1` and consistent with the documentation.
cc @gante <|||||>Hi @tranhungnghiep -- there is indeed an issue, but not on allowing p=0 :) I will open a PR to fix it (feel free to check the solution there, after it gets linked on this issue)

Please note that setting `top_p=0` is the effectively the same as doing `do_sample=False` ⚠️ 