title: BM25S: Orders of magnitude faster lexical search via eager sparse
    scoring
summary: We introduce BM25S, an efficient Python-based implementation of BM25 that
  only depends on Numpy and Scipy. BM25S achieves up to a 500x speedup compared
  to the most popular Python-based framework by eagerly computing BM25 scores
  during indexing and storing them into sparse matrices. It also achieves
  considerable speedups compared to highly optimized Java-based implementations,
  which are used by popular commercial products. Finally, BM25S reproduces the
  exact implementation of five BM25 variants based on Kamphuis et al. (2020) by
  extending eager scoring to non-sparse variants using a novel score shifting
  method. The code can be found at https://github.com/xhluca/bm25s
paper_authors._id: 668cb1f1fecd7e0483421c61
paper_authors.name: Xing Han Lù
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2024-07-10T12:52:56.027Z
paper_authors._id: 5fa9ff3ea13e063b8b2b60cb
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1633380224986-5fa9ff3ea13e063b8b2b60cb.jpeg
paper_authors.fullname: Xing Han Lù
paper_authors.type: user
paper_authors.user: xhluca
paper_title: BM25S: Orders of magnitude faster lexical search via eager sparse
    scoring
paper_summary: We introduce BM25S, an efficient Python-based implementation of BM25 that
  only depends on Numpy and Scipy. BM25S achieves up to a 500x speedup compared
  to the most popular Python-based framework by eagerly computing BM25 scores
  during indexing and storing them into sparse matrices. It also achieves
  considerable speedups compared to highly optimized Java-based implementations,
  which are used by popular commercial products. Finally, BM25S reproduces the
  exact implementation of five BM25 variants based on Kamphuis et al. (2020) by
  extending eager scoring to non-sparse variants using a novel score shifting
  method. The code can be found at https://github.com/xhluca/bm25s
paper_ai_summary: BM25S provides a fast and efficient Python implementation of BM25 using sparse matrices and eager scoring, achieving significant speedups over popular Python and Java-based frameworks.