

TITLE
generation error when same token in "forced_eos_token_id" and "supress_token" parameter.

COMMENTS
2

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
### 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"<|prompter|>{question}<|assistant|>", 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. 