title: XLNetForSequenceClassification Pretrained model unable to load
body: <p>I tried loading the XLNet pretrained but this occurred. I've tried this before and it worked, however, now it doesn't. Any suggestion on how to fix this problem?</p>
  
  <pre><code>model = XLNetForSequenceClassification.from_pretrained("xlnet-large-cased", num_labels = 2)
  model.to(device)
  </code></pre>
  
  <pre><code>---------------------------------------------------------------------------
  RuntimeError                              Traceback (most recent call last)
  &lt;ipython-input-55-d6f698a3714b&gt; in &lt;module&gt;()
  ----&gt; 1 model = XLNetForSequenceClassification.from_pretrained("xlnet-large-cased", num_labels = 2)
        2 model.to(device)
  
  3 frames
  /usr/local/lib/python3.6/dist-packages/torch/nn/modules/sparse.py in __init__(self, num_embeddings, embedding_dim, padding_idx, max_norm, norm_type, scale_grad_by_freq, sparse, _weight)
       95         self.scale_grad_by_freq = scale_grad_by_freq
       96         if _weight is None:
  ---&gt; 97             self.weight = Parameter(torch.Tensor(num_embeddings, embedding_dim))
       98             self.reset_parameters()
       99         else:
  
  RuntimeError: Trying to create tensor with negative dimension -1: [-1, 1024]
  </code></pre>