skip to content
gigarouter gigarouter
models / embeddings · coming soon

BM25

Qdrant/bm25

published Jun 2024 · updated Jan 2025

BM25 is a sparse text embedding model based on the Okapi BM25 ranking function for estimating the relevance of documents to a search query.

status
coming soon
API providers
0
downloads / mo
769.3K
license
apache-2.0

specs

TaskSparse Text Embedding
ArchitectureBM25 (Okapi BM25 ranking function)
Embedding TypeSparse (bag-of-words with TF-IDF weighting)
Output FormatSparseEmbedding with values and indices arrays

about this model

Qdrant/bm25 is a sparse embedding model that generates BM25-weighted sparse vectors for document and query relevance scoring. It implements the Okapi BM25 ranking function, a probabilistic retrieval framework that estimates document relevance based on term frequency and inverse document frequency.

How it works

The model outputs sparse embeddings where each dimension corresponds to a token's BM25 score. These vectors are designed to be used with Qdrant’s IDF modifier for efficient nearest-neighbor search. The underlying inference is powered by ONNX Runtime, enabling fast, CPU-based execution with minimal dependencies.

Key characteristics

  • Produces sparse embeddings – each vector contains non-zero values only for terms present in the input text.
  • Compatible with Qdrant’s sparse vector indexing and search capabilities.
  • Optimized for lightweight deployment: no GPU required, small library footprint via FastEmbed.
  • Suitable for lexical retrieval tasks where exact term matching and IDF weighting are important.

Performance notes

As a classic BM25 implementation, this model provides deterministic relevance scoring based on term statistics. No benchmark results are provided in the model card; performance depends on the target corpus and query characteristics. It is best evaluated in combination with Qdrant’s retrieval pipeline.

best for

FAQ

What is BM25?

BM25 is a ranking function that estimates document relevance based on term frequency and inverse document frequency.

How does this model differ from dense embedding models?

BM25 produces sparse vectors based on exact term matching, while dense models capture semantic similarity.

How to use this model?

Use the FastEmbed library with SparseTextEmbedding and model name "Qdrant/bm25". For hosted API, use gigarouter's OpenAI-compatible endpoint with your API key.

What is the input/output format?

Input: text documents. Output: SparseEmbedding objects with values and indices arrays.

Is this model suitable for semantic search?

No, it is designed for keyword-based retrieval, not semantic similarity.

not yet live

We're benchmarking and onboarding BM25 as a hosted, OpenAI-compatible API. Sign in for free credit and be ready when it lands, or tell us you want it and we'll prioritize it.

related embeddings models

compare all →