🚀 rank1-14b: 情報検索における再ランキングのテスト時計算
rank1は、関連性判断を行う前に「思考」する推論型再ランキングモデルです。この140億パラメータのモデルは、Qwen2.5-14Bベースモデルから学習され、文書がクエリに関連するかどうかを判断する前に、テスト時計算を利用して推論チェーンを生成します。
📄 論文 | 🚀 GitHubリポジトリ
🚀 クイックスタート
rank1は、関連性判断を行う前に明示的な推論チェーンを生成することで、情報検索に新しいアプローチを導入します。従来の再ランキングモデルが直接スコアを出力するのとは異なり、rank1は以下の手順を実行します。
- クエリと文書のペアを受け取る
<think>...</think>
セクション内で推論チェーンを生成する
- 二値の関連性判断(
true
またはfalse
)を行う
- 真偽トークンのロジットに基づいて信頼度スコアを返す
このアプローチにより、モデルは複雑な関連性判断を論理的なステップに分解し、多様な検索タスクでのパフォーマンスを向上させます。
✨ 主な機能
モデルファミリー
プロパティ |
詳細 |
モデルタイプ |
rank1-14bは、情報検索における再ランキングのための推論型再ランキングモデルです。 |
ベースモデル |
Qwen/Qwen2.5-14B |
訓練データ |
rank1-training-data |
モデル一覧
量子化バリアント
関連データとリソース
💻 使用例
基本的な使用法
公式の使い方はGitHubで確認でき、エッジケースも考慮されています。ただし、単純な使用例では、以下の最小限の例が機能します。
クリックして展開: vLLMを使用した最小限の例
from vllm import LLM, SamplingParams
import math
model = LLM(
model="jhu-clsp/rank1-14b",
tensor_parallel_size=1,
trust_remote_code=True,
max_model_len=16000,
gpu_memory_utilization=0.9,
dtype="float16",
)
sampling_params = SamplingParams(
temperature=0,
max_tokens=8192,
logprobs=20,
stop=["</think> true", "</think> false"],
skip_special_tokens=False
)
def create_prompt(query, document):
return (
"Determine if the following passage is relevant to the query. "
"Answer only with 'true' or 'false'.\n"
f"Query: {query}\n"
f"Passage: {document}\n"
"<think>"
)
query = "What are the effects of climate change?"
document = "Climate change leads to rising sea levels, extreme weather events, and disruptions to ecosystems. These effects are caused by increasing greenhouse gas concentrations in the atmosphere due to human activities."
prompt = create_prompt(query, document)
outputs = model.generate([prompt], sampling_params)
output = outputs[0].outputs[0]
text = output.text
final_logits = output.logprobs[-1]
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("jhu-clsp/rank1-14b")
true_token = tokenizer(" true", add_special_tokens=False).input_ids[0]
false_token = tokenizer(" false", add_special_tokens=False).input_ids[0]
true_logit = final_logits[true_token].logprob
false_logit = final_logits[false_token].logprob
true_score = math.exp(true_logit)
false_score = math.exp(false_logit)
relevance_score = true_score / (true_score + false_score)
print(f"Reasoning chain: {text}")
print(f"Relevance score: {relevance_score}")
📚 ドキュメント
パフォーマンス
rank1-14bは、検索ベンチマークで強力なパフォーマンスを示し、特に複雑な推論を必要とするタスクで優れています。モデルが関連性判断を「考え抜く」能力は、微妙なトピックに対して特に有効です。
具体的なベンチマーク結果と他のモデルとの比較については、論文と公式のGitHubリポジトリを参照してください。
インストール
詳細なインストール手順については、GitHubを参照してください。
MTEB統合
rank1は、MTEBベンチマークフレームワークと互換性があります。
from mteb import MTEB
from rank1 import rank1
model = rank1(
model_name_or_path="jhu-clsp/rank1-14b",
num_gpus=1,
device="cuda"
)
evaluation = MTEB(tasks=["NevIR"])
results = evaluation.run(model)
引用
もしあなたが研究でrank1を使用する場合は、以下のように引用してください。
@misc{weller2025rank1testtimecomputereranking,
title={Rank1: Test-Time Compute for Reranking in Information Retrieval},
author={Orion Weller and Kathryn Ricci and Eugene Yang and Andrew Yates and Dawn Lawrie and Benjamin Van Durme},
year={2025},
eprint={2502.18418},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2502.18418},
}
📄 ライセンス
MITライセンス