Finetuned Cross Encoder L6 V2
これはcross-encoder/ms-marco-MiniLM-L6-v2を微調整したクロスエンコーダモデルで、主にテキストの再並べ替えと意味的検索タスクに使用されます。
ダウンロード数 22
リリース時間 : 5/13/2025
モデル概要
このモデルはテキストペアのスコアを計算し、テキストの再並べ替えと意味的検索に使用できます。Sentence Transformersライブラリを基にトレーニングされています。
モデル特徴
効率的なテキストの再並べ替え
テキストペアの類似度スコアを効率的に計算でき、再並べ替えタスクに適しています。
MiniLMアーキテクチャをベースとした
効率的なMiniLM-L6-v2アーキテクチャをベースとしており、性能を維持しながら計算リソースの要求を減らします。
最適化された損失関数
FitMixinLossを使用してトレーニングされ、モデルの再並べ替え性能を最適化します。
モデル能力
テキストの類似度計算
テキストの再並べ替え
意味的検索
使用事例
情報検索
検索結果の再並べ替え
検索エンジンが返した結果を再並べ替えし、関連性を向上させます。
評価データセットで0.597のNDCG@10スコアを達成しました。
質問応答システム
回答候補の並べ替え
質問応答システムが生成した複数の候補回答を関連性で並べ替えます。
🚀 クロスエンコーダ cross-encoder/ms-marco-MiniLM-L6-v2 をベースにしたもの
これは cross-encoder/ms-marco-MiniLM-L6-v2 を微調整した クロスエンコーダ モデルで、sentence-transformers ライブラリを使用しています。このモデルはテキストペアのスコアを計算でき、テキストの再ランキングや意味検索に利用できます。
🚀 クイックスタート
このモデルはテキストペアのスコアを計算するために使用でき、テキストの再ランキングや意味検索などのタスクに適しています。以下では、このモデルの使用方法を説明します。
✨ 主な機能
cross-encoder/ms-marco-MiniLM-L6-v2
を微調整したもので、テキストペアのスコアを計算できます。- テキストの再ランキングや意味検索タスクに適しています。
📦 インストール
まず、sentence-transformers
ライブラリをインストールする必要があります。
pip install -U sentence-transformers
💻 使用例
基本的な使用法
from sentence_transformers import CrossEncoder
# Hugging Face Hub からモデルをダウンロード
model = CrossEncoder("CharlesPing/finetuned-cross-encoder-l6-v2")
# テキストペアのスコアを取得
pairs = [
['‘Getting hung up on the exact nature of the records is interesting, and there’s lots of technical work that can be done there, but the main take-home response there is that the trends we’ve been seeing since the 1970s are continuing and have not paused in any way,’ he said.”', 'Rosenzweig also criticized the "waffling—encouraged by the NPOV policy—[which] means that it is hard to discern any overall interpretive stance in Wikipedia history".'],
['After the 9/11 terrorist attacks grounded commercial air traffic, "there was a temperature drop while the airplanes weren\'t flying, for the week afterwards."', 'Play media At 9:42\xa0a.m., the Federal Aviation Administration (FAA) grounded all civilian aircraft within the continental U.S., and civilian aircraft already in flight were told to land immediately.'],
['But the central message of the IPCC AR4, is confirmed by the peer reviewed literature.', 'Scientific consensus is normally achieved through communication at conferences, publication in the scientific literature, replication (reproducible results by others), and peer review.'],
['"Many people think the science of climate change is settled.', 'During his administration, the bridge from Filadelfia and Liberia was constructed, as was the Old National Theater.'],
['“Even if you could calculate some sort of meaningful global temperature statistic, the figure would be unimportant.', 'Quantitative information or data is based on quantities obtained using a quantifiable measurement process.'],
]
scores = model.predict(pairs)
print(scores.shape)
# (5,)
# または、単一のテキストとの類似度に基づいて異なるテキストを並べ替える
ranks = model.rank(
'‘Getting hung up on the exact nature of the records is interesting, and there’s lots of technical work that can be done there, but the main take-home response there is that the trends we’ve been seeing since the 1970s are continuing and have not paused in any way,’ he said.”',
[
'Rosenzweig also criticized the "waffling—encouraged by the NPOV policy—[which] means that it is hard to discern any overall interpretive stance in Wikipedia history".',
'Play media At 9:42\xa0a.m., the Federal Aviation Administration (FAA) grounded all civilian aircraft within the continental U.S., and civilian aircraft already in flight were told to land immediately.',
'Scientific consensus is normally achieved through communication at conferences, publication in the scientific literature, replication (reproducible results by others), and peer review.',
'During his administration, the bridge from Filadelfia and Liberia was constructed, as was the Old National Theater.',
'Quantitative information or data is based on quantities obtained using a quantifiable measurement process.',
]
)
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
📚 ドキュメント
モデル詳細
モデルの説明
属性 | 詳細 |
---|---|
モデルタイプ | クロスエンコーダ |
ベースモデル | cross-encoder/ms-marco-MiniLM-L6-v2 |
最大シーケンス長 | 512 トークン |
出力ラベル数 | 1 ラベル |
モデルの出所
- ドキュメント:Sentence Transformers ドキュメント
- ドキュメント:クロスエンコーダドキュメント
- リポジトリ:GitHub 上の Sentence Transformers
- Hugging Face:Hugging Face 上のクロスエンコーダ
評価
指標
クロスエンコーダ再ランキング
- データセット:
cross-rerank-dev-mixed-neg
CrossEncoderRerankingEvaluator
を使用して評価し、以下のパラメータを使用します。{ "at_k": 10 }
指標 | 値 |
---|---|
map | 0.4873 |
mrr@10 | 0.4839 |
ndcg@10 | 0.5971 |
トレーニング詳細
トレーニングデータセット
未命名データセット
- サイズ:22,258 個のトレーニングサンプル
- 列:
sentence_0
、sentence_1
、label
- 最初の 1000 個のサンプルに基づく近似統計情報:
| | sentence_0 | sentence_1 | label |
|------|------|------|------|
| タイプ | 文字列 | 文字列 | 浮動小数点数 |
| 詳細 |
- 最小長:26 文字
- 平均長:121.91 文字
- 最大長:319 文字
- 最小長:36 文字
- 平均長:140.85 文字
- 最大長:573 文字
- 最小値:0.0
- 平均値:0.16
- 最大値:1.0
- サンプル:
| sentence_0 | sentence_1 | label |
|------|------|------|
|
‘Getting hung up on the exact nature of the records is interesting, and there’s lots of technical work that can be done there, but the main take-home response there is that the trends we’ve been seeing since the 1970s are continuing and have not paused in any way,’ he said.”
|Rosenzweig also criticized the "waffling—encouraged by the NPOV policy—[which] means that it is hard to discern any overall interpretive stance in Wikipedia history".
|1.0
| |After the 9/11 terrorist attacks grounded commercial air traffic, "there was a temperature drop while the airplanes weren't flying, for the week afterwards."
|Play media At 9:42 a.m., the Federal Aviation Administration (FAA) grounded all civilian aircraft within the continental U.S., and civilian aircraft already in flight were told to land immediately.
|1.0
| |But the central message of the IPCC AR4, is confirmed by the peer reviewed literature.
|Scientific consensus is normally achieved through communication at conferences, publication in the scientific literature, replication (reproducible results by others), and peer review.
|1.0
| - 損失関数:
FitMixinLoss
トレーニングハイパーパラメータ
非デフォルトのハイパーパラメータ
eval_strategy
:ステップごとに評価per_device_train_batch_size
:16per_device_eval_batch_size
:16
すべてのハイパーパラメータ
クリックして展開
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_loss_only
: Trueper_device_train_batch_size
: 16per_device_eval_batch_size
: 16per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonetorch_empty_cache_steps
: Nonelearning_rate
: 5e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1num_train_epochs
: 3max_steps
: -1lr_scheduler_type
: linearlr_scheduler_kwargs
: {}warmup_ratio
: 0.0warmup_steps
: 0log_level
: passivelog_level_replica
: warninglog_on_each_node
: Truelogging_nan_inf_filter
: Truesave_safetensors
: Truesave_on_each_node
: Falsesave_only_model
: Falserestore_callback_states_from_checkpoint
: Falseno_cuda
: Falseuse_cpu
: Falseuse_mps_device
: Falseseed
: 42data_seed
: Nonejit_mode_eval
: Falseuse_ipex
: Falsebf16
: Falsefp16
: Falsefp16_opt_level
: O1half_precision_backend
: autobf16_full_eval
: Falsefp16_full_eval
: Falsetf32
: Nonelocal_rank
: 0ddp_backend
: Nonetpu_num_cores
: Nonetpu_metrics_debug
: Falsedebug
: []dataloader_drop_last
: Falsedataloader_num_workers
: 0dataloader_prefetch_factor
: Nonepast_index
: -1disable_tqdm
: Falseremove_unused_columns
: Truelabel_names
: Noneload_best_model_at_end
: Falseignore_data_skip
: Falsefsdp
: []fsdp_min_num_params
: 0fsdp_config
: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}tp_size
: 0fsdp_transformer_layer_cls_to_wrap
: Noneaccelerator_config
: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed
: Nonelabel_smoothing_factor
: 0.0optim
: adamw_torchoptim_args
: Noneadafactor
: Falsegroup_by_length
: Falselength_column_name
: lengthddp_find_unused_parameters
: Noneddp_bucket_cap_mb
: Noneddp_broadcast_buffers
: Falsedataloader_pin_memory
: Truedataloader_persistent_workers
: Falseskip_memory_metrics
: Trueuse_legacy_prediction_loop
: Falsepush_to_hub
: Falseresume_from_checkpoint
: Nonehub_model_id
: Nonehub_strategy
: every_savehub_private_repo
: Nonehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseinclude_for_metrics
: []eval_do_concat_batches
: Truefp16_backend
: autopush_to_hub_model_id
: Nonepush_to_hub_organization
: Nonemp_parameters
:auto_find_batch_size
: Falsefull_determinism
: Falsetorchdynamo
: Noneray_scope
: lastddp_timeout
: 1800torch_compile
: Falsetorch_compile_backend
: Nonetorch_compile_mode
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falseeval_on_start
: Falseuse_liger_kernel
: Falseeval_use_gather_object
: Falseaverage_tokens_across_devices
: Falseprompts
: Nonebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: proportional
トレーニングログ
エポック | ステップ | トレーニング損失 | cross-rerank-dev-mixed-neg_ndcg@10 |
---|---|---|---|
0.3592 | 500 | 0.4259 | 0.5154 |
0.7184 | 1000 | 0.3346 | 0.5497 |
1.0 | 1392 | - | 0.5640 |
1.0776 | 1500 | 0.3171 | 0.5660 |
1.4368 | 2000 | 0.2826 | 0.5669 |
1.7960 | 2500 | 0.281 | 0.5802 |
2.0 | 2784 | - | 0.5834 |
2.1552 | 3000 | 0.2553 | 0.5842 |
2.5144 | 3500 | 0.2326 | 0.5961 |
2.8736 | 4000 | 0.2408 | 0.5971 |
フレームワークバージョン
- Python: 3.11.12
- Sentence Transformers: 4.1.0
- Transformers: 4.51.3
- PyTorch: 2.6.0+cu124
- Accelerate: 1.6.0
- Datasets: 3.5.1
- Tokenizers: 0.21.1
🔧 技術詳細
このモデルは cross-encoder/ms-marco-MiniLM-L6-v2
を微調整し、sentence-transformers
ライブラリを使用してトレーニングされています。トレーニング過程では特定のハイパーパラメータと損失関数を使用し、テキスト再ランキングタスクでのモデル性能を最適化しています。
📖 引用
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
Jina Embeddings V3
Jina Embeddings V3 は100以上の言語をサポートする多言語文埋め込みモデルで、文の類似度と特徴抽出タスクに特化しています。
テキスト埋め込み
Transformers 複数言語対応

J
jinaai
3.7M
911
Ms Marco MiniLM L6 V2
Apache-2.0
MS Marcoパッセージランキングタスクで訓練されたクロスエンコーダモデル、情報検索におけるクエリ-パッセージ関連性スコアリング用
テキスト埋め込み 英語
M
cross-encoder
2.5M
86
Opensearch Neural Sparse Encoding Doc V2 Distill
Apache-2.0
蒸留技術に基づくスパース検索モデルで、OpenSearch向けに最適化されており、推論不要のドキュメントエンコーディングをサポートし、検索関連性と効率性においてV1版を上回ります
テキスト埋め込み
Transformers 英語

O
opensearch-project
1.8M
7
Sapbert From PubMedBERT Fulltext
Apache-2.0
PubMedBERTに基づく生物医学エンティティ表現モデルで、自己アライメント事前学習により意味関係の捕捉を最適化します。
テキスト埋め込み 英語
S
cambridgeltl
1.7M
49
Gte Large
MIT
GTE-Largeは強力なセンテンストランスフォーマーモデルで、文の類似度とテキスト埋め込みタスクに特化しており、複数のベンチマークテストで優れた性能を発揮します。
テキスト埋め込み 英語
G
thenlper
1.5M
278
Gte Base En V1.5
Apache-2.0
GTE-base-en-v1.5 は英語の文章変換モデルで、文章類似度タスクに特化しており、複数のテキスト埋め込みベンチマークで優れた性能を発揮します。
テキスト埋め込み
Transformers 複数言語対応

G
Alibaba-NLP
1.5M
63
Gte Multilingual Base
Apache-2.0
GTE Multilingual Base は50以上の言語をサポートする多言語文埋め込みモデルで、文類似度計算などのタスクに適しています。
テキスト埋め込み
Transformers 複数言語対応

G
Alibaba-NLP
1.2M
246
Polybert
polyBERTは、完全に機械駆動の超高速ポリマー情報学を実現するための化学言語モデルです。PSMILES文字列を600次元の密なフィンガープリントにマッピングし、ポリマー化学構造を数値形式で表現します。
テキスト埋め込み
Transformers

P
kuelumbus
1.0M
5
Bert Base Turkish Cased Mean Nli Stsb Tr
Apache-2.0
トルコ語BERTベースの文埋め込みモデルで、意味的類似性タスクに最適化
テキスト埋め込み
Transformers その他

B
emrecan
1.0M
40
GIST Small Embedding V0
MIT
BAAI/bge-small-en-v1.5モデルを微調整したテキスト埋め込みモデルで、MEDIデータセットとMTEB分類タスクデータセットで訓練され、検索タスクのクエリエンコーディング能力を最適化しました。
テキスト埋め込み
Safetensors 英語
G
avsolatorio
945.68k
29
おすすめAIモデル
Llama 3 Typhoon V1.5x 8b Instruct
タイ語専用に設計された80億パラメータの命令モデルで、GPT-3.5-turboに匹敵する性能を持ち、アプリケーションシナリオ、検索拡張生成、制限付き生成、推論タスクを最適化
大規模言語モデル
Transformers 複数言語対応

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-TinyはSODAデータセットでトレーニングされた超小型対話モデルで、エッジデバイス推論向けに設計されており、体積はCosmo-3Bモデルの約2%です。
対話システム
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
RoBERTaアーキテクチャに基づく中国語抽出型QAモデルで、与えられたテキストから回答を抽出するタスクに適しています。
質問応答システム 中国語
R
uer
2,694
98