metadata
language:
- en
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- dense
- generated_from_trainer
- dataset_size:3000
- loss:BatchAllTripletLoss
base_model: microsoft/mpnet-base
widget:
- source_sentence: what am i supposed to do if i lost my luggage
sentences:
- do i need a visa if i go there
- why did you freeze my bank account
- tell my bank that i'm travelling to france in 2 days
- source_sentence: can you suggest some of the most popular travel destination
sentences:
- what is the total of my repair bill
- could you tell me my bill's minimum payment
- >-
can you get me a car rental for march 1st to 3rd in seattle, and i'd
like a sedan if possible
- source_sentence: is there a minimum amount accepted
sentences:
- am i going to need a visa for traveling to canada
- submit payment to duke energy for my electric bill
- let me know chase's routing number
- source_sentence: my account appears to be blocked and i don't know why
sentences:
- how do you say hello in japanese
- how much is due on the gas bill
- how much was my last transaction for
- source_sentence: are there any travel alerts for juarez
sentences:
- i am now out of checks, how do i order new ones
- lowest amount for cable bill
- how much interest do i get on my citizen's savings account
datasets:
- contemmcm/clinc150
pipeline_tag: sentence-similarity
library_name: sentence-transformers
SentenceTransformer based on microsoft/mpnet-base
This is a sentence-transformers model finetuned from microsoft/mpnet-base on the clinc150 dataset. It maps sentences & paragraphs to a 768-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: microsoft/mpnet-base
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
- Language: en
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': 512, 'do_lower_case': False, 'architecture': 'MPNetModel'})
(1): Pooling({'word_embedding_dimension': 768, '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("bnoland/mpnet-base-clinc-subset")
# Run inference
sentences = [
'are there any travel alerts for juarez',
"how much interest do i get on my citizen's savings account",
'lowest amount for cable bill',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.7056, 0.6717],
# [0.7056, 1.0000, 0.7377],
# [0.6717, 0.7377, 1.0000]])
Training Details
Training Dataset
clinc150
- Dataset: clinc150 at 2bbb9af
- Size: 3,000 training samples
- Columns:
textandlabel - Approximate statistics based on the first 1000 samples:
text label type string int details - min: 6 tokens
- mean: 12.61 tokens
- max: 28 tokens
- 1: ~3.60%
- 2: ~3.80%
- 3: ~3.50%
- 4: ~4.30%
- 5: ~3.90%
- 6: ~3.50%
- 7: ~2.20%
- 8: ~3.00%
- 9: ~2.80%
- 10: ~2.90%
- 11: ~3.70%
- 12: ~2.80%
- 13: ~3.70%
- 14: ~2.80%
- 15: ~3.90%
- 76: ~3.60%
- 77: ~3.40%
- 78: ~3.60%
- 79: ~3.40%
- 80: ~3.20%
- 81: ~3.70%
- 82: ~3.00%
- 83: ~2.90%
- 84: ~3.30%
- 85: ~3.50%
- 86: ~3.70%
- 87: ~2.40%
- 88: ~3.70%
- 89: ~2.70%
- 90: ~3.50%
- Samples:
text label is there enough money in my bank of hawaii for vacation12i need to let my bank know i am visiting asia soon77what's bank of america's routing number2 - Loss:
BatchAllTripletLoss
Evaluation Dataset
clinc150
- Dataset: clinc150 at 2bbb9af
- Size: 600 evaluation samples
- Columns:
textandlabel - Approximate statistics based on the first 600 samples:
text label type string int details - min: 6 tokens
- mean: 12.83 tokens
- max: 26 tokens
- 1: ~3.33%
- 2: ~3.33%
- 3: ~3.33%
- 4: ~3.33%
- 5: ~3.33%
- 6: ~3.33%
- 7: ~3.33%
- 8: ~3.33%
- 9: ~3.33%
- 10: ~3.33%
- 11: ~3.33%
- 12: ~3.33%
- 13: ~3.33%
- 14: ~3.33%
- 15: ~3.33%
- 76: ~3.33%
- 77: ~3.33%
- 78: ~3.33%
- 79: ~3.33%
- 80: ~3.33%
- 81: ~3.33%
- 82: ~3.33%
- 83: ~3.33%
- 84: ~3.33%
- 85: ~3.33%
- 86: ~3.33%
- 87: ~3.33%
- 88: ~3.33%
- 89: ~3.33%
- 90: ~3.33%
- Samples:
text label was my last transaction at walmart14what interest rate is us bank giving me on my acount7look up carry-on rules for american airlines89 - Loss:
BatchAllTripletLoss
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy: stepsper_device_train_batch_size: 16per_device_eval_batch_size: 16num_train_epochs: 1warmup_steps: 10fp16: Truebatch_sampler: group_by_label
All Hyperparameters
Click to expand
do_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 16per_device_eval_batch_size: 16gradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 1max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_ratio: Nonewarmup_steps: 10log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Trueenable_jit_checkpoint: Falsesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseuse_cpu: Falseseed: 42data_seed: Nonebf16: Falsefp16: Truebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: -1ddp_backend: Nonedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonedisable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_args: Nonegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Truepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_for_metrics: []eval_do_concat_batches: Trueauto_find_batch_size: Falsefull_determinism: Falseddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_num_input_tokens_seen: noneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Trueuse_cache: Falseprompts: Nonebatch_sampler: group_by_labelmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}
Training Logs
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.5319 | 100 | 0.5093 | 1.7369 |
Framework Versions
- Python: 3.12.12
- Sentence Transformers: 5.2.3
- Transformers: 5.0.0
- PyTorch: 2.10.0+cu128
- Accelerate: 1.12.0
- Datasets: 4.0.0
- Tokenizers: 0.22.2
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}
}