 RuntimeError: storage has wrong size: expected -1451456236095606723 got 1024
## 🐛 Bug
##  RuntimeError: storage has wrong size: expected -1451456236095606723 got 1024
<!-- Important information -->

Model I am using GPT-2:

Language I am using the model on English:

The problem arise when using:
* [ ] i was trained and build GPT-2 model with my own corpus.
* [ ] when i `*tested in different CPU systems this issue arised`

The tasks I am working on is:
* [ ] **Language Model fine-tuning task**
* [ ] my own task or dataset: (with my own corpus (1000 lines))

## To Reproduce

Steps to reproduce the behavior:

1. i checked transformers pip version
2. i checked torch version mismatching or not
3. and then **tested in different CPU systems. it is throwing this issue**.

> python run.py 
> To use data.metrics please install scikit-learn. See https://scikit-learn.org/stable/index.html
> INFO:transformers.tokenization_utils:Model name '/home/dell/ashok/Masking_technique/gpt-2_modelfiles' not found in model shortcut name list (gpt2, gpt2-medium, gpt2-large). Assuming '/home/dell/ashok/Masking_technique/gpt-2_modelfiles' is a path or url to a directory containing tokenizer files.
> INFO:transformers.tokenization_utils:loading file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/vocab.json
> INFO:transformers.tokenization_utils:loading file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/merges.txt
> INFO:transformers.tokenization_utils:loading file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/added_tokens.json
> INFO:transformers.tokenization_utils:loading file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/special_tokens_map.json
> INFO:transformers.tokenization_utils:loading file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/tokenizer_config.json
> INFO:transformers.configuration_utils:loading configuration file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/config.json
> INFO:transformers.configuration_utils:Model config {
>   "attn_pdrop": 0.1,
>   "embd_pdrop": 0.1,
>   "finetuning_task": null,
>   "initializer_range": 0.02,
>   "layer_norm_epsilon": 1e-05,
>   "n_ctx": 1024,
>   "n_embd": 768,
>   "n_head": 12,
>   "n_layer": 12,
>   "n_positions": 1024,
>   "num_labels": 1,
>   "output_attentions": false,
>   "output_hidden_states": false,
>   "pruned_heads": {},
>   "resid_pdrop": 0.1,
>   "summary_activation": null,
>   "summary_first_dropout": 0.1,
>   "summary_proj_to_labels": true,
>   "summary_type": "cls_index",
>   "summary_use_proj": true,
>   "torchscript": false,
>   "use_bfloat16": false,
>   "vocab_size": 50257
> }
> 
> INFO:transformers.modeling_utils:loading weights file /home/dell/ashok/Masking_technique/gpt-2_modelfiles/pytorch_model.bin
> Traceback (most recent call last):
>   File "run.py", line 19, in <module>
>     model = GPT2LMHeadModel.from_pretrained('/home/dell/ashok/Masking_technique/gpt-2_modelfiles')
>   File "/home/dell/ashok/Masking_technique/env_inference/lib/python3.6/site-packages/transformers/modeling_utils.py", line 345, in from_pretrained
>     state_dict = torch.load(resolved_archive_file, map_location='cpu')
>   File "/home/dell/ashok/Masking_technique/env_inference/lib/python3.6/site-packages/torch/serialization.py", line 386, in load
>     return _load(f, map_location, pickle_module, **pickle_load_args)
>   File "/home/dell/ashok/Masking_technique/env_inference/lib/python3.6/site-packages/torch/serialization.py", line 580, in _load
>     deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
> RuntimeError: storage has wrong size: expected -1451456236095606723 got 1024

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment For inference

* OS: Ubuntu 16.04, 8 GB RAM
* Python version: Python 3.6.8
* PyTorch version: Version: 1.2.0+cpu
* PyTorch Transformers version (or branch): Version: 2.0.0
* Using GPU : No. CPU only
* Distributed of parallel setup : No
* Any other relevant information:

## Additional context
1.  **when i tested model on trained environement, It is working fine. but different CPU systems it is throwing this issue.**
Hi, what do you mean by different CPU systems? Do you mean that you tried it with different CPU architectures like ARM/x86? On which CPU did it fail?<|||||>Thank you so much for your reply sir.
** Different CPUs means** - normal CPU system it is not working. I tested two more CPU system for inferencing own model. It was arising this issue. 

CPU architecture is normal Ubuntu 16.04 & 18.04 64 bit 8 GB RAM. 

I don't know much about CPU architecture sir. :relaxed:<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
