floret
floret Python bindings
What it is and what it does
floret is a Python binding for an extended fastText implementation that combines fastText's subword tokenization with Bloom embeddings (the "hashing trick") to produce word vectors in a compact hash table. Instead of storing every word and subword separately, floret uses a smaller, fixed-size table and distributes entries across multiple hash rows, reducing memory overhead while maintaining coverage for out-of-vocabulary words.
You train floret models using unsupervised learning (CBOW or skip-gram), configure the hash table size and row count via parameters like `bucket` and `hashCount`, and export vectors in standard or floret-specific formats. The package integrates directly with spaCy, allowing you to import trained floret vectors as spaCy language models. It retains all fastText functionality, so you can switch between standard fastText and floret modes by changing the `mode` parameter.
Use it for:
- Train memory-efficient word embeddings for deployment on resource-constrained devices or large-scale NLP systems.
- Generate embeddings for rare or misspelled words using subword information without storing full fastText vectors.
- Integrate compact pre-trained vectors into spaCy pipelines for production NLP applications.
- Reduce model size in production while maintaining out-of-vocabulary word coverage.
- Experiment with Bloom hashing trade-offs (hash collisions vs. memory) for embedding quality tuning.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
floret trains compact word embeddings using fastText's subword approach combined with Bloom hashing, producing full-coverage vectors that work with spaCy and reduce memory footprint compared to standard fastText.
Yes, if you need compact word embeddings and are willing to work with an aging, Alpha-status package. The MIT license is permissive, install friction is manageable (precompiled wheels available), and there are no known vulnerabilities. However, verify that floret's memory savings and spaCy integration meet your production requirements before committing to it as a core dependency.
Install
floret on PyPI
pip
pip install floretuv
uv add floretpoetry
poetry add floretInstalling floret
Before you install
Medium install friction: compiled wheels available for Python 3.6–3.12 across macOS, Linux, and Windows, but requires numpy. Package is aging (last release 2023-11-04, status: Alpha), though the repository remains active.
License in practice
MIT license is permissive; you can use, modify, and distribute floret freely in commercial and private projects with minimal restrictions.
Quickstart
pip install floret
import floret
model = floret.train_unsupervised(
"data.txt",
model="cbow",
mode="floret",
hashCount=2,
bucket=50000
)
vector = model.get_word_vector("word")
Requires numpy; compiled extension, so platform-specific wheels must match your Python version and architecture.
Verify before relying
- Whether floret's memory savings over fastText are quantified or measurable for typical use cases.
- Current performance or adoption in production NLP pipelines beyond spaCy integration.
- Whether the Alpha status reflects stability concerns or simply incomplete feature coverage.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — numpy |
| Maintenance | aging — 1,014 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 191,118/month — #9,890 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: floret-0.10.5-cp310-cp310-macosx_11_0_arm64.whl; floret-0.10.5-cp310-cp310-macosx_11_0_x86_64.whl; floret-0.10.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; floret-0.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; floret-0.10.5-cp310-cp310-win_amd64.whl; floret-0.10.5-cp311-cp311-macosx_11_0_arm64.whl; floret-0.10.5-cp311-cp311-macosx_11_0_x86_64.whl; floret-0.10.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; floret-0.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; floret-0.10.5-cp311-cp311-win_amd64.whl; floret-0.10.5-cp312-cp312-macosx_11_0_arm64.whl; floret-0.10.5-cp312-cp312-macosx_11_0_x86_64.whl; floret-0.10.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; floret-0.10.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; floret-0.10.5-cp312-cp312-win_amd64.whl; floret-0.10.5-cp36-cp36m-macosx_10_16_x86_64.whl; floret-0.10.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; floret-0.10.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; floret-0.10.5-cp36-cp36m-win_amd64.whl; floret-0.10.5-cp37-cp37m-macosx_10_16_x86_64.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
fasttextfastText is a library for learning word…
permissive · top 5,000 on PyPI
fasttext-wheelfasttext-wheel provides Python bindings for…
permissive · top 5,000 on PyPI
fasttext-numpy2fasttext-numpy2 provides Python bindings for…
permissive · top 5,000 on PyPI
pinecone-textProvides sparse and dense text encoders for…
unclear · top 15,000 on PyPI
fasttext-predictLoads and runs fastText language identification…
permissive · top 5,000 on PyPI
bpembBPEmb provides pre-trained subword embeddings…
permissive · top 15,000 on PyPI
usearchUSearch provides approximate nearest-neighbor…
permissive · top 15,000 on PyPI
fasttext-langdetectIdentifies the language of UTF-8 text using…
permissive · top 15,000 on PyPI
rbloomImplements a Bloom filter data structure in…
unclear · top 15,000 on PyPI
model2vecModel2Vec converts sentence transformers into…
permissive · top 5,000 on PyPI