Repository navigation
fse 2.0.0
fse 2.0.0 is a rewrite. fse is now an inference engine for finished static embedding models: it turns text into vectors on the CPU and trains nothing. Load a Model2Vec model, a supported static Sentence Transformers model or existing word vectors, and encode. fse 1.x stays maintained for bug and compatibility fixes on the branch 1.x.
Upgrading from 1.x
- The Python API and the saved file format have changed.
Average,SIFanduSIFwithtrainandinferbecome anEncoderwithencode. SIF and uSIF weights are fitted once offline and folded into the word rows. Models are saved as safetensors files. - Read Moving from fse 1.x to 2.0 for every replacement, with 1.x and 2.0 code side by side.
- Requires Python 3.11 to 3.15. gensim is optional (
fse[gensim]) and installs on Python 3.11 to 3.13. - License: MIT.
Highlights
- Speed. 100 million WikiText sentences embedded and written to disk in 13.46 seconds (float32 model table, int8 output, 16 workers, AMD EPYC 9575F with 32 vCPU, median of three runs). How we measured.
- Your models.
Encoder.from_pretrainedloads Model2Vec models and static Sentence Transformers models from the Hugging Face Hub or a local folder, and 30 classic word-vector models are on the Hub as fse encoders. - Smaller models.
Encoder.quantize("float16")or("int8")shrinks the model table. - Write and search vectors on disk.
ShardSinkwrites vectors in shards while encoding;VectorStorereads and searches them. - Label text. Bring a trained linear classifier and fold it into the model to label text in the same application.
- Recipes as notebooks for search, classification and more, and pre-built wheels for Linux, macOS and Windows.
The full list of changes is in CHANGELOG.md. The packages are on PyPI.