Code librariesReviewed · oborchers

Fast Sentence Embeddings (fse)

Fast Sentence Embeddings (fse) is a Python library for developers that turns text into lists of numbers (vectors, also called embeddings) for search, clustering and classification, running ready-made static models on a CPU without a GPU. It runs supported trained linear classifiers and provides batch and disk-storage paths for large workloads. The static models it runs can handle ambiguous meaning and difficult searches less well than contextual transformer models such as MiniLM or BGE, which fse does not run. Its reported speed depends on the model, hardware and output format; some documented features require the development version.

Researched 14 Nov 2026

In short.

Fast Sentence Embeddings is a Python library for developers who want to turn text into numerical vectors (embeddings) for search and clustering, and to label text with trained linear classifiers, on a CPU. The static models it runs may handle ambiguous meaning and difficult searches less well than contextual transformer models, which fse does not run. It runs compatible Model2Vec and static Sentence Transformers models, supports classic word vectors, and offers disk sinks for outputs that exceed RAM. The README reports high throughput under specific benchmark conditions, which have not been independently reproduced here. It distinguishes fse 2.0 functionality from several classification and score-storage examples requiring unreleased 2.1 or installation from master. Model quality, operating costs and application reliability remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

The selected source is only README.md at [https://github.com/oborchers/Fast_Sentence_Embeddings/blob/master/README.md], represented by its captured contents at revision 060e2eded160b05a5598f68aa625f660310a9a98. The accompanying LICENSE and NOTICE were also supplied in full and inform the rights analysis. Implementation files, linked documentation, migration guides, notebooks, benchmark artifacts, images, model weights, model cards and datasets are excluded from the assessed contents. The unchanged captured README is eligible for redistribution with the supplied notices. No software behavior or benchmark was executed or independently verified.

The overview

Identity

Fast Sentence Embeddings, imported as fse, is a Python inference library maintained in Oliver Borchers's Fast_Sentence_Embeddings repository. It turns text into numerical vectors for search, clustering and classification and runs previously trained supported linear models. The repository is [https://github.com/oborchers/Fast_Sentence_Embeddings].

It runs finished static models; it does not train or distill embedding models. It is a library to incorporate into an application rather than a hosted search service.

Assessment

The strongest fit is high-volume processing where a suitable static model already meets the application's quality needs. The library addresses tokenization, encoding, output allocation and persistence together, making it relevant when overhead and large result arrays matter.

The README reports approximately 6.6 million texts per second for POTION-8M with float32 output and 16 workers on an AMD EPYC 9575F with 32 vCPU, using 18 million WikiText sentences on 2 November 2026. Its headline exceeding seven million uses a different setup: int8 output and 100 million sentences. These are source-reported results, not independently reproduced measurements.

Comparative speedups need their configuration context. For example, the README says Model2Vec's default thread path used about four CPUs despite having 16 allowed. The evidence does not establish equivalent gains on a laptop, short interactive requests or another dataset.

Users

Python developers building local search, clustering, document filtering or support-request routing are the intended users. Data engineers processing files or streams may benefit from disk sinks and resumable storage without collecting every vector in RAM.

Existing Model2Vec users have a similar loading and encoding interface, although compatibility has limits. Teams needing contextual transformers, embedding-model training or neural classification heads with hidden layers should consider other tools.

Capabilities

The README describes loading compatible Model2Vec and static Sentence Transformers models, using classic word vectors through an optional gensim adapter, and quantizing model tables to float16 or int8. Encoding can return NumPy arrays or write to disk-backed stores. Truncation reports can identify inputs cut by the model's token limit.

Supported trained linear classifiers can run directly on text and be saved for later prediction without scikit-learn. Separate integration packages expose embeddings to LangChain, LlamaIndex and Haystack.

Named groups of heads, persistent score stores and later threshold changes are documented in a section requiring fse 2.1 or master until 2.1 is released. Their presence in the README does not establish availability in fse 2.0.

Using it

Requirements

The README specifies Python 3.11 through 3.15 and CPU execution without a GPU. It lists wheel targets for Linux x86_64 and aarch64 with glibc or musl, macOS Apple Silicon, and Windows x86_64. Minimum RAM, CPU instruction requirements and installation behavior on other platforms are unknown.

The first pretrained-model load downloads its files, and model licenses apply separately. POTION-base-8M is listed at 29.2 MiB in fse float32 format, but file size does not establish total runtime memory. An 18-million-row output with 256 float32 values per row alone occupies about 18.4 GB.

Training the illustrated linear classifier requires scikit-learn and application-specific labeled data. Framework integrations and the gensim adapter are optional dependencies.

Mechanism

Static models assign each word or word piece a fixed vector. Combining those vectors produces a sentence representation without running a contextual transformer. The README describes a compiled CPU path that groups tokenization and vector calculation, parallel workers, and direct output writing.

For supported linear heads trained on plain averages, fse can apply the classifier weights to each token vector beforehand. Averaging those smaller score vectors and adding the bias then replaces a full sentence vector followed by a matrix multiplication. This follows W × mean(v) + b = mean(W × v) + b.

Normalization prevents that fold, so heads trained on normalized vectors run explicitly. Hidden-layer neural heads are unsupported. Requesting sentence vectors alongside scores also gives up the narrower folded computation.

Setup

The documented baseline installation command is pip install "fse>=2.0". Existing fse 1.x users are directed to a migration guide; that guide's contents are not included in the evidence.

Load a compatible model with Encoder.from_pretrained and pass strings to encode. Start with float32, then evaluate float16 or int8 if memory is a constraint. For results larger than available RAM, the README recommends a ShardSink or vector store.

For the examples explicitly requiring 2.1, the README gives pip install "git+https://github.com/oborchers/Fast_Sentence_Embeddings.git" while 2.1 remains unreleased. This command follows a moving branch. The exact package version installed by either command is unknown.

Example

The README's minimal encoding example is: from fse import Encoder encoder = Encoder.from_pretrained("minishlab/potion-base-8M") vectors = encoder.encode(["the cat sleeps", "a dog runs"])

The documented result is a NumPy array with one row per input text. This illustrates preparing vectors for a downstream task; it does not build a complete search application or establish retrieval accuracy.

For request routing, the README separately demonstrates training LogisticRegression on this encoder's vectors and importing it with Classifier.from_sklearn. Its four training texts demonstrate the API only. Useful routing requires representative labeled data and evaluation. Neither example was executed.

Assessment & evidence

Limitations

fse does not run contextual transformers such as MiniLM or BGE. Static representations may handle ambiguity and difficult semantic searches less well. Model token limits still apply; the README gives 512 tokens for Model2Vec models and describes optional truncation reporting or errors. Without those options, truncation is not recorded.

The Model2Vec-like API is not complete format interchangeability. Conversion can change float32 rounding, and fse save_pretrained and push_to_hub exports are fse folders rather than Model2Vec 0.10.0 export files.

Storage has explicit boundaries. Each writing machine needs its own store; multiple writers in one store can race. Shared views must be reopened to see new shards, network drives are outside the stated local APFS/ext4/XFS crash contract, and vector and score folders have no atomic commit across both.

Returning a single array from an input of unknown length still collects and joins output parts. Disk sinks are the documented option for large streams.

Reasoning

The architectural case for fse is reducing the work around a static model: repeated tokenization overhead, vector pooling, output handling and, for eligible classifiers, per-text matrix multiplication. This is useful when throughput or memory is a practical bottleneck.

Moving an existing compatible static model to fse does not require choosing a different embedding model, although numerical conversion differences still need checking. Choosing static embeddings instead of a contextual model is a separate quality decision.

The README's quality table reports an unweighted mean over 40 of 41 English MTEB tasks, omitting MIND. It also warns that some classic-model benchmark preparation differs from the linked Hub models. Those scores cannot establish quality for a particular application or every downloadable artifact.

Alternatives

The README positions Model2Vec as an alternative when creating, distilling or fine-tuning static models is required. Sentence Transformers covers contextual models, training and a broader model ecosystem. gensim and Doc2Vec are alternatives for training word-vector or document-vector models.

FastEmbed and model2vec-rs also appear in the README's inference comparisons. Those comparisons concern specific models, inputs and worker configurations; they do not establish an overall winner across features, platforms or workloads. The alternatives' own documentation was not supplied.

Evidence

The substantive technical evidence is the README at revision 060e2eded160b05a5598f68aa625f660310a9a98, available at [https://raw.githubusercontent.com/oborchers/Fast_Sentence_Embeddings/060e2eded160b05a5598f68aa625f660310a9a98/README.md]. LICENSE and NOTICE provide the accompanying rights evidence.

The README includes APIs, benchmark tables, platform claims and operational caveats. Its linked implementation, benchmark records, notebooks, model cards and images are not independently examined evidence here. Installation, encoding, classification, performance and crash recovery were not executed or tested.

Access & freshness

Costs

The supplied MIT license grants permission free of charge. Actual operating costs are unknown: CPU time, RAM, downloads, storage and any rented machines depend on the workload.

The README identifies RunPod hardware for several benchmarks but gives no rental prices or monetary cost per workload. It therefore does not establish a cost per million texts. Model and dataset terms are separate from the library license.

Rights

The supplied LICENSE permits use, modification, distribution, sublicensing and sale of the software and associated documentation under MIT terms, provided the copyright and permission notice accompany copies or substantial portions. It provides no warranty. The README states that fse 2.0 uses MIT while 1.x releases remain GPL-3.0.

NOTICE identifies fastText-derived hashing under MIT, Unicode data under Unicode License v3, and Arrow interface structs copied from Apache Arrow specifications associated with Apache License 2.0. Applicable copyright, permission and third-party notices must be preserved.

Model weights and datasets have their own licenses. The library's MIT terms do not establish permission for every linked model or dataset; those individual terms are outside the supplied evidence.

Freshness

The supplied snapshot was captured on 14 November 2026 at 10:07:15.940 UTC. Its reported speed and quality measurements date mainly to 1–2 November 2026.

At this revision, the README treats 2.0 as the installation baseline and says several examples require 2.1, with master installation until that release. Whether 2.1 has subsequently shipped is unknown. Links to master and unpinned installation commands can change beyond this snapshot.

Actions

Before adoption, compare a suitable static model with the current approach on representative search queries or labeled examples. Measure the quality needed by the application, then measure throughput and peak memory on the intended CPU with realistic text lengths, worker counts and output precision.

Check truncation rates, especially for documents. If quantizing, compare quality again. If importing a linear head, train it on the same encoder configuration and check predictions after conversion; load with normalize=False before training when folding is intended.

Confirm the release supporting each required API, pin a reproducible dependency and model revision, and check the chosen model's license. For persistent workloads, evaluate interruption and resume behavior on the intended filesystem, including any coordination needed between vector and score stores.

Evidence for this report

LICENSEnotice · checked 2026-11-14
NOTICEnotice · checked 2026-11-14
README.mdselected · checked 2026-11-14