talira

FastEmbed

Fast, light, accurate library built for retrieval embedding generation

open sourceApache-2.0self-hostablefree

FastEmbed is Qdrant's Python library for running embedding and reranking models locally on ONNX Runtime instead of PyTorch, so it installs without GBs of dependencies or a GPU and fits serverless runtimes such as AWS Lambda. It covers dense text embeddings (BGE by default), sparse embeddings (SPLADE++, BM42), late-interaction ColBERT and ColPali models, image embeddings (CLIP) and cross-encoder rerankers, downloading models on first use, and custom models can be added. A fastembed-gpu package runs the same models on CUDA, and qdrant-client uses it to embed documents for you.

Problems it solves

  • generate embeddings in Python without installing PyTorch
  • embeddings for semantic search that run locally for free
  • rerank search results on CPU without calling an API
  • my sentence-transformers Docker image is several gigabytes
  • compute embeddings inside AWS Lambda where PyTorch is too big
  • sparse and dense vectors for hybrid search from one library
  • run open embedding models on CPU fast enough for production indexing
  • I want qdrant-client to embed my documents for me
  • load a custom ONNX embedding model from Hugging Face in a few lines
  • image and text embeddings for search without a GPU
  • stop paying for embedding API calls while indexing millions of documents

Features

  • ONNX Runtime instead of PyTorch
  • dense, sparse (SPLADE++, BM42) and late-interaction (ColBERT, ColPali) embeddings
  • image embeddings (CLIP)
  • cross-encoder rerankers
  • custom models via add_custom_model
  • data-parallel encoding of large datasets
  • GPU support through fastembed-gpu

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what FastEmbed does.

  1. Model2Vec Fast state-of-the-art static embeddings, and lightweight classifiers trained on top of them
  2. fastembed-rs Rust library for generating vector embeddings, reranking locally

Compare FastEmbed with the top 3