🚀 BGE-M3 Financial Matryoshka
このモデルは、BAAI/bge-m3 をファインチューニングした sentence-transformers モデルです。文章や段落を 1024 次元の密ベクトル空間にマッピングし、意味的な文章の類似性、意味検索、言い換えマイニング、テキスト分類、クラスタリングなどに使用できます。
🚀 クイックスタート
このモデルを使用するには、まず Sentence Transformers ライブラリをインストールする必要があります。その後、モデルをロードして推論を実行できます。
✨ 主な機能
- 文章や段落を 1024 次元の密ベクトル空間にマッピングします。
- 意味的な文章の類似性、意味検索、言い換えマイニング、テキスト分類、クラスタリングなどのタスクに使用できます。
📦 インストール
まず、Sentence Transformers ライブラリをインストールします。
pip install -U sentence-transformers
💻 使用例
基本的な使用法
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("haophancs/bge-m3-financial-matryoshka")
sentences = [
'As of January 28, 2024 the net carrying value of our inventories was $1.3 billion, which included provisions for obsolete and damaged inventory of $139.7 million.',
"What is the status of the company's inventory as of January 28, 2024, in terms of its valuation and provisions for obsolescence?",
'What is the relationship between the ESG goals and the long-term growth strategy?',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
📚 ドキュメント
モデルの詳細
モデルの説明
属性 |
详情 |
モデルタイプ |
Sentence Transformer |
ベースモデル |
BAAI/bge-m3 |
最大シーケンス長 |
8192 トークン |
出力次元数 |
1024 トークン |
類似度関数 |
コサイン類似度 |
言語 |
en |
ライセンス |
apache-2.0 |
モデルのソース
完全なモデルアーキテクチャ
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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): Normalize()
)
評価
情報検索
以下は、異なるデータセットでの評価結果です。
データセット: dim_1024
InformationRetrievalEvaluator
を使用して評価しました。
メトリック |
値 |
cosine_accuracy@1 |
0.7171 |
cosine_accuracy@3 |
0.8314 |
cosine_accuracy@5 |
0.87 |
cosine_accuracy@10 |
0.9143 |
cosine_precision@1 |
0.7171 |
cosine_precision@3 |
0.2771 |
cosine_precision@5 |
0.174 |
cosine_precision@10 |
0.0914 |
cosine_recall@1 |
0.7171 |
cosine_recall@3 |
0.8314 |
cosine_recall@5 |
0.87 |
cosine_recall@10 |
0.9143 |
cosine_ndcg@10 |
0.8152 |
cosine_mrr@10 |
0.7836 |
cosine_map@100 |
0.7867 |
データセット: dim_768
InformationRetrievalEvaluator
を使用して評価しました。
メトリック |
値 |
cosine_accuracy@1 |
0.7129 |
cosine_accuracy@3 |
0.8343 |
cosine_accuracy@5 |
0.8657 |
cosine_accuracy@10 |
0.91 |
cosine_precision@1 |
0.7129 |
cosine_precision@3 |
0.2781 |
cosine_precision@5 |
0.1731 |
cosine_precision@10 |
0.091 |
cosine_recall@1 |
0.7129 |
cosine_recall@3 |
0.8343 |
cosine_recall@5 |
0.8657 |
cosine_recall@10 |
0.91 |
cosine_ndcg@10 |
0.8122 |
cosine_mrr@10 |
0.7809 |
cosine_map@100 |
0.7843 |
データセット: dim_512
InformationRetrievalEvaluator
を使用して評価しました。
メトリック |
値 |
cosine_accuracy@1 |
0.7114 |
cosine_accuracy@3 |
0.8357 |
cosine_accuracy@5 |
0.8643 |
cosine_accuracy@10 |
0.91 |
cosine_precision@1 |
0.7114 |
cosine_precision@3 |
0.2786 |
cosine_precision@5 |
0.1729 |
cosine_precision@10 |
0.091 |
cosine_recall@1 |
0.7114 |
cosine_recall@3 |
0.8357 |
cosine_recall@5 |
0.8643 |
cosine_recall@10 |
0.91 |
cosine_ndcg@10 |
0.811 |
cosine_mrr@10 |
0.7793 |
cosine_map@100 |
0.7827 |
データセット: dim_384
InformationRetrievalEvaluator
を使用して評価しました。
メトリック |
値 |
cosine_accuracy@1 |
0.7143 |
cosine_accuracy@3 |
0.8329 |
cosine_accuracy@5 |
0.8629 |
cosine_accuracy@10 |
0.9129 |
cosine_precision@1 |
0.7143 |
cosine_precision@3 |
0.2776 |
cosine_precision@5 |
0.1726 |
cosine_precision@10 |
0.0913 |
cosine_recall@1 |
0.7143 |
cosine_recall@3 |
0.8329 |
cosine_recall@5 |
0.8629 |
cosine_recall@10 |
0.9129 |
cosine_ndcg@10 |
0.8126 |
cosine_mrr@10 |
0.7806 |
cosine_map@100 |
0.7838 |
📄 ライセンス
このモデルは apache-2.0 ライセンスの下で提供されています。