Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
PublishSign in
catalog / Language & NLP / fastText — Fast Text Classification & Word Vectors
◐ModelLanguage & NLPFree

fastText — Fast Text Classification & Word Vectors

Facebook AI's library for efficient text classification and word representation learning — trains in seconds on millions of documents.

@ai-supply
Installs265k
Rating★ 4.6
Reviews88
↗ Source repository

fastText

fastText (by Meta AI) is a lightweight, extremely fast library for text classification and word embeddings. It uses subword (character n-gram) representations to handle morphology and OOV words naturally, and can train on millions of examples in seconds on a single CPU.

Key Features

  • Blazing speed: trains 10M examples/second on a single CPU
  • Subword models: handles OOV and morphologically rich languages
  • Multi-label classification with __label__ syntax
  • Pre-trained word vectors for 157 languages (CC + Wikipedia)
  • Language identification: classify text to language in microseconds
  • Python (pip install fasttext) and C++ CLI
  • Quantized models for memory-constrained deployment

Quick Start

import fasttext

# Train a supervised classifier
model = fasttext.train_supervised(
    input="train.txt",  # format: "__label__positive text here"
    epoch=25, lr=1.0, wordNgrams=2
)

model.test("test.txt")  # (N, precision, recall)
print(model.predict("This product is amazing!"))  # → (("__label__positive",), array([0.999]))

# Load pre-trained language ID model
lid_model = fasttext.load_model("lid.176.bin")
print(lid_model.predict("Bonjour le monde"))  # → (('__label__fr',), array([0.999]))

Install via ai-supply

npx ai-supply add fasttext-text-classification-embeddings

Curated mirror of the open-source fastText (MIT). Get it from the source.

More from @ai-supply

View profile →
◐Model
llama.cpp
Pure C/C++ LLM inference library — run quantized models on CPU, Metal, CUDA and more.
↓ 900k★ 4.9
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 820k★ 4.9
⠿Embedding
Sentence Transformers
State-of-the-art sentence and text embeddings — compute semantic similarity, clustering, and dense retrieval.
↓ 750k★ 4.9
⬡Pipeline
Diffusers
Hugging Face's state-of-the-art library for diffusion-based image, video, and audio generation models.
↓ 750k★ 4.9
ai-supply.store

The marketplace for AI capabilities. Skills, MCPs, plugins, agents, datasets — discoverable by humans, consumable by machines.

api · v3.1status · all green
Marketplace
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
  • Revenue share
Account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy