SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-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/all-MiniLM-L6-v2
- Maximum Sequence Length: 256 tokens
- Output Dimensionality: 384 dimensions
- 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': 256, '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()
)
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("sentence_transformers_model_id")
# Run inference
sentences = [
'What was the new name given to the Administrative Charge on June 22, 2022?',
'Context: customer. Do not tell the customer that the Customer Agreement only allows termination of a contract without an ETF if the change has a material adverse effect on the customer is to the calling plan. If the customer is undecided, the Supervisor/Support Coordinator must apply the credit and note the account accordingly. Refusal to Pay There is no "Refusal to Pay" process for the TUSC. Let customers know that, if they do not pay the surcharge, it continues to show as a balance owed on the account, which can cause interruption of their service for failing to pay billed charges.Table: <table border="1" cellpadding="5" cellspacing="0" width="100%"><tbody><tr><td>\xa0</td><td><b>6/22/22 Changes</b></td><td><b>12/1/22 Changes</b></td></tr><tr><td valign="top"><b>What Changed?</b></td><td valign="top">The Administrative Charge was renamed the Administrative and Telco Recovery Charge.<br/><br/>The charge was increased to $3.30 per voice line.\xa0</td><td valign="top">The charge increased to $1.40 per data-only line.<br/></td></tr><tr><td valign="top"><b>Customer Notifications</b></td><td valign="top">Beginning 5/23/2022 and running through 6/22/2022, the following appeared on all Consumer Bills:<br/><br/>Notice of Changes to Administrative Charge:<br/>Effective June 23, 2022, the monthly Verizon Wireless Administrative and Telco Recovery Charge (formerly the Verizon Wireless Administrative Charge) for voice-capable devices will increase from $1.95 to $3.30 per line. The charge for data-only devices will remain $0.06. The increased charge and updated name will appear on your next bill. For further information regarding the “Admin & Telco Recovery Charge,” review the “Explanation of Surcharges” section of the bill.</td><td>Beginning 11/1/2022 and running through 11/30/2022, the following appeared on all Consumer Bills:<br/><br/>Notice of Changes to Administrative and Telco Recovery Charge:<br/>Effective December 1, 2022, the monthly Verizon Wireless Administrative and Telco Recovery Charge for data-only plans will increase from $0.06 to $1.40 per line. If you have a device on a data-only plan on your account, the increased charge will appear on your next bill. Customers on 5G Home internet and LTE Home Internet plans will not see a monthly increase. The charge for plans with voice service will remain $3.30 per line. For further information regarding the “Admin & Telco Recovery Charge,” review the “Explanation of Surcharges” section of the bill.<br/><br/></td></tr><tr><td valign="top"><b>Positioning for Customer Inquiries</b></td><td valign="top">Mr/Ms Customer,<br/>I want to help you understand the Administrative and Telco Recovery Charge and other fees or surcharges on your bill.<br/>The notification that you received states that the Administrative and Telco Recovery Charge will increase by $1.35 per voice line to $3.30, effective your June bill.\xa0<br/><br/>Verizon reviews the Administrative and Telco Recovery Charge from time to time and makes adjustments to recover some of the administrative and telco expenses and costs of complying with regulatory requirements we incur to provide service.<br/>Other fees included on your bill are listed out by line item on your bill and you can reference them at any time. I would be happy to assist with any additional questions you might have on your bill.</td><td>Mr/Ms Customer,<br/>I want to help you understand the Administrative and Telco Recovery Charge and other fees or surcharges on your bill.<br/>The notification that you received states that the Administrative and Telco Recovery Charge will increase from $0.06 to $1.40 per data-only line, effective your December bill.<br/><br/>Verizon reviews the Administrative and Telco Recovery Charge from time to time and makes adjustments to recover some of the administrative and telco expenses and costs of complying with regulatory requirements we incur to provide service.<br/>Other fees included on your bill are listed out by line item on your bill and you can reference them at any time. I would be happy to assist with any additional questions you<br/>might have on your bill.</td></tr></tbody></table>',
'To access Payment Hub for Retail Sales: Users do not need to submit an Automated CS Request (ACSR) for basic access. Use the Payment Hub application to submit a Payment Investigation on behalf of the customer. Retail sales can access Payment Hub in the following manner: Search InfoManager for ‘Payment Hub Tool’ My POS > External Services > Payment Hub Note: To report a Payment Hub app error, use either option below: Open a Self-Help Ticket and select category: Payment Hub Call IT Support at 866-899-4872 and a ticket is opened and dispatched to the Payment Hub Support team for resolution.',
]
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]
Evaluation
Metrics
Information Retrieval
- Evaluated with
InformationRetrievalEvaluator
Metric | Value |
---|---|
cosine_accuracy@1 | 0.5718 |
cosine_accuracy@3 | 0.7685 |
cosine_accuracy@5 | 0.8271 |
cosine_accuracy@10 | 0.887 |
cosine_precision@1 | 0.5718 |
cosine_precision@3 | 0.2562 |
cosine_precision@5 | 0.1654 |
cosine_precision@10 | 0.0887 |
cosine_recall@1 | 0.5718 |
cosine_recall@3 | 0.7685 |
cosine_recall@5 | 0.8271 |
cosine_recall@10 | 0.887 |
cosine_ndcg@10 | 0.731 |
cosine_mrr@10 | 0.6809 |
cosine_map@100 | 0.685 |
Training Details
Training Dataset
Unnamed Dataset
- Size: 4,999 training samples
- Columns:
sentence_0
andsentence_1
- Approximate statistics based on the first 1000 samples:
sentence_0 sentence_1 type string string details - min: 10 tokens
- mean: 24.57 tokens
- max: 53 tokens
- min: 95 tokens
- mean: 229.55 tokens
- max: 256 tokens
- Samples:
sentence_0 sentence_1 What is the discount offered for customers who activate or upgrade to a new Smartphone on a Small Business Plan?
Context: who activate or upgrade to a new Smartphone on a Small Business Plan. Upgrade eligible. $5 line access discount for customers who activate or upgrade to a new Smartphone on a Small Business Plan. Upgrade eligible. Upgrade eligible. Offer Options Code Code Description Discount Final Cost Contract Consumer Business Employees N/AAccess Line $5N/A1 Yr N/AAccess Line $5N/A2 Yr Offer Options Code Code Description Discount Final Cost Contract Consumer Business Employees N/AAccess Line $5N/A1 Yr N/AAccess Line $5N/A2 Yr Offer Options Offer Options Code Code Description Discount Final Cost Contract Consumer Business Employees N/AAccess Line $5N/A1 Yr N/AAccess Line $5N/A2 YrTable:
What is the line access charge for a smartphone customer under contract who moves from a non-MORE Everything plan to a Small Business Plan after applying the $5 line access discount?
Customers who activate or upgrade to a new smartphone on a Small Business Plan and sign a 1 or 2-year contract automatically receive a $5 line access discount: Available on all Small Business Plan 25, 50, 100 line plans. Available for business customers who are eligible to purchase a Small Business Plan. Smartphone customers under contract moving from a non-MORE Everything plan to a Small Business Plan automatically receive a $5 line access discount. The discount applies to qualifying MDNs while the customer remains on an eligible plan with an eligible device. Note: Smartphone line access charge discounted to $35 (after the $5 line access credit). Customer invoice reflects a $40 line access charge and a $5 promotional credit. The promotion code automatically attaches in all POS systems.
Who is eligible to receive the $5 discount when changing to a Small Business Plan?
Available for business customers eligible to purchase a Small Business Plan, including: State and Local Government Contracts where legally approved NASPO ValuePoint accounts Note: Discount is automatically applied to new activations, Add a Lines (AALs) and upgrades with a smartphone purchase and a 1 or 2-year contract. Existing customers currently under contract and on a non-MORE Everything plan who complete a plan change to a Small Business Plan automatically receive the $5 discount. Existing smartphone customers under contract and on eligible devices and plans may request the discount. Discount can be applied through all front-end systems and My Business.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy
: stepsper_device_train_batch_size
: 10per_device_eval_batch_size
: 10num_train_epochs
: 2multi_dataset_batch_sampler
: round_robin
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_loss_only
: Trueper_device_train_batch_size
: 10per_device_eval_batch_size
: 10per_gpu_train_batch_size
: Noneper_gpu_eval_batch_size
: Nonegradient_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
: 1num_train_epochs
: 2max_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
: Nonehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseinclude_for_metrics
: []eval_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
: Falseuse_liger_kernel
: Falseeval_use_gather_object
: Falseaverage_tokens_across_devices
: Falseprompts
: Nonebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: round_robin
Training Logs
Epoch Step Training Loss cosine_ndcg@10 0.1 50 - 0.6653 0.2 100 - 0.6952 0.3 150 - 0.7010 0.4 200 - 0.7031 0.5 250 - 0.7038 0.6 300 - 0.7051 0.7 350 - 0.7110 0.8 400 - 0.7111 0.9 450 - 0.7151 1.0 500 0.1446 0.7231 1.1 550 - 0.7198 1.2 600 - 0.7192 1.3 650 - 0.7223 1.4 700 - 0.7207 1.5 750 - 0.7242 1.6 800 - 0.7264 1.7 850 - 0.7272 1.8 900 - 0.7287 1.9 950 - 0.7296 2.0 1000 0.068 0.7310 Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.3.1
- Transformers: 4.47.1
- PyTorch: 2.5.1+cu121
- Accelerate: 1.2.1
- Datasets: 3.2.0
- Tokenizers: 0.21.0
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", }
MultipleNegativesRankingLoss
@misc{henderson2017efficient, title={Efficient Natural Language Response Suggestion for Smart Reply}, author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil}, year={2017}, eprint={1705.00652}, archivePrefix={arXiv}, primaryClass={cs.CL} }
- Loss:
- Downloads last month
- 12
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 shivamgoel97/finetune
Base model
sentence-transformers/all-MiniLM-L6-v2Evaluation results
- Cosine Accuracy@1 on Unknownself-reported0.572
- Cosine Accuracy@3 on Unknownself-reported0.768
- Cosine Accuracy@5 on Unknownself-reported0.827
- Cosine Accuracy@10 on Unknownself-reported0.887
- Cosine Precision@1 on Unknownself-reported0.572
- Cosine Precision@3 on Unknownself-reported0.256
- Cosine Precision@5 on Unknownself-reported0.165
- Cosine Precision@10 on Unknownself-reported0.089
- Cosine Recall@1 on Unknownself-reported0.572
- Cosine Recall@3 on Unknownself-reported0.768