title: Error implementing pretrained BETO model (spanish version of bert) using pytorch
body: <p>I am trying to test this model called BETO (the model is an implementation of Bert in Spanish):</p>
  <pre><code>!pip install transformers
  !wget https://users.dcc.uchile.cl/~jperez/beto/cased_2M/pytorch_weights.tar.gz 
  !wget https://users.dcc.uchile.cl/~jperez/beto/cased_2M/vocab.txt 
  !wget https://users.dcc.uchile.cl/~jperez/beto/cased_2M/config.json 
  !tar -xzvf pytorch_weights.tar.gz
  !mv config.json pytorch/.
  !mv vocab.txt pytorch/.
  
  import torch
  from transformers import BertForMaskedLM, BertTokenizer
  tokenizer = BertTokenizer.from_pretrained(&quot;pytorch/&quot;, do_lower_case=False)
  model = BertForMaskedLM.from_pretrained(&quot;pytorch/&quot;)
  model.eval()
  
  </code></pre>
  <p>the enviroment is as follows:</p>
  <pre><code>platform            debian 10
  transformers            3.4.0
  python                  3.7.3
  torch                   1.7.0
  tensorflow              2.3.1
  </code></pre>
  <p>but in the following line:</p>
  <pre><code>model = BertForMaskedLM.from_pretrained(&quot;pytorch/&quot;)
  </code></pre>
  <p>I get this error:</p>
  <pre><code>Exception has occurred: OSError
  Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
  </code></pre>
  <p>Thanks in advance</p>