fastembed
Fast, Accurate, Lightweight Python library to make State of the Art Embedding
What is fastembed?
Fast, Accurate, Lightweight Python library to make State of the Art Embedding
Overview of fastembed
What it is
FastEmbed is a lightweight, fast, Python library for embedding generation. It uses the ONNX Runtime instead of PyTorch, which reduces external dependencies and allows it to run without a GPU. The library supports popular text models and is maintained by Qdrant.
Key features
- Lightweight with few external dependencies; no GPU required and no large PyTorch downloads.
- Fast performance using ONNX Runtime and data parallelism for encoding large datasets.
- Supports dense text embeddings, sparse text embeddings (SPLADE++), late interaction models (ColBERT), image embeddings, and late interaction multimodal models (ColPali).
- Includes reranking via text cross encoders.
- Allows adding custom models from Hugging Face or private storage.
- GPU support available through the
fastembed-gpupackage.
Use cases
- Generating embeddings for retrieval-augmented generation (RAG) pipelines.
- Running embedding generation in serverless environments like AWS Lambda.
- Building search and similarity applications with Qdrant or other vector databases.
- Multilingual embedding tasks using supported multilingual models.
Getting started
bash pip install fastembed # or with GPU support pip install fastembed-gpu python from fastembed import TextEmbedding documents = [ 'This is built to be faster and lighter than other embedding libraries e.g. Transformers, Sentence-Transformers, etc.', 'fastembed is supported by and maintained by Qdrant.', ] embedding_model = TextEmbedding() embeddings_list = list(embedding_model.embed(documents))
License and pricing
The license is Apache-2.0. The project is open source and no pricing information is stated.
Based on the project's public README and repository metadata.