← all repositories
oborchers/Fast_Sentence_Embeddings

Sentence embeddings when transformers are too slow to bother

fse turns pre-trained word vectors into sentence vectors at hundreds of thousands of sentences per second — no GPU, no neural network, no drama.

★626 stars Python RAG · SearchML Frameworks
Fast_Sentence_Embeddings
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does fse is a Gensim add-on that computes sentence and paragraph vectors from pre-trained word embeddings. It implements three algorithms: plain averaging, smooth inverse frequency (SIF), and unsupervised SIF (uSIF). You feed it a Gensim model or a hub-hosted vector set, train, and get sentence vectors you can compare with model.sv.similarity.

The interesting bit The pitch is throughput: the README claims 300k–500k sentences per second on preprocessed data on a 2016 MacBook, thanks to a Cython core. That’s the boring part, and it’s the whole point — sentence-transformers run 1–10ms per sentence, and if that’s too slow for your corpus, fse trades some quality for two or three orders of magnitude in speed.

Key highlights

  • Average, SIF, and uSIF embeddings on top of any Gensim KeyedVectors, including FastText with out-of-vocabulary words
  • Pre-trained vectors pulled from the Hugging Face hub (GloVe, word2vec, paragram, fasttext variants)
  • Disk-streaming input classes and ram-to-disk / disk-to-disk training for corpora that don’t fit in memory
  • Solid STS Benchmark numbers for a non-neural method — uSIF with paranmt-300 hits 79.20 Pearson
  • Falls back to a slower numpy implementation (with a RuntimeWarning) if the C extension can’t load

Caveats

  • Explicitly in maintenance mode: no new features, compatibility fixes only, and Python 3.14 is blocked until Gensim builds there
  • from_pretrained and load unpickle data — the README warns to only load models you trust
  • The notebooks were written for older versions and haven’t been re-run against 1.1.0

Verdict If you need to embed millions of sentences on CPU and can live with baseline-quality vectors, this is a well-engineered tool. If you want state-of-the-art semantic quality, the README itself points you to sentence-transformers or model2vec.

Frequently asked

What is oborchers/Fast_Sentence_Embeddings?
fse turns pre-trained word vectors into sentence vectors at hundreds of thousands of sentences per second — no GPU, no neural network, no drama.
Is Fast_Sentence_Embeddings open source?
Yes — oborchers/Fast_Sentence_Embeddings is open source, released under the GPL-3.0 license.
What language is Fast_Sentence_Embeddings written in?
oborchers/Fast_Sentence_Embeddings is primarily written in Python.
How popular is Fast_Sentence_Embeddings?
oborchers/Fast_Sentence_Embeddings has 626 stars on GitHub.
Where can I find Fast_Sentence_Embeddings?
oborchers/Fast_Sentence_Embeddings is on GitHub at https://github.com/oborchers/Fast_Sentence_Embeddings.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.