--- license: pddl language: - en library_name: fse tags: - fse - gensim - glove - word-embeddings - sentence-embeddings --- # GloVe Twitter (100 dimensions) Pre-trained GloVe vectors for 1,193,514 words and tokens, trained on 2 billion tweets (27 billion tokens), uncased. This is a [gensim](https://radimrehurek.com/gensim/) model, packaged for [fse (Fast Sentence Embeddings)](https://github.com/oborchers/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, choose a finished encoder from the [classic model catalog](https://github.com/oborchers/Fast_Sentence_Embeddings/blob/master/docs/models.md). See the [migration guide](https://github.com/oborchers/Fast_Sentence_Embeddings/blob/master/docs/migrating-from-1x.md) before upgrading. ```bash pip install "fse<2" ``` ```python from fse import SIF, IndexedList, Vectors vectors = Vectors.from_pretrained("glove-twitter-100") 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("glove-twitter-100", mmap="r")` memory-maps the vectors instead of loading them into RAM. ## Files | File | Content | |---|---| | `glove-twitter-100.model` | gensim `KeyedVectors` (vocabulary and metadata) | | `glove-twitter-100.model.vectors.npy` | 1,193,514 × 100 float32 vectors (477 MB) | ## Source and license The vectors were published by the Stanford NLP Group with [GloVe](https://nlp.stanford.edu/projects/glove/) under the [Public Domain Dedication and License](https://opendatacommons.org/licenses/pddl/). This repository redistributes them in the gensim format. - Pennington, Socher and Manning (2014), [GloVe: Global Vectors for Word Representation](https://nlp.stanford.edu/pubs/glove.pdf) ## About fse fse is maintained by [Dr. Oliver Borchers](https://www.drborchers.com/). Source code, documentation and the STS benchmark of all vector sets in this organization: [github.com/oborchers/Fast_Sentence_Embeddings](https://github.com/oborchers/Fast_Sentence_Embeddings).