Fix device placement for model-parallelism in generate for encoder/de…
…coders

When using model parallelism with encoder/decoder models, there is an issue in `generate` using the encoder in isolation. That encoder won't output logits on the same device as the inputs like the whole model does, and we get mismatched device errors.

Repro:
```py
from transformers import AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M", device_map="auto")
inputs = {"input_ids": torch.tensor([[256047, 94124, 248079, 15697, 248203, 2]], device=0), 'attention_mask': torch.tensor([[1, 1, 1, 1, 1, 1]], device=0), 'forced_bos_token_id': 256079}

model.generate(**inputs, max_length=4000)
```
_The documentation is not available anymore as the PR was closed or merged._