CoolFace
Modelpublic

NetherQuartz/paraphrase-MiniLM-tokipona

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes21downloads
Model Card

SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

  • —Model Type: Sentence Transformer
  • —Base model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 <!-- at revision e8f8c211226b894fcb81acc59f3b34ba3efd5f42 -->
  • —Maximum Sequence Length: 128 tokens
  • —Output Dimensionality: 384 dimensions
  • —Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': '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})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

bash
pip install -U sentence-transformers

Then you can load this model and run inference.

python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
    '我只想暖和一下。',
    'mi wile kama seli taso.',
    'tomo tawa sina li lon ni.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.7361, 0.2725],
#         [0.7361, 1.0000, 0.2417],
#         [0.2725, 0.2417, 1.0000]])

<!--

Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details> -->

<!--

Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details> -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

Evaluation

Metrics

Knowledge Distillation
MetricValue
negative_mse-1.9607
Translation
MetricValue
src2trg_accuracy0.6918
trg2src_accuracy0.6346
mean_accuracy0.6632

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Dataset

Unnamed Dataset
  • —Size: 82,069 training samples
  • —Columns: <code>natural</code>, <code>tok</code>, and <code>label</code>
  • —Approximate statistics based on the first 1000 samples: | | natural | tok | label | |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:-------------------------------------| | type | string | string | list | | details | <ul><li>min: 4 tokens</li><li>mean: 10.99 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.64 tokens</li><li>max: 55 tokens</li></ul> | <ul><li>size: 384 elements</li></ul> |
  • —Samples: | natural | tok | label | |:---------------------------------------------|:-------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------| | <code>Я держу руку.</code> | <code>mi sewi e luka mi.</code> | <code>[-0.17412713170051575, 0.2601699233055115, 0.3189601004123688, 0.009355960413813591, -0.030796436592936516, ...]</code> | | <code>Я змарыўся ад працы.</code> | <code>tan pali mi la mi pilin lape.</code> | <code>[0.1258312165737152, 0.173202782869339, 0.16050441563129425, 0.2519824206829071, -0.035661786794662476, ...]</code> | | <code>Mi bolso necesita ser reparado.</code> | <code>poki mi li pakala.</code> | <code>[-0.22065182030200958, 0.3290186822414398, -0.006242208182811737, 0.18535998463630676, 0.3087056577205658, ...]</code> |
  • —Loss: <code>MSELoss</code>

Evaluation Dataset

Unnamed Dataset
  • —Size: 4,267 evaluation samples
  • —Columns: <code>natural</code>, <code>tok</code>, and <code>label</code>
  • —Approximate statistics based on the first 1000 samples: | | natural | tok | label | |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-------------------------------------| | type | string | string | list | | details | <ul><li>min: 5 tokens</li><li>mean: 11.0 tokens</li><li>max: 44 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.4 tokens</li><li>max: 66 tokens</li></ul> | <ul><li>size: 384 elements</li></ul> |
  • —Samples: | natural | tok | label | |:----------------------------------------------------|:-----------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------| | <code>Da quanto tempo sei/state in Germania?</code> | <code>tenpo pi suli seme la sina lon ma Tosi?</code> | <code>[0.43582403659820557, 0.4226286709308624, 0.06436676532030106, -0.38238099217414856, -0.13951840996742249, ...]</code> | | <code>Habesne difficultatem hac re?</code> | <code>ni li ike tawa sina anu seme?</code> | <code>[0.22038640081882477, 0.03845325857400894, 0.20817194879055023, 0.08335897326469421, -0.10346948355436325, ...]</code> | | <code>אני לא הולך להפסיד.</code> | <code>mi kama ala anpa.</code> | <code>[0.3058338761329651, 0.06292764097452164, 0.019105680286884308, -0.04162227734923363, -0.10258055478334427, ...]</code> |
  • —Loss: <code>MSELoss</code>

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: steps
  • —per_device_train_batch_size: 64
  • —per_device_eval_batch_size: 64
  • —learning_rate: 2e-05
  • —num_train_epochs: 12
  • —warmup_ratio: 0.1
  • —fp16: True
  • —load_best_model_at_end: True
All Hyperparameters

<details><summary>Click to expand</summary>

  • —overwrite_output_dir: False
  • —do_predict: False
  • —eval_strategy: steps
  • —prediction_loss_only: True
  • —per_device_train_batch_size: 64
  • —per_device_eval_batch_size: 64
  • —per_gpu_train_batch_size: None
  • —per_gpu_eval_batch_size: None
  • —gradient_accumulation_steps: 1
  • —eval_accumulation_steps: None
  • —torch_empty_cache_steps: None
  • —learning_rate: 2e-05
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —max_grad_norm: 1.0
  • —num_train_epochs: 12
  • —max_steps: -1
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.1
  • —warmup_steps: 0
  • —log_level: passive
  • —log_level_replica: warning
  • —log_on_each_node: True
  • —logging_nan_inf_filter: True
  • —save_safetensors: True
  • —save_on_each_node: False
  • —save_only_model: False
  • —restore_callback_states_from_checkpoint: False
  • —no_cuda: False
  • —use_cpu: False
  • —use_mps_device: False
  • —seed: 42
  • —data_seed: None
  • —jit_mode_eval: False
  • —use_ipex: False
  • —bf16: False
  • —fp16: True
  • —fp16_opt_level: O1
  • —half_precision_backend: auto
  • —bf16_full_eval: False
  • —fp16_full_eval: False
  • —tf32: None
  • —local_rank: 0
  • —ddp_backend: None
  • —tpu_num_cores: None
  • —tpu_metrics_debug: False
  • —debug: []
  • —dataloader_drop_last: False
  • —dataloader_num_workers: 0
  • —dataloader_prefetch_factor: None
  • —past_index: -1
  • —disable_tqdm: False
  • —remove_unused_columns: True
  • —label_names: None
  • —load_best_model_at_end: True
  • —ignore_data_skip: False
  • —fsdp: []
  • —fsdp_min_num_params: 0
  • —fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —fsdp_transformer_layer_cls_to_wrap: None
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —deepspeed: None
  • —label_smoothing_factor: 0.0
  • —optim: adamwtorchfused
  • —optim_args: None
  • —adafactor: False
  • —group_by_length: False
  • —length_column_name: length
  • —ddp_find_unused_parameters: None
  • —ddp_bucket_cap_mb: None
  • —ddp_broadcast_buffers: False
  • —dataloader_pin_memory: True
  • —dataloader_persistent_workers: False
  • —skip_memory_metrics: True
  • —use_legacy_prediction_loop: False
  • —push_to_hub: False
  • —resume_from_checkpoint: None
  • —hub_model_id: None
  • —hub_strategy: every_save
  • —hub_private_repo: None
  • —hub_always_push: False
  • —hub_revision: None
  • —gradient_checkpointing: False
  • —gradient_checkpointing_kwargs: None
  • —include_inputs_for_metrics: False
  • —include_for_metrics: []
  • —eval_do_concat_batches: True
  • —fp16_backend: auto
  • —push_to_hub_model_id: None
  • —push_to_hub_organization: None
  • —mp_parameters:
  • —auto_find_batch_size: False
  • —full_determinism: False
  • —torchdynamo: None
  • —ray_scope: last
  • —ddp_timeout: 1800
  • —torch_compile: False
  • —torch_compile_backend: None
  • —torch_compile_mode: None
  • —include_tokens_per_second: False
  • —include_num_input_tokens_seen: False
  • —neftune_noise_alpha: None
  • —optim_target_modules: None
  • —batch_eval_metrics: False
  • —eval_on_start: False
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —eval_use_gather_object: False
  • —average_tokens_across_devices: False
  • —prompts: None
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

<details><summary>Click to expand</summary>

EpochStepTraining LossValidation Losseval_data_negative_mseeval_data_mean_accuracy
0.07791000.0257---
0.15592000.0235---
0.23383000.0221---
0.31184000.0217---
0.38975000.0209---
0.46776000.0201---
0.54567000.0192---
0.62358000.0186---
0.70159000.0176---
0.779410000.0171---
0.857411000.0166---
0.935312000.0159---
1.013313000.0154---
1.091214000.015---
1.169115000.0145---
1.247116000.0143---
1.325017000.014---
1.403018000.0139---
1.480919000.0136---
1.558820000.01340.0122-2.36090.5603
1.636821000.0133---
1.714722000.0133---
1.792723000.0132---
1.870624000.0131---
1.948625000.0131---
2.026526000.0129---
2.104427000.0127---
2.182428000.0125---
2.260329000.0125---
2.338330000.0124---
2.416231000.0123---
2.494232000.0122---
2.572133000.0121---
2.650034000.0123---
2.728035000.0122---
2.805936000.0122---
2.883937000.0121---
2.961838000.0122---
3.039839000.012---
3.117740000.01190.0110-2.12750.6289
3.195641000.0118---
3.273642000.0118---
3.351543000.0117---
3.429544000.0117---
3.507445000.0116---
3.585346000.0116---
3.663347000.0117---
3.741248000.0117---
3.819249000.0116---
3.897150000.0117---
3.975151000.0115---
4.053052000.0115---
4.130953000.0113---
4.208954000.0113---
4.286855000.0114---
4.364856000.0114---
4.442757000.0113---
4.520758000.0112---
4.598659000.0113---
4.676560000.01130.0107-2.05220.6478
4.754561000.0112---
4.832462000.0112---
4.910463000.0113---
4.988364000.0113---
5.066365000.011---
5.144266000.011---
5.222167000.011---
5.300168000.0109---
5.378069000.0111---
5.456070000.0111---
5.533971000.011---
5.611872000.0109---
5.689873000.011---
5.767774000.011---
5.845775000.0111---
5.923676000.011---
6.001677000.0112---
6.079578000.0108---
6.157479000.0108---
6.235480000.01070.0105-2.00980.6524
6.313381000.0108---
6.391382000.0108---
6.469283000.0108---
6.547284000.0109---
6.625185000.0108---
6.703086000.0108---
6.781087000.0108---
6.858988000.0107---
6.936989000.0109---
7.014890000.0108---
7.092891000.0106---
7.170792000.0107---
7.248693000.0106---
7.326694000.0105---
7.404595000.0105---
7.482596000.0107---
7.560497000.0107---
7.638398000.0108---
7.716399000.0107---
7.7942100000.01060.0103-1.98570.6582
7.8722101000.0106---
7.9501102000.0106---
8.0281103000.0106---
8.1060104000.0105---
8.1839105000.0103---
8.2619106000.0105---
8.3398107000.0105---
8.4178108000.0105---
8.4957109000.0105---
8.5737110000.0105---
8.6516111000.0105---
8.7295112000.0106---
8.8075113000.0104---
8.8854114000.0106---
8.9634115000.0106---
9.0413116000.0105---
9.1193117000.0103---
9.1972118000.0102---
9.2751119000.0105---
9.3531120000.01040.0103-1.97150.6624
9.4310121000.0104---
9.5090122000.0104---
9.5869123000.0105---
9.6648124000.0104---
9.7428125000.0103---
9.8207126000.0105---
9.8987127000.0105---
9.9766128000.0104---
10.0546129000.0103---
10.1325130000.0103---
10.2104131000.0102---
10.2884132000.0103---
10.3663133000.0105---
10.4443134000.0103---
10.5222135000.0104---
10.6002136000.0104---
10.6781137000.0103---
10.7560138000.0103---
10.8340139000.0103---
10.9119140000.01030.0102-1.96070.6632
10.9899141000.0102---
11.0678142000.0103---
11.1458143000.0103---
11.2237144000.0103---
11.3016145000.0102---
11.3796146000.0104---
11.4575147000.0103---
11.5355148000.0103---
11.6134149000.0103---
11.6913150000.0102---
11.7693151000.0102---
11.8472152000.0103---
11.9252153000.0102---
12.015396-0.0102-1.96070.6632
  • —The bold row denotes the saved checkpoint. </details>

Framework Versions

  • —Python: 3.13.7
  • —Sentence Transformers: 5.3.0
  • —Transformers: 4.55.2
  • —PyTorch: 2.10.0+cu128
  • —Accelerate: 1.13.0
  • —Datasets: 4.7.0
  • —Tokenizers: 0.21.4

Citation

BibTeX

Sentence Transformers
bibtex
@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",
}
MSELoss
bibtex
@inproceedings{reimers-2020-multilingual-sentence-bert,
    title = "Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillation",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2020",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/2004.09813",
}

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->