How to pass `past_key_values` to GPTNeo model?
How to pass `past_key_values` to the GPTNeo model?
  
I want to pass `past_key_values` to the GPTNeo model. I set `past_key_values` as a size Tuple[Tuple[torch.Tensor]] => `(num_layers, 2, batch_size, seq_length, num_heads, d_head)`. But I got a below error message.

```
Original Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker
    output = module(*input, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/kaki_ai/test/big-lm/prefix_tuning/models/prefix_tuning_gpt_neo.py", line 61, in forward
    use_cache=True
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/kaki_ai/test/big-lm/prefix_tuning/models/gpt_neo_for_causal_lm_wrapper.py", line 87, in forward
    return_dict=return_dict,
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/kaki_ai/test/big-lm/prefix_tuning/transformers/models/gpt_neo/modeling_gpt_neo.py", line 866, in forward
    output_attentions=output_attentions,
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/kaki_ai/test/big-lm/prefix_tuning/transformers/models/gpt_neo/modeling_gpt_neo.py", line 563, in forward
    output_attentions=output_attentions,
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/kaki_ai/test/big-lm/prefix_tuning/transformers/models/gpt_neo/modeling_gpt_neo.py", line 505, in forward
    output_attentions=output_attentions,
  File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/kaki_ai/test/big-lm/prefix_tuning/transformers/models/gpt_neo/modeling_gpt_neo.py", line 412, in forward
    key_value_hidden_states = torch.cat([past, hidden_states], dim=1)
RuntimeError: Tensors must have same number of dimensions: got 3 and 4
```

@patil-suraj 
never mind. I solved it.<|||||>How? I find the shape of `past_key_values` is very strange.