🚀 dunzhang/stella_en_1.5B_v5をベースとしたSentenceTransformer
このモデルは、dunzhang/stella_en_1.5B_v5 からファインチューニングされた sentence-transformers モデルです。文章や段落を1024次元の密ベクトル空間にマッピングし、意味的な文章の類似性、意味検索、パラフレーズマイニング、テキスト分類、クラスタリングなどに利用できます。
📚 モデルの詳細
モデルの説明
モデルのソース
完全なモデルアーキテクチャ
SentenceTransformer(
(0): Transformer({'max_seq_length': 8096, 'do_lower_case': False}) with Transformer model: Qwen2Model
(1): Pooling({'word_embedding_dimension': 1536, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
(2): Dense({'in_features': 1536, 'out_features': 1024, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity'})
)
💻 使用例
基本的な使用法
まず、Sentence Transformersライブラリをインストールします。
pip install -U sentence-transformers
次に、このモデルをロードして推論を実行できます。
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("sentence_transformers_model_id")
sentences = [
'The Tchaikovsky Symphony Orchestra is a Russian classical music orchestra established in 1930. It was founded as the Moscow Radio Symphony Orchestra, and served as the official symphony for the Soviet All-Union Radio network. Following the dissolution of the, Soviet Union in 1991, the orchestra was renamed in 1993 by the Russian Ministry of Culture in recognition of the central role the music of Tchaikovsky plays in its repertoire. The current music director is Vladimir Fedoseyev, who has been in that position since 1974.',
'Instruct: Given a web search query, retrieve relevant passages that answer the query.\nQuery: Tchaikovsky Symphony Orchestra',
'Instruct: Given a web search query, retrieve relevant passages that answer the query.\nQuery: Sierra del Lacandón',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
🔍 評価
メトリクス
情報検索
メトリクス |
値 |
cosine_accuracy@1 |
0.9448 |
cosine_accuracy@3 |
0.9687 |
cosine_accuracy@5 |
0.9764 |
cosine_accuracy@10 |
0.9811 |
cosine_precision@1 |
0.9448 |
cosine_precision@3 |
0.3229 |
cosine_precision@5 |
0.1953 |
cosine_precision@10 |
0.0981 |
cosine_recall@1 |
0.9448 |
cosine_recall@3 |
0.9687 |
cosine_recall@5 |
0.9764 |
cosine_recall@10 |
0.9811 |
cosine_ndcg@10 |
0.9637 |
cosine_mrr@10 |
0.958 |
cosine_map@100 |
0.9586 |
情報検索
メトリクス |
値 |
cosine_accuracy@1 |
0.9444 |
cosine_accuracy@3 |
0.97 |
cosine_accuracy@5 |
0.9764 |
cosine_accuracy@10 |
0.9825 |
cosine_precision@1 |
0.9444 |
cosine_precision@3 |
0.3233 |
cosine_precision@5 |
0.1953 |
cosine_precision@10 |
0.0982 |
cosine_recall@1 |
0.9444 |
cosine_recall@3 |
0.97 |
cosine_recall@5 |
0.9764 |
cosine_recall@10 |
0.9825 |
cosine_ndcg@10 |
0.9639 |
cosine_mrr@10 |
0.9579 |
cosine_map@100 |
0.9584 |
情報検索
メトリクス |
値 |
cosine_accuracy@1 |
0.9438 |
cosine_accuracy@3 |
0.967 |
cosine_accuracy@5 |
0.9724 |
cosine_accuracy@10 |
0.9801 |
cosine_precision@1 |
0.9438 |
cosine_precision@3 |
0.3223 |
cosine_precision@5 |
0.1945 |
cosine_precision@10 |
0.098 |
cosine_recall@1 |
0.9438 |
cosine_recall@3 |
0.967 |
cosine_recall@5 |
0.9724 |
cosine_recall@10 |
0.9801 |
cosine_ndcg@10 |
0.9624 |
cosine_mrr@10 |
0.9567 |
cosine_map@100 |
0.9573 |