Edit 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 Sources

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 and label
  • 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: 256
  • per_device_eval_batch_size: 256
  • num_train_epochs: 4
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 256
  • per_device_eval_batch_size: 256
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • learning_rate: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1
  • num_train_epochs: 4
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • 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: False
  • 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: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • 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: False
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • 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
  • dispatch_batches: None
  • split_batches: 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
  • batch_sampler: batch_sampler
  • multi_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
5
Safetensors
Model size
118M params
Tensor type
F32
·
Inference Examples
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.

Model tree for annazdr/nace-pl-v3