fasttext
fasttext Python bindings
Decision gist · record as of 2026-08-14
Yes, if you need lightweight word embeddings or text classification and can tolerate an archived codebase. The library is stable and widely used, with no known vulnerabilities, but expect no new features or bug fixes. Install friction is moderate due to C++ compilation; pre-built wheels may not cover all platforms. Suitable for production use of existing models or training on stable datasets, but not for active development or cutting-edge NLP research.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C++11-capable compiler and pybind11 for compilation during installation.
- UTF-8 encoded input text is mandatory; text must be unicode (Python 2) or str (Python 3).
- Medium install friction due to C++11 compilation requirements via pybind11.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute fastText freely provided you include the license notice.
last release 2024-06-12 (793 days) · last repo commit 2024-03-22 · 26,540 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,430,751 downloads/mo, #3,069 on PyPI
Alternatives
Verify before relying
pip install fasttext
import fasttext
# Train unsupervised word vectors
model = fasttext.train_unsupervised('data.txt', model='skipgram')
print(model['king']) # retrieve word vector
# Or train supervised text classifier
model = fasttext.train_supervised('data.train.txt')
model.predict("sample text")- Current compatibility with Python versions beyond 3.6 (classifiers list 3.4–3.6 but latest release is 2024-06-12)
- Whether pre-built wheels are available for all major platforms or if compilation is typically required
What it is and what it does
fastText is a C++ library wrapped for Python that learns dense word representations (embeddings) and trains text classifiers. It uses subword information to build word vectors and supports both unsupervised learning (skipgram and CBOW models) and supervised text classification. The library is designed for efficiency and can handle large datasets.
You use fastText by calling train_unsupervised() to learn word vectors from raw text, or train_supervised() to train a classifier from labeled text. Once trained, you can retrieve word vectors, make predictions on new text, evaluate model performance, and save/load models to disk. The library requires numpy, pybind11, and setuptools as runtime dependencies. Input text must be UTF-8 encoded, and the library tokenizes on ASCII whitespace and control characters.
Use it for
- Build word embeddings from large text corpora for downstream NLP tasks like clustering or similarity search.
- Train a text classifier to categorize documents or messages into predefined labels with minimal preprocessing.
- Compress trained classifier models using quantization to reduce file size for production deployment.
- Generate sentence representations by averaging subword vectors for fast semantic similarity comparisons.
- Experiment with different embedding models (skipgram vs. CBOW) on custom datasets without external dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight word embeddings or text classification and can tolerate an archived codebase.
The library is stable and widely used, with no known vulnerabilities, but expect no new features or bug fixes. Install friction is moderate due to C++ compilation; pre-built wheels may not cover all platforms. Suitable for production use of existing models or training on stable datasets, but not for active development or cutting-edge NLP research.
Install
fasttext on PyPI
Before you install
Medium install friction due to C++11 compilation requirements via pybind11. The repository is archived and the last commit was 2024-03-22, indicating the project is no longer actively maintained, though it remains functional for existing use cases.
Requires a C++11-capable compiler and pybind11 for compilation during installation. UTF-8 encoded input text is mandatory; text must be unicode (Python 2) or str (Python 3).
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute fastText freely provided you include the license notice.
Quickstart
pip install fasttext
import fasttext
# Train unsupervised word vectors
model = fasttext.train_unsupervised('data.txt', model='skipgram')
print(model['king']) # retrieve word vector
# Or train supervised text classifier
model = fasttext.train_supervised('data.train.txt')
model.predict("sample text")
Verify before relying
- Current compatibility with Python versions beyond 3.6 (classifiers list 3.4–3.6 but latest release is 2024-06-12)
- Whether pre-built wheels are available for all major platforms or if compilation is typically required
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagespybind11setuptoolsnumpy |
| Maintenance | Abandoned 793 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 2,430,751 / month, #3,069 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Scientific/EngineeringTopic :: Software Development |
Evidence: fasttext-0.9.3-cp39-cp39-macosx_14_0_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “word embeddings library”
- fasttextfastText is a library for learning word embeddings and training text…
- fasttext-numpy2fasttext-numpy2 provides Python bindings for fastText, a library for…
- fasttext-wheelfasttext-wheel provides Python bindings for fastText, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also fasttext-numpy2 · fasttext-predict · fasttext-wheel · floret · fast-langdetect · fasttext-langdetect · model2vec · setfit · alt-profanity-check · sentence-transformers