title: How to load pre-trained glove model with gensim load_word2vec_format?
body: <p>I am trying to load a pre-trained glove as a word2vec model in gensim. I have downloaded the glove file from <a href="https://nlp.stanford.edu/projects/glove/" rel="nofollow noreferrer">here</a>. I am using the following script:</p>
  <pre><code>from gensim import models
  model = models.KeyedVectors.load_word2vec_format('glove.6B.300d.txt', binary=True)
  </code></pre>
  <p>but get the following error</p>
  <pre><code>ValueError                                Traceback (most recent call last)
  &lt;ipython-input-38-e0b48b51f433&gt; in &lt;module&gt;()
        1 from gensim import models
  ----&gt; 2 model = models.KeyedVectors.load_word2vec_format('glove.6B.300d.txt', binary=True)
  
  2 frames
  /usr/local/lib/python3.6/dist-packages/gensim/models/utils_any2vec.py in &lt;genexpr&gt;(.0)
      171     with utils.smart_open(fname) as fin:
      172         header = utils.to_unicode(fin.readline(), encoding=encoding)
  --&gt; 173         vocab_size, vector_size = (int(x) for x in header.split())  # throws for invalid file format
      174         if limit:
      175             vocab_size = min(vocab_size, limit)
  
  ValueError: invalid literal for int() with base 10: 'the'
  </code></pre>
  <p>What is the underlying problem? Does gensim need a specific format to be able to load it?</p>