🚀 SentenceTransformer based on sentence-transformers/paraphrase-MiniLM-L6-v2
このモデルは、sentence-transformers を使用して、sentence-transformers/paraphrase-MiniLM-L6-v2 を en-pt-br、en-es、en-pt のデータセットでファインチューニングしたものです。文章や段落を384次元の密ベクトル空間にマッピングし、意味的な文章の類似性、意味検索、言い換えマイニング、テキスト分類、クラスタリングなどに使用できます。
✨ 主な機能
このモデルは、文章や段落を384次元の密ベクトル空間にマッピングすることができ、以下のようなタスクに使用できます。
- 意味的な文章の類似性
- 意味検索
- 言い換えマイニング
- テキスト分類
- クラスタリング
📚 ドキュメント
モデルの詳細
モデルの説明
モデルのソース
完全なモデルアーキテクチャ
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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): Normalize()
)
💻 使用例
基本的な使用法
まず、Sentence Transformers ライブラリをインストールします。
pip install -U sentence-transformers
次に、このモデルをロードして推論を実行できます。
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("jvanhoof/all-MiniLM-L6-multilingual-v2-en-es-pt-pt-br")
sentences = [
'We now call this place home.',
'Moramos ali. Agora é aqui a nossa casa.',
'É mais fácil do que se possa imaginar.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
🔧 技術詳細
評価
メトリクス
知識蒸留
メトリクス |
en-pt-br |
en-es |
en-pt |
negative_mse |
-4.0617 |
-4.2473 |
-4.2555 |
翻訳
メトリクス |
en-pt-br |
en-es |
en-pt |
src2trg_accuracy |
0.9859 |
0.908 |
0.8951 |
trg2src_accuracy |
0.9808 |
0.898 |
0.8824 |
mean_accuracy |
0.9834 |
0.903 |
0.8888 |
意味的な類似性
メトリクス |
値 |
pearson_cosine |
0.7714 |
spearman_cosine |
0.7862 |
学習の詳細
学習データセット
en-pt-br
- データセット: en-pt-br at 0c70bc6
- サイズ: 405,807 個の学習サンプル
- 列:
english
、non_english
、label
- 最初の1000サンプルに基づく概算統計:
項目 |
english |
non_english |
label |
タイプ |
string |
string |
list |
詳細 |
- 最小: 4トークン
- 平均: 23.98トークン
- 最大: 128トークン
|
- 最小: 6トークン
- 平均: 36.86トークン
- 最大: 128トークン
|
|
- サンプル:
english |
non_english |
label |
And then there are certain conceptual things that can also benefit from hand calculating, but I think they're relatively small in number. |
E também existem alguns aspectos conceituais que também podem se beneficiar do cálculo manual, mas eu acho que eles são relativamente poucos. |
[-0.2655501961708069, 0.2715710997581482, 0.13977409899234772, 0.007375418208539486, -0.09395705163478851, ...] |
One thing I often ask about is ancient Greek and how this relates. |
Uma coisa sobre a qual eu pergunto com frequencia é grego antigo e como ele se relaciona a isto. |
[0.34961527585983276, -0.01806497573852539, 0.06103038787841797, 0.11750973761081696, -0.34720802307128906, ...] |
See, the thing we're doing right now is we're forcing people to learn mathematics. |
Vejam, o que estamos fazendo agora, é que estamos forçando as pessoas a aprender matemática. |
[0.031645823270082474, -0.1787087768316269, -0.30170342326164246, 0.1304805874824524, -0.29176947474479675, ...] |
- 損失関数:
MSELoss
en-es
- データセット: en-es
- サイズ: 6,889,042 個の学習サンプル
- 列:
english
、non_english
、label
- 最初の1000サンプルに基づく概算統計:
項目 |
english |
non_english |
label |
タイプ |
string |
string |
list |
詳細 |
- 最小: 4トークン
- 平均: 24.04トークン
- 最大: 128トークン
|
- 最小: 5トークン
- 平均: 35.11トークン
- 最大: 128トークン
|
|
- サンプル:
english |
non_english |
label |
And then there are certain conceptual things that can also benefit from hand calculating, but I think they're relatively small in number. |
Y luego hay ciertas aspectos conceptuales que pueden beneficiarse del cálculo a mano pero creo que son relativamente pocos. |
[-0.2655501961708069, 0.2715710997581482, 0.13977409899234772, 0.007375418208539486, -0.09395705163478851, ...] |
One thing I often ask about is ancient Greek and how this relates. |
Algo que pregunto a menudo es sobre el griego antiguo y cómo se relaciona. |
[0.34961527585983276, -0.01806497573852539, 0.06103038787841797, 0.11750973761081696, -0.34720802307128906, ...] |
See, the thing we're doing right now is we're forcing people to learn mathematics. |
Vean, lo que estamos haciendo ahora es forzar a la gente a aprender matemáticas. |
[0.031645823270082474, -0.1787087768316269, -0.30170342326164246, 0.1304805874824524, -0.29176947474479675, ...] |
- 損失関数:
MSELoss
en-pt
- データセット: en-pt
- サイズ: 6,636,095 個の学習サンプル
- 列:
english
、non_english
、label
- 最初の1000サンプルに基づく概算統計:
項目 |
english |
non_english |
label |
タイプ |
string |
string |
list |
詳細 |
- 最小: 4トークン
- 平均: 23.5トークン
- 最大: 128トークン
|
- 最小: 5トークン
- 平均: 35.23トークン
- 最大: 128トークン
|
|
- サンプル:
english |
non_english |
label |
And the country that does this first will, in my view, leapfrog others in achieving a new economy even, an improved economy, an improved outlook. |
E o país que fizer isto primeiro vai, na minha opinião, ultrapassar outros em alcançar uma nova economia até uma economia melhorada, uma visão melhorada. |
[-0.13...] |