`self.encoder_attn` not defined for PyTorch XGLM
## 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: 4.17.0
- Platform: Ubuntu
- Python version: 3.7
- PyTorch version (GPU?): 1.10.0+cu111
- Tensorflow version (GPU?): NA
- Using GPU in script?: Y
- Using distributed or parallel set-up in script?: N

### Who can help
@patil-suraj 

## Information

Model I am using (Bert, XLNet ...): XGLM

The problem arises when using:
* [ ] the official example scripts: (give details below)
* [x] my own modified scripts: (give details below)

The tasks I am working on is:
* [ ] an official GLUE/SQUaD task: (give the name)
* [x] my own task or dataset: (give details below)

## To reproduce

Steps to reproduce the behavior:

```python
tokenizer = XGLMTokenizer.from_pretrained("facebook/xglm-564M")
model = EncoderDecoderModel.from_encoder_decoder_pretrained("facebook/xglm-564M", "facebook/xglm-564M")

model.config.decoder_start_token_id = tokenizer.cls_token_id
model.config.pad_token_id = tokenizer.pad_token_id

inputs = tokenizer("Test input", return_tensors="pt").input_ids
labels = tokenizer("Test label", return_tensors="pt").input_ids

with torch.no_grad():
    outputs = model(input_ids=inputs, labels=labels)

print(outputs.loss)
```

You should get:

```python

AttributeError: 'XGLMDecoderLayer' object has no attribute 'encoder_attn'
```

This is because `self.encoder_attn` [here](https://github.com/huggingface/transformers/blob/master/src/transformers/models/xglm/modeling_xglm.py#L472) hasn't been defined. It looks like it should be an instance of `XGLMAttention` looking at the Flax version [here](https://github.com/huggingface/transformers/blob/master/src/transformers/models/xglm/modeling_flax_xglm.py#L330).

## Expected behavior

The example above should print out a loss number.

Thanks!

Good catch! Should be fixed in https://github.com/huggingface/transformers/pull/16290