skillfed

fastembed

Fast, light, accurate library built for retrieval embedding generation

fastembed v0.8.0 8.6M downloads/30d#1,603 on PyPI3,140
Permissive license Apache License Active released

What it is and what it does

FastEmbed is a Python library for generating vector embeddings from text, images, and multimodal documents using pre-trained ONNX models. It avoids the overhead of PyTorch by using ONNX Runtime, making it lightweight enough for serverless environments like AWS Lambda. The library supports multiple embedding types: dense embeddings (default Flag Embedding model), sparse embeddings (SPLADE++), late-interaction models (ColBERT), image embeddings (CLIP-based), and multimodal embeddings (ColPali). It also includes reranking via cross-encoders.

The package is built around a simple API: instantiate an embedding model by name, call its embed method with a list of inputs, and iterate over the resulting vectors. Models are downloaded from Hugging Face Hub on first use and cached locally. The library supports custom models and GPU acceleration via the optional fastembed-gpu variant. It integrates directly with Qdrant vector database for retrieval workflows.

Use it for:

  • Build semantic search systems by embedding documents and queries, then finding nearest neighbors in a vector database.
  • Embed product images and descriptions for multimodal e-commerce search without GPU infrastructure.
  • Rerank search results using cross-encoders to improve relevance without recomputing full embeddings.
  • Deploy embedding pipelines in serverless functions where PyTorch dependencies would exceed size limits.
  • Generate sparse embeddings for hybrid search combining keyword and semantic matching.
  • Embed PDF document screenshots with ColPali for document retrieval and question-answering.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

FastEmbed generates vector embeddings for text, images, and multimodal content using ONNX Runtime models, supporting dense, sparse, late-interaction, and reranking approaches without requiring GPU or large PyTorch dependencies.

Yes. FastEmbed is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—generating embeddings without PyTorch overhead. The permissive Apache license and broad model support make it a practical choice for retrieval systems, serverless deployments, and CPU-only environments. Start with it if you need embeddings without GPU or large dependencies.

Install

fastembed on PyPI

pip

pip install fastembed

uv

uv add fastembed

poetry

poetry add fastembed

Installing fastembed

Before you install

Low friction: pure Python wheel with no compiled dependencies beyond ONNX Runtime. Active maintenance (last commit 2026-08-12, 3140 GitHub stars) and supports current Python versions (3.10–3.14). Requires Python >=3.10.0.

License in practice

Licensed under Apache License with permissive treatment, allowing commercial and private use with minimal restrictions.

Quickstart

pip install fastembed

from fastembed import TextEmbedding

documents = ["Example text 1", "Example text 2"]
model = TextEmbedding()
embeddings = list(model.embed(documents))

Requires Python >=3.10.0; models are downloaded on first use and cached locally.

Verify before relying

  • Whether model download size and cache location are configurable for constrained environments.
  • Performance benchmarks comparing ONNX Runtime speed claims against PyTorch-based alternatives.
  • Memory footprint for concurrent embedding operations on large datasets.

Package facts

License Apache License (permissive)
Python support supports the current Python release (>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 10 — huggingface-hub, loguru, mmh3, numpy, onnxruntime, pillow, py-rust-stemmers, requests, tokenizers, tqdm
Maintenance actively maintained — 144 days since the last release
Last repo commit
First released
Downloads 8,608,559/month — #1,603 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fastembed-0.8.0-py3-none-any.whl

Keywords: vector, embedding, neural, search, qdrant, sentence-transformers

License :: Other/Proprietary LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

text embedding generationvector embeddings lightweightonnx embedding modelssemantic search embeddingsimage embedding libraryretrieval embedding fastmultimodal embedding modelssentence embeddings cpu
embeddingsvector-searchonnx-runtime

More Artificial Intelligence packages