generation error when same token in "forced_eos_token_id" and "supress_token" parameter.
Author: idisuu
Pull request: no
Labels: name: WIP

### System Info

- `transformers` version: 4.28.0.dev0
- Platform: Linux-5.4.0-139-generic-x86_64-with-glibc2.31
- Python version: 3.10.11
- Huggingface_hub version: 0.15.1
- Safetensors version: not installed
- PyTorch version (GPU?): 2.0.1+cu117 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>

### Who can help?

@gante 

### 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

1. HuggingFace's generation method was being used in the Open-Assistant library that used HuggingFace's Model class.
https://github.com/LAION-AI/Open-Assistant/blob/0fcf3e08fe62295d4696e590005b0f33383342ea/model/model_training/utils/ppo_utils.py#L264-L267

2. generate method throw an error: RuntimeError:probability tensor contains either `int`, `nan` or element < 0
![error1](https://github.com/huggingface/transformers/assets/85441953/56771083-4800-4138-a9b1-ad45c0505d61)

3. I found that if same token is in "forced_eos_token_id" and "suppress_tokens", error occurs.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name =  "EleutherAI/pythia-70m-deduped"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

gen_kwargs = {'max_new_tokens': 10,
 'top_k': 0,
 'top_p': 0.7,
 'do_sample': True,
 'temperature': 1.0}

gen_kwargs["forced_eos_token_id"] = tokenizer.eos_token_id
gen_kwargs["suppress_tokens"] = [tokenizer.eos_token_id]
print(gen_kwargs)

question = """
Where is Gangnam?
"""
batch = tokenizer.encode(f"
{question}
", return_tensors="pt")

out = model.generate(
    input_ids=batch.to(model.device),
    **gen_kwargs
)
``` 

### Expected behavior

I want to know, using same token in "forced_eos_token_id" and "suppress_token" is restricted usage, because it seems to me bit contradictory.

If it is an general error, I think that something like warning should be recommended.

Or it might be my own error. 

Comments:
Hey @idisuu 👋 

This is a tricky one that we haven't considered. I'm leaning towards not allowing it -- if you want to suppress the eos token until a certain point, you can also set `min_length`. Suppressing and forcing at the same time is ambiguous 😅 

We have very little argument verification atm. Over the next month, I'll be working on validation of `generate` arguments. I'll make sure this one goes in! (and keep the issue open until then)

Thank you for raising this issue!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.