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
- Maximum Sequence Length: 128 tokens
- Output Dimensionality: 384 tokens
- Similarity Function: Cosine Similarity
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
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})
)
Usage
Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("annazdr/nace-pl-v3")
# Run inference
sentences = [
' this class also includes: laboratory doping control activities',
'manufacture of toner cartridges',
'telecommunication carrier equipment',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
Training Details
Training Dataset
Unnamed Dataset
- Size: 12,826 training samples
- Columns:
sentence_0
andlabel
- Approximate statistics based on the first 1000 samples:
sentence_0 label type string int details - min: 2 tokens
- mean: 18.09 tokens
- max: 128 tokens
- 1: ~0.10%
- 2: ~0.30%
- 3: ~0.10%
- 4: ~0.40%
- 7: ~0.20%
- 8: ~0.10%
- 9: ~0.20%
- 10: ~0.30%
- 11: ~0.30%
- 13: ~0.30%
- 14: ~0.10%
- 18: ~0.20%
- 19: ~0.20%
- 20: ~0.10%
- 21: ~0.20%
- 22: ~0.10%
- 23: ~0.20%
- 24: ~0.30%
- 25: ~0.30%
- 26: ~0.10%
- 28: ~0.10%
- 29: ~0.10%
- 31: ~0.10%
- 32: ~0.10%
- 33: ~0.10%
- 34: ~0.20%
- 35: ~0.10%
- 37: ~0.20%
- 39: ~0.20%
- 40: ~0.40%
- 41: ~0.40%
- 42: ~0.10%
- 44: ~0.60%
- 45: ~0.10%
- 46: ~0.20%
- 48: ~0.20%
- 49: ~0.10%
- 51: ~0.10%
- 52: ~0.30%
- 54: ~0.20%
- 55: ~0.40%
- 56: ~0.10%
- 57: ~0.40%
- 58: ~0.20%
- 59: ~0.30%
- 60: ~0.20%
- 61: ~0.30%
- 62: ~0.20%
- 63: ~0.40%
- 64: ~0.60%
- 65: ~0.50%
- 66: ~1.00%
- 67: ~0.10%
- 69: ~0.50%
- 70: ~0.20%
- 71: ~0.10%
- 72: ~0.40%
- 73: ~0.60%
- 74: ~0.20%
- 75: ~0.10%
- 76: ~0.30%
- 77: ~0.10%
- 78: ~0.10%
- 80: ~0.10%
- 81: ~0.10%
- 82: ~0.80%
- 83: ~0.50%
- 84: ~0.10%
- 85: ~0.10%
- 86: ~0.30%
- 87: ~0.10%
- 88: ~0.30%
- 89: ~0.30%
- 90: ~0.60%
- 91: ~0.30%
- 92: ~0.10%
- 93: ~0.30%
- 94: ~0.20%
- 95: ~0.20%
- 96: ~0.20%
- 97: ~0.80%
- 98: ~0.20%
- 99: ~0.70%
- 100: ~0.70%
- 101: ~0.50%
- 102: ~0.60%
- 103: ~0.20%
- 104: ~0.10%
- 105: ~0.10%
- 106: ~0.20%
- 108: ~0.10%
- 109: ~0.40%
- 110: ~0.20%
- 111: ~0.30%
- 114: ~0.10%
- 115: ~0.10%
- 118: ~0.20%
- 120: ~0.10%
- 122: ~0.20%
- 123: ~0.10%
- 125: ~0.20%
- 126: ~0.30%
- 127: ~0.60%
- 128: ~0.80%
- 129: ~0.10%
- 130: ~0.10%
- 133: ~0.20%
- 135: ~0.20%
- 136: ~0.30%
- 137: ~0.20%
- 139: ~0.40%
- 140: ~0.20%
- 143: ~0.30%
- 144: ~0.10%
- 150: ~0.10%
- 151: ~0.50%
- 152: ~0.10%
- 153: ~0.10%
- 154: ~0.60%
- 155: ~0.20%
- 156: ~0.10%
- 157: ~0.10%
- 158: ~0.30%
- 161: ~0.20%
- 162: ~0.30%
- 164: ~0.10%
- 165: ~0.20%
- 168: ~0.10%
- 170: ~0.20%
- 172: ~0.10%
- 174: ~0.20%
- 175: ~0.10%
- 177: ~0.10%
- 178: ~0.10%
- 181: ~0.20%
- 182: ~0.30%
- 183: ~0.20%
- 184: ~0.40%
- 185: ~0.30%
- 186: ~0.20%
- 187: ~0.40%
- 188: ~0.10%
- 189: ~0.10%
- 190: ~0.20%
- 191: ~0.60%
- 192: ~0.10%
- 193: ~0.20%
- 197: ~0.10%
- 199: ~0.10%
- 200: ~0.30%
- 201: ~0.20%
- 202: ~0.10%
- 205: ~0.20%
- 208: ~0.10%
- 209: ~0.10%
- 210: ~0.10%
- 211: ~0.10%
- 212: ~0.10%
- 213: ~0.20%
- 215: ~0.20%
- 216: ~0.30%
- 217: ~0.20%
- 218: ~0.20%
- 219: ~0.10%
- 220: ~0.20%
- 222: ~0.10%
- 223: ~0.10%
- 225: ~0.10%
- 226: ~0.10%
- 227: ~0.20%
- 228: ~0.10%
- 229: ~0.10%
- 230: ~0.30%
- 231: ~0.20%
- 232: ~0.10%
- 233: ~0.10%
- 235: ~0.20%
- 236: ~0.20%
- 237: ~0.20%
- 241: ~0.40%
- 242: ~0.10%
- 243: ~0.30%
- 244: ~0.10%
- 245: ~0.40%
- 246: ~0.10%
- 247: ~0.30%
- 249: ~0.40%
- 253: ~0.20%
- 254: ~0.10%
- 255: ~0.10%
- 256: ~0.20%
- 257: ~0.30%
- 258: ~0.10%
- 259: ~0.10%
- 260: ~0.40%
- 264: ~0.10%
- 265: ~0.10%
- 266: ~0.10%
- 268: ~0.10%
- 270: ~0.10%
- 271: ~0.30%
- 274: ~0.10%
- 275: ~0.10%
- 276: ~0.20%
- 277: ~0.20%
- 278: ~0.30%
- 280: ~0.10%
- 281: ~0.10%
- 282: ~0.10%
- 283: ~0.10%
- 285: ~0.50%
- 286: ~0.20%
- 288: ~0.10%
- 289: ~0.20%
- 290: ~0.20%
- 291: ~0.20%
- 292: ~0.20%
- 293: ~0.20%
- 294: ~0.20%
- 296: ~0.20%
- 297: ~0.20%
- 298: ~0.10%
- 300: ~0.10%
- 301: ~0.10%
- 302: ~0.20%
- 303: ~0.30%
- 304: ~0.20%
- 306: ~0.30%
- 307: ~0.10%
- 308: ~0.20%
- 310: ~0.10%
- 311: ~0.30%
- 312: ~0.30%
- 313: ~0.20%
- 314: ~0.30%
- 315: ~0.40%
- 317: ~0.10%
- 318: ~0.10%
- 319: ~0.10%
- 320: ~0.10%
- 322: ~0.10%
- 324: ~0.60%
- 325: ~0.10%
- 327: ~0.20%
- 328: ~0.10%
- 329: ~0.10%
- 330: ~0.10%
- 331: ~0.10%
- 332: ~0.20%
- 333: ~0.10%
- 334: ~0.60%
- 335: ~0.30%
- 336: ~0.30%
- 337: ~0.30%
- 339: ~0.10%
- 341: ~0.30%
- 342: ~0.10%
- 343: ~0.10%
- 344: ~0.20%
- 345: ~0.10%
- 346: ~0.20%
- 347: ~0.20%
- 348: ~0.30%
- 349: ~0.40%
- 351: ~0.40%
- 352: ~0.10%
- 353: ~0.10%
- 354: ~0.30%
- 356: ~0.30%
- 357: ~0.10%
- 358: ~0.10%
- 359: ~0.10%
- 360: ~0.40%
- 361: ~0.30%
- 364: ~0.20%
- 366: ~0.50%
- 367: ~0.30%
- 368: ~0.40%
- 369: ~0.30%
- 370: ~0.10%
- 372: ~0.10%
- 373: ~0.30%
- 374: ~0.10%
- 375: ~0.50%
- 376: ~0.10%
- 377: ~0.40%
- 378: ~0.10%
- 379: ~0.40%
- 380: ~0.30%
- 381: ~0.30%
- 382: ~0.10%
- 383: ~0.20%
- 384: ~0.20%
- 385: ~0.40%
- 387: ~0.20%
- 390: ~0.30%
- 391: ~0.10%
- 392: ~0.50%
- 393: ~0.20%
- 394: ~0.10%
- 395: ~0.20%
- 397: ~0.10%
- 398: ~0.10%
- 399: ~0.30%
- 400: ~0.20%
- 401: ~0.10%
- 405: ~0.20%
- 407: ~0.30%
- 408: ~0.10%
- 411: ~0.20%
- 412: ~0.10%
- 413: ~0.10%
- 414: ~0.40%
- 415: ~0.30%
- 416: ~0.10%
- 418: ~0.40%
- 420: ~0.30%
- 421: ~0.40%
- 422: ~0.30%
- 423: ~0.40%
- 425: ~0.50%
- 426: ~0.10%
- 427: ~0.20%
- 428: ~0.20%
- 429: ~0.10%
- 430: ~0.20%
- 432: ~0.10%
- 433: ~0.10%
- 434: ~0.30%
- 435: ~0.20%
- 436: ~0.50%
- 437: ~0.30%
- 438: ~0.40%
- 440: ~0.40%
- 442: ~0.10%
- 444: ~0.40%
- 445: ~0.10%
- 446: ~0.20%
- 447: ~0.10%
- 448: ~0.10%
- 449: ~0.20%
- 450: ~0.20%
- 451: ~0.10%
- 452: ~0.20%
- 453: ~0.30%
- 454: ~0.20%
- 455: ~0.20%
- 456: ~0.20%
- 457: ~0.30%
- 458: ~0.10%
- 459: ~0.30%
- 460: ~0.10%
- 463: ~0.40%
- 464: ~0.20%
- 465: ~0.20%
- 468: ~0.30%
- 469: ~0.10%
- 470: ~0.10%
- 475: ~0.50%
- 476: ~0.30%
- 478: ~0.10%
- 479: ~0.20%
- 480: ~0.10%
- 482: ~0.10%
- 483: ~0.40%
- 484: ~0.60%
- 485: ~0.70%
- 487: ~0.30%
- 488: ~0.20%
- 489: ~0.10%
- 491: ~0.60%
- 492: ~0.80%
- 493: ~0.50%
- 498: ~0.20%
- 499: ~0.20%
- 500: ~0.20%
- 501: ~0.20%
- 502: ~0.10%
- 503: ~0.20%
- 504: ~0.10%
- 505: ~0.20%
- 506: ~0.10%
- 508: ~0.30%
- 511: ~0.20%
- 512: ~0.30%
- 514: ~0.10%
- 516: ~0.20%
- 517: ~0.40%
- 519: ~0.90%
- 520: ~0.80%
- 521: ~1.00%
- 522: ~0.10%
- 523: ~0.20%
- 524: ~0.20%
- 525: ~0.30%
- 528: ~0.10%
- 529: ~0.10%
- 531: ~0.10%
- 532: ~0.10%
- 533: ~0.20%
- 535: ~0.10%
- 536: ~0.10%
- 539: ~0.10%
- 540: ~0.20%
- 541: ~0.10%
- 543: ~0.30%
- 544: ~0.20%
- 545: ~0.40%
- 546: ~0.50%
- 547: ~0.20%
- 548: ~0.30%
- 549: ~0.10%
- 550: ~0.20%
- 551: ~0.70%
- 552: ~0.30%
- 554: ~0.30%
- 555: ~0.30%
- 556: ~0.10%
- 558: ~0.10%
- 559: ~0.40%
- 561: ~0.10%
- 562: ~0.10%
- 564: ~0.10%
- 565: ~0.10%
- 566: ~0.20%
- 567: ~0.20%
- 568: ~0.20%
- 570: ~0.20%
- 572: ~0.10%
- 573: ~0.10%
- 574: ~0.10%
- 578: ~0.30%
- Samples:
sentence_0 label )
306
transport of freight over sea and coastal waters
278
319
- Loss:
BatchAllTripletLoss
Training Hyperparameters
Non-Default Hyperparameters
per_device_train_batch_size
: 256per_device_eval_batch_size
: 256num_train_epochs
: 4multi_dataset_batch_sampler
: round_robin
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: noprediction_loss_only
: Trueper_device_train_batch_size
: 256per_device_eval_batch_size
: 256per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_accumulation_steps
: 1eval_accumulation_steps
: Nonelearning_rate
: 5e-05weight_decay
: 0.0adam_beta1
: 0.9adam_beta2
: 0.999adam_epsilon
: 1e-08max_grad_norm
: 1num_train_epochs
: 4max_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}fsdp_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
: Falsehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseeval_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
: Nonedispatch_batches
: Nonesplit_batches
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falseeval_on_start
: Falsebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: round_robin
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.0.1
- Transformers: 4.42.4
- PyTorch: 2.4.0+cu121
- Accelerate: 0.32.1
- Datasets: 2.21.0
- Tokenizers: 0.19.1
Citation
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",
}
BatchAllTripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
- Downloads last month
- 6
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.