
alessandrobenigni/bm25-turbo-rust-python-wasm-cli
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
最速のBM25スコアリングエンジン:2,300xは、BM25Sよりも高速です。 28K QPSは8.8Mのドキュメントで。 5 BM25のバリエーション(ロバートソン、ルーセン、ATIRE、BM25L、BM25+)。 記憶マッピングされた永続性、BMWの剪定、流れの索引.
概要
BM25ターボ ⚡ Rust・Python・WASM・CLI 最速BM25スコアリングエンジン。 期間。 8.8万件のドキュメント。 BMW の剪定、記憶マッピングされた永続性およびゼロ コピーの索引のローディングと前計算された sparse BM25。 RAG パイプライン、検索アプリケーション、および ML ワークフロー用に構築されました。 ほとんどの BM25 ライブラリはクエリ時にスコアを計算します。すべてのリクエストでインデックスをスキャンします。 BM25ターボは反対のアプローチを取ります:圧縮されたスパースの列(CSC)の行列に。 キューリーは、サービングタイムで数学なしでスパースベクトルルックアップになります。 これにより、BM25ターボは正しい選択になります: - あなた(RAG、リランシング、バッチ評価) - 必要な(MLパイプライン、実験) - 必要な(3行目インデックス、クエリへの1行) - あなたは、完全な検索サーバを必要としません MS MARCOにベンチマーク (8,841,823 文書, 509,962 クエリ) — 標準情報検索ベンチマーク。 BMWの剪定を有効にしました。 シングルスレッド。 100K の下の corpora の Sub-millisecond .
概要(AI 翻訳)
BM25ターボ ⚡ Rust・Python・WASM・CLI 最速BM25スコアリングエンジン。 期間。
お問い合わせ
28,217 クエリ/秒 に 8.8 百万 ドキュメント。8.6ms P50 レイテンシ。 BMW の剪定、記憶マッピングされた永続性およびゼロ コピーの索引のローディングと前計算された sparse BM25。 RAG パイプライン、検索アプリケーション、および ML ワークフロー用に構築されました。
#BM25ターボなぜ?
ほとんどの BM25 ライブラリはクエリ時にスコアを計算します。すべてのリクエストでインデックスをスキャンします。 BM25ターボは反対のアプローチをとります:圧縮されたスペールのコラム(CSC)の行列にインデックス時間ですべてのBM25のスコアをプリコンプトして下さい。 キューリーは、サービングタイムで数学なしでスパースベクトルルックアップになります。
これにより、BM25ターボは正しい選択をするときにします。
- 同じインデックスを何度も入力** (RAG、リランク、バッチ評価) -**(MLパイプライン、実験)
- 一番シンプルな API** (インデックスへの3行、1行のクエリ) -search機能を構築して、完全な検索サーバーを必要としません
パフォーマンス
MS MARCOにベンチマーク (8,841,823 文書, 509,962 クエリ) — 標準情報検索ベンチマーク。 BMWの剪定を有効にしました。 シングルスレッド。
クエリスループット
このページは 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 |
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →