#5757th of 101 in RAG, knowledge and search

bm25s

Python BM25 library using eagerly computed sparse scores in NumPy

Releases and problems feed (RSS)

Stars
1.8k
License
MIT
Last commit
Nov 2026
Last release
Nov 2026
Language
Python
Stars, last 29 weeks+185
1 May 2026: 1,645 stars8 May 2026: 1,653 stars15 May 2026: 1,662 stars22 May 2026: 1,674 stars29 May 2026: 1,684 stars5 Jun 2026: 1,689 stars12 Jun 2026: 1,698 stars19 Jun 2026: 1,708 stars26 Jun 2026: 1,711 stars3 Jul 2026: 1,718 stars10 Jul 2026: 1,724 stars17 Jul 2026: 1,733 stars24 Jul 2026: 1,742 stars31 Jul 2026: 1,751 stars7 Aug 2026: 1,755 stars14 Aug 2026: 1,759 stars21 Aug 2026: 1,764 stars28 Aug 2026: 1,772 stars4 Sept 2026: 1,778 stars11 Sept 2026: 1,780 stars18 Sept 2026: 1,786 stars25 Sept 2026: 1,789 stars2 Oct 2026: 1,796 stars9 Oct 2026: 1,801 stars16 Oct 2026: 1,805 stars23 Oct 2026: 1,815 stars30 Oct 2026: 1,819 stars6 Nov 2026: 1,823 stars13 Nov 2026: 1,825 stars20 Nov 2026: 1,830 stars

1,645 on 1 May 20261,830 on 20 Nov 2026

From GitHub's daily star counts.

Checked on GitHub.

Overview

bm25s is a Python library for BM25 lexical ranking. It precomputes scores for every document token into sparse matrices, so queries are fast, and it needs only NumPy, with no Java or PyTorch. It includes a tokenizer with stemming and stopwords, five BM25 variants, a CLI, mmap index loading and Hugging Face Hub save/load.

Who it is for: Python developers adding fast keyword search or BM25 retrieval to RAG pipelines

Strengths

  • Only NumPy required; no Java or PyTorch dependency
  • Supports Lucene, Robertson, ATIRE, BM25L and BM25+ variants
  • mmap loading keeps large indices out of RAM
  • Includes CLI, CSV/JSONL loading and Hugging Face Hub index sharing

Weaknesses

  • Lexical matching only; no embeddings or hybrid search built in
  • Library only; no server, UI or REST API
  • Retrieval is position-based, so corpus order must match the index
  • Scores are precomputed at index time, so changes mean re-indexing

What it needs

  • no GPU
  • Needs numpy, PyStemmer (optional), numba (optional), huggingface_hub (optional)

What changed

From the release notes. No flag means the note does not say so, not that the upgrade is safe.

Known problems

Reported, then fixed by a linked change

Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.

Also in RAG, knowledge and search

See all 101
Also in RAG, knowledge and search
RankProjectScore
#55llm-wiki-agentCoding-agent skill that builds an interlinked markdown wiki from ingested documents3.7k stars+83 (+2.3%) in 30 daysMIT59 out of 100
#56orcah-studioSelf-hosted video library indexer with natural-language scene search1.9k starsAGPL-3.059 out of 100
#58obsidian-smart-connectionsObsidian plugin that finds related notes using local embeddings5.6k starscustom license58 out of 100
#59deep-research-web-uiWeb UI that turns a question into a cited research report Live demo ↗ (opens in a new tab)2.2k starsno license57 out of 100
#60ragentJava Agentic RAG platform with hybrid retrieval, MCP tools and admin console Live demo ↗ (opens in a new tab)4.5k stars+163 (+3.7%) in 30 daysApache-2.056 out of 100