RuntimeError: Cross Attention in GPTBigCodeModel
### System Info

Code: https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/gpt_bigcode/modeling_gpt_bigcode.py

In the case of cross attention, if `self.c_attn` is initialised to give output of dimension `2 * self.embed_dim` **(Line 112 & 227)**

The `key_value` split in **line 246**,

`key, value = key_value.split((self.head_dim, self.head_dim), dim=-1)`

* would raise an exception _(when self.embeded_dim != self.head_dim)_

`RuntimeError: split_with_sizes expects split_sizes to sum exactly to 2*self.embeded_dim`

_PS - I could be mistaken, but it would be worth having a look (and correct me if I am wrong!)._

### Who can help?

 @ArthurZucker @younesbelkada @sgugger 

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

```
inp = torch.rand((2, 4, 16))
g = GPTBigCodeAttention(config, is_cross_attention=True)
g(inp, encoder_hidden_states=inp)
```

`RuntimeError: split_with_sizes expects split_sizes to sum exactly to 32 (input tensor's size at dimension -1), but got split_sizes=[4, 4]`

### Expected behavior

The forward method should return the attention output of the shape [2, 4, 16].
Hey! Would you mind sharing a full reproduced? (ex the config you are using)? 
This might just be a raise Value error missing and a check on the shapes! <|||||>Sure @ArthurZucker 

Reproducible Code:
```
import torch
from transformers import GPTBigCodeConfig

config = GPTBigCodeConfig(multi_query=False, n_embd=16, n_head=2)
attn = GPTBigCodeAttention(config, is_cross_attention=True)

inp = torch.rand((2, 4, 16))
attn(inp, encoder_hidden_states=inp)
```
Thanks in advance :)<|||||>Bump :) 
@ArthurZucker<|||||>Okay! Thanks for bumping. 
Few things here: 
- `GPTBigCodeAttention` is not in the `__init__` so not on the surface of transformers: we don't really support using it outside in such a way. Having a working snipper which uses a `GPTBigCodeModel` is better. 
- You are not properly setting the arguments that you want to set: `attn.embed_dim` will show `768`. To change the number of heads and the `attn.embed_dim`, use `config = GPTBigCodeConfig(multi_query=False,hidden_size=16, num_attention_heads=2)`
- I don't recommend trying to use it this way, as it is not intended. I tried a few things to see if a quick fix was possible, but it seems that during integration all edge cases were not tested. Especially `add_cross_attention` which is not part of the configuration. 
<|||||>Got it. 
Thanks @ArthurZucker! 