AB

alessandrobenigni/bm25-turbo-rust-python-wasm-cli

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

51 stars 2 forks 품질 55 트렌드 13AGPL-3.0

가장 빠른 BM25 득점 엔진: 2,300x BM25S. 8.8M 문서에 28K QPS 보다는 더 빠른. 5 BM25 변종 (Robertson, Lucene, ATIRE, BM25L, BM25+). Memory-mapped persistence, BMW Pruning, 스트리밍 인덱스.

개요

BM25 터보 얀 녹 · 파이썬 · WASM · CLI 가장 빠른 BM25 득점 엔진. 기간. 8.8백만개의 문서에. . BMW Pruning, Memory-mapped persistence, Zero-copy index 로드를 가진 Precomputed sparse BM25. RAG 파이프라인, 검색 응용 프로그램 및 ML 워크플로우 내장. 대부분의 BM25 라이브러리는 쿼리 시간에서 점수를 계산합니다. - 모든 요청에 대해 삭제 된 인덱스를 스캔합니다. BM25 터보는 반대 접근 방식을 취합니다. 압축된 비소 열 (CSC) 매트릭스. Queries는 서빙 시간에 수학을하지 않고 비소 벡터를 볼 수 있습니다. 이 BM25 터보를 적절한 선택 할 때 : - 당신은 (RAG, reranking, 일괄 평가) - 필요한 (ML 파이프라인, 실험) - 당신은 원하는 (3 줄 색인, 1 줄 쿼리) - 당신은 전체 검색 서버가 필요하지 않습니다 MS MARCO (8,841,823 문서, 509,962 쿼리)에 벤치 마크 - 표준 정보 검색 벤치 마크. BMW pruning 활성화. 단일 스레드. 100K docs의 밑에 corpora에 Sub-millisecond.

개요(AI 번역)

BM25 터보 ⚡ Rust · Python · WASM · CLI 가장 빠른 BM25 득점 엔진. 기간.


**28,217 쿼리/둘째 ** 8.8 백만개의 문서. 8.6ms P50 대기시간. BMW Pruning, Memory-mapped persistence, Zero-copy index 로드를 가진 Precomputed sparse BM25. RAG 파이프라인, 검색 응용 프로그램 및 ML 워크플로우 내장.

왜 BM25 터보?

대부분의 BM25 라이브러리는 쿼리 시간에서 점수를 계산합니다. - 모든 요청에 대해 삭제 된 인덱스를 스캔합니다. BM25 터보는 반대 접근 방식을 취합니다. ** 인덱스 시간에 모든 BM25 점수를 할당 ** 압축 된 비소 열 (CSC) 매트릭스로. Queries는 서빙 시간에 수학을하지 않고 비소 벡터를 볼 수 있습니다.

이 BM25 터보에게 적합한 선택을 할 때 만듭니다:

  • 당신은 ** (RAG, reranking, 일괄 평가) 같은 지수를 정복
  • 당신은 ** 통계, 재현 점수 ** (ML 파이프라인, 실험)
  • 당신은 ** 간단한 API ** (3 줄 색인, 1 줄 쿼리)
  • **search 기능을 구축하고 ** 전체 검색 서버를 필요로하지 마십시오

성과

MS MARCO (8,841,823 문서, 509,962 쿼리)에 벤치 마크 - 표준 정보 검색 벤치 마크. BMW pruning 활성화. 단일 스레드.

Query 처리량

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

BM25 Turbo ⚡ Rust · Python · WASM · CLI The fastest BM25 scoring engine. Period.


28,217 queries/second on 8.8 million documents. 8.6ms P50 latency. Precomputed sparse BM25 with BMW pruning, memory-mapped persistence, and zero-copy index loading. Built for RAG pipelines, search applications, and ML workflows.

use bm25_turbo::{BM25Builder, Method};

let index = BM25Builder::new()
    .method(Method::Lucene)       // Robertson, Lucene, ATIRE, BM25L, BM25+
    .k1(1.5).b(0.75)
    .build_from_corpus(&[
        "Rust is a systems programming language",
        "BM25 is a ranking function used in information retrieval",
        "Machine learning models benefit from fast retrieval",
    ])?;

let results = index.search("information retrieval", 10)?;
for (id, score) in results.doc_ids.iter().zip(results.scores.iter()) {
    println!("doc {} → {:.4}", id, score);
}

Why BM25 Turbo?

Most BM25 libraries compute scores at query time — scanning inverted indexes on every request. BM25 Turbo takes the opposite approach: precompute every BM25 score at index time into a compressed sparse column (CSC) matrix. Queries become sparse vector lookups with no math at serving time.

This makes BM25 Turbo the right choice when:

  • You query the same index many times (RAG, reranking, batch evaluation)
  • You need deterministic, reproducible scores (ML pipelines, experiments)
  • You want the simplest possible API (3 lines to index, 1 line to query)
  • You’re building a search feature and don’t need a full search server

Performance

Benchmarked on MS MARCO (8,841,823 documents, 509,962 queries) — the standard information retrieval benchmark. BMW pruning enabled. Single-threaded.

Query Throughput

Query Latency

Scaling Across Corpus Sizes

Corpus Documents P50 Latency QPS nDCG@10
SciFact 5,183 67 μs 682,127 0.665
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →