Pegasus: Error when training with increased input length
Author: zephyrzilla
Pull request: no

## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
     Don't forget to fill out the missing fields in that output! -->
     
- `transformers` version: 3.4.0
- Platform: MacOS Mojave (10.14.6)
- Python version: 3.7.9
- PyTorch version (GPU?): 1.6.0 (True)
- Tensorflow version (GPU?): NA
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

### Who can help
@sshleifer
<!-- Your issue will be replied to more quickly if you can figure out the right person to tag with @
 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.
 
 albert, bert, GPT2, XLM: @LysandreJik 
 tokenizers: @mfuntowicz
 Trainer: @sgugger
 Speed and Memory Benchmarks: @patrickvonplaten
 Model Cards: @julien-c
 Translation: @sshleifer
 Summarization: @sshleifer
 TextGeneration: @TevenLeScao 
 examples/distillation: @VictorSanh
 nlp datasets: [different repo](https://github.com/huggingface/nlp)
 rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
 Text Generation: @TevenLeScao
 blenderbot: @mariamabarham
 Bart: @sshleifer
 Marian: @sshleifer
 T5: @patrickvonplaten
 Longformer/Reformer: @patrickvonplaten
 TransfoXL/XLNet: @TevenLeScao 
 examples/seq2seq: @sshleifer
 examples/bert-loses-patience: @JetRunner
 tensorflow: @jplu
 examples/token-classification: @stefan-it
 documentation: @sgugger
 -->

## Information

Model I am using (Bert, XLNet ...): Pegasus

The problem arises when using:
* [ ] the official example scripts: NA
* [x] my own modified scripts:

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: NA
* [x] my own task or dataset: Long input training on the standard CNN/DM dataset.


## To reproduce

Steps to reproduce the behavior:

1. I am trying to train a Pegasus model using the following script on a larger input length.
```python
from transformers import PegasusConfig, PegasusForConditionalGeneration, PegasusTokenizer
from transformers import Trainer, TrainingArguments
from examples.seq2seq.utils import Seq2SeqDataset

config = PegasusConfig(
    max_length=2048,
    max_position_embeddings=2048,
    encoder_layers=16,
    decoder_layers=4,
    num_beams=2
)

tokenizer = PegasusTokenizer.from_pretrained("sshleifer/distill-pegasus-cnn-16-4")
model = PegasusForConditionalGeneration(config=config)

dataset = Seq2SeqDataset(data_dir='data/cnn_dm', tokenizer=tokenizer, max_source_length=2048, max_target_length=150)

training_args = TrainingArguments(
    output_dir="./data/output",
    overwrite_output_dir=True,
    num_train_epochs=1,
    save_steps=10,
    save_total_limit=2,
)

trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=dataset,
    prediction_loss_only=True,
)

trainer.train()

```

2. I am getting the following error message
```
/Users/sdasgupta02/code/summarization/summarization-long/transformers/src/transformers/trainer.py:263: FutureWarning: Passing `prediction_loss_only` as a keyword argument is deprecated and won't be possible in a future version. Use `args.prediction_loss_only` instead. Setting `args.prediction_loss_only=True
  FutureWarning,
  0%|          | 0/2 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/Users/sdasgupta02/code/summarization/summarization-long/transformers/train_scratch.py", line 34, in <module>
    trainer.train()
  File "/Users/sdasgupta02/code/summarization/summarization-long/transformers/src/transformers/trainer.py", line 756, in train
    tr_loss += self.training_step(model, inputs)
  File "/Users/sdasgupta02/code/summarization/summarization-long/transformers/src/transformers/trainer.py", line 1056, in training_step
    loss = self.compute_loss(model, inputs)
  File "/Users/sdasgupta02/code/summarization/summarization-long/transformers/src/transformers/trainer.py", line 1080, in compute_loss
    outputs = model(**inputs)
  File "/anaconda3/envs/transformers/lib/python3.7/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'input_ids'
  0%|          | 0/2 [00:00<?, ?it/s]
```

<!-- If you have code snippets, error messages, stack traces please provide them here as well.
     Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
     Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.-->

## Expected behavior

Expected behaviour is to be able to train this Pegasus model on CNN/DM dataset on longer input sequences (> 1024).

<!-- A clear and concise description of what you would expect to happen. -->


Comments:
(This issue has nothing to do with pegasus or input dimension).

+ `max_length` should not be set like that, it refers to the maximum length to generate.
+ You probably don't want to initialize from random. 
e+ You should be using Seq2SeqTrainer, and this script https://github.com/huggingface/transformers/blob/master/examples/seq2seq/finetune_trainer.py#L2

You may need to modify line 188 to pass `max_position_embeddings=2048` and line 189 to pass `model_max_length=2048`.