RuntimeError: Overflow when unpacking long during training the model
Author: SAIVENKATARAJU
Pull request: no

Hi I am training the model for custom dataset for QnA task. I have transformers version 4.0.0 and pytorch version 1.7.1. with the following code, I am getting the issue. 
```
trainer = Trainer(
    model=model,                         # the instantiated 🤗 Transformers model to be trained
    args=training_args,                  # training arguments, defined above
    train_dataset=train_dataset,         # training dataset
          # evaluation dataset
)
trainer.train()
```

Error is below:

```
RuntimeError                              Traceback (most recent call last)
<ipython-input-16-3435b262f1ae> in <module>
----> 1 trainer.train()

~/.local/lib/python3.7/site-packages/transformers/trainer.py in train(self, model_path, trial)
    727             self.control = self.callback_handler.on_epoch_begin(self.args, self.state, self.control)
    728 
--> 729             for step, inputs in enumerate(epoch_iterator):
    730 
    731                 # Skip past any already trained steps if resuming training

~/.local/lib/python3.7/site-packages/torch/utils/data/dataloader.py in __next__(self)
    433         if self._sampler_iter is None:
    434             self._reset()
--> 435         data = self._next_data()
    436         self._num_yielded += 1
    437         if self._dataset_kind == _DatasetKind.Iterable and \

~/.local/lib/python3.7/site-packages/torch/utils/data/dataloader.py in _next_data(self)
    473     def _next_data(self):
    474         index = self._next_index()  # may raise StopIteration
--> 475         data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
    476         if self._pin_memory:
    477             data = _utils.pin_memory.pin_memory(data)

~/.local/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py in fetch(self, possibly_batched_index)
     42     def fetch(self, possibly_batched_index):
     43         if self.auto_collation:
---> 44             data = [self.dataset[idx] for idx in possibly_batched_index]
     45         else:
     46             data = self.dataset[possibly_batched_index]

~/.local/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py in <listcomp>(.0)
     42     def fetch(self, possibly_batched_index):
     43         if self.auto_collation:
---> 44             data = [self.dataset[idx] for idx in possibly_batched_index]
     45         else:
     46             data = self.dataset[possibly_batched_index]

<ipython-input-7-80744e22dabe> in __getitem__(self, idx)
      6 
      7     def __getitem__(self, idx):
----> 8         return {key: torch.tensor(val[idx]) for key, val in self.encodings.items()}
      9 
     10     def __len__(self):

<ipython-input-7-80744e22dabe> in <dictcomp>(.0)
      6 
      7     def __getitem__(self, idx):
----> 8         return {key: torch.tensor(val[idx]) for key, val in self.encodings.items()}
      9 
     10     def __len__(self):

RuntimeError: Overflow when unpacking long
```

Comments:
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.

Hi,

I am using transformers version 4.0.0 and pytorch version 1.6.0. I am getting the same error.

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.

I am running transformer 4.14.0 and still have the exact same error randomly during training.

In order to get help faster, please also include all that is asked in the issue template, with the model, dataset used, all software versions as prompted by the template. Thanks!