word2vec Google News (300 dimensions)
Pre-trained word2vec vectors for 3 million English words and phrases, trained on part of the Google News dataset (about 100 billion words). The phrases were obtained with the data-driven approach described in "Distributed Representations of Words and Phrases and their Compositionality".
This is a gensim model, packaged for fse (Fast Sentence Embeddings), which turns word vectors into sentence vectors with CBOW averaging, SIF and uSIF.
Usage
This repository uses the fse 1.x API and requires fse<2.
For fse 2.0, use fse/word2vec-google-news-300-raw for a finished mean encoder.
See the migration guide before upgrading.
pip install "fse<2"
from fse import SIF, IndexedList, Vectors
vectors = Vectors.from_pretrained("word2vec-google-news-300")
model = SIF(vectors)
sentences = IndexedList([["hello", "world"], ["fast", "sentence", "embeddings"]])
model.train(sentences)
model.sv[0] # the vector of the first sentence
Vectors.from_pretrained("word2vec-google-news-300", mmap="r") memory-maps the vectors instead of loading them into RAM.
Files
| File | Content |
|---|---|
word2vec-google-news-300.model |
gensim KeyedVectors (vocabulary and metadata) |
word2vec-google-news-300.model.vectors.npy |
3,000,000 × 300 float32 vectors (3.6 GB) |
Source and license
The vectors were published by Google with the word2vec project, which is licensed under the Apache License 2.0. This repository redistributes them in the gensim format.
- Mikolov et al. (2013), Efficient Estimation of Word Representations in Vector Space
- Mikolov et al. (2013), Distributed Representations of Words and Phrases and their Compositionality
About fse
fse is maintained by Dr. Oliver Borchers. Source code, documentation and the STS benchmark of all vector sets in this organization: github.com/oborchers/Fast_Sentence_Embeddings.