metadata
language:
- en
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:1995000
- loss:MultipleNegativesRankingLoss
base_model: sentence-transformers/all-MiniLM-L6-v2
widget:
- source_sentence: what are the main differences between interphase and the mitotic phase?
sentences:
- >-
It might surprise you, but you're probably wearing plastic clothes. ...
Many of our clothes contain plastics like polyester, nylon, acrylic and
polyamide. In fact most new fabrics are made of plastic – up to 64% of
them. The thing is, every time we wash these materials they shed
millions of plastic microfibres.
- >-
The cell cycle has two major phases: interphase and the mitotic phase
(Figure 6.3). During interphase, the cell grows and DNA is replicated.
During the mitotic phase, the replicated DNA and cytoplasmic contents
are separated and the cell divides.
- >-
2: Chipotle *Whole30 Approved* Chipotle is another awesome option that's
officially Whole30 Approved. They recently introduced Carne Asada and
Chicken as compliant options in addition to the carnitas (they've been
compliant for years!), so it's exciting to have three protein options.
- source_sentence: how much do brides on say yes to the dress get paid?
sentences:
- >-
Cooking with rice So if you're not going to eat rice straight after
you've cooked it, you need to store it in the fridge — preferably within
an hour or so, but definitely within four hours. Refrigeration won't
kill the bacteria but it will slow down their growth.
- >-
Five of the most common determinants of demand are the price of the
goods or service, the income of the buyers, the price of related goods,
the preference of the buyer, and the population of the buyers.
- >-
Brides aren't compensated for being on the show (unless they're named
Omarosa, that is). Plus, you need to be prepared to spend big on your
gown. It's not unusual to see people on the show spend more than $10,000
on a dress.
- source_sentence: when was the tornado in jarrell tx?
sentences:
- >-
The Chiefs were overwhelmed by the Bills and lost the game by a score of
30–13. The Chiefs' victory on January 16, 1994, against the Oilers
remained the franchise's last post-season victory for 21 years until
their 30–0 victory over the Houston Texans on January 9, 2016.
- >-
On May 27, 1997, one of the most violent tornadoes in modern U.S.
history produced close-to-unfathomable damage on the outskirts of
Jarrell, TX, located about 40 miles north-northeast of Austin. There are
only a few photos and videos of this monster, but it is a disaster well
worth remembering.
- >-
What is open and closed circulation? In the open circulation, the blood
is not enclosed in the blood vessels and is pumped into a cavity called
hemocoel. On the contrary, in the closed circulation, the blood is
pumped through the vessels separate from the interstitial fluid of the
body.
- source_sentence: >-
what is the relationship between photosynthesis cellular respiration and
the carbon cycle?
sentences:
- >-
Infected people are most contagious up to about 2 weeks after the cough
begins. Antibiotics may shorten the amount of time someone is
contagious. While pertussis vaccines are the most effective tool to
prevent this disease, no vaccine is 100% effective.
- >-
['Download and launch iTunes on your computer.', 'Click iTunes music
library to choose the song you want to make as a ringtone.',
'Right-click the song and choose to Get Info.', 'Click Options to set
the ringtone volume and start & stop time of the ringtone, and click
OK.']
- >-
Cellular respiration and photosynthesis are important parts of the
carbon cycle. The carbon cycle is the pathways through which carbon is
recycled in the biosphere. While cellular respiration releases carbon
dioxide into the environment, photosynthesis pulls carbon dioxide out of
the atmosphere.
- source_sentence: what is usb c ss?
sentences:
- >-
Please do not use any air fresheners or fragrances in the same room as
guinea pigs. They have a rather small and very sensitive respiratory
system.
- >-
“Global warming” refers to the rise in global temperatures due mainly to
the increasing concentrations of greenhouse gases in the atmosphere.
“Climate change” refers to the increasing changes in the measures of
climate over a long period of time – including precipitation,
temperature, and wind patterns.
- >-
The USB Type-C specification is pretty confusing. ... The standard USB
logo to identify USB 2.0 ports or slower. "SS" markings, which stand for
SuperSpeed, to identify USB 3.0 ports, otherwise known as USB 3.1 gen 1.
"10" markings, which stand for 10 Gbps, to identify USB 3.1 gen 2 ports
with ultra-fast connectivity.
datasets:
- sentence-transformers/gooaq
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy
model-index:
- name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
results:
- task:
type: triplet
name: Triplet
dataset:
name: gooqa dev
type: gooqa-dev
metrics:
- type: cosine_accuracy
value: 0.579800009727478
name: Cosine Accuracy
SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2 on the gooaq dataset. 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
- 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': 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("ayushexel/emb-all-MiniLM-L6-v2-gooaq-2-epochs")
# Run inference
sentences = [
'what is usb c ss?',
'The USB Type-C specification is pretty confusing. ... The standard USB logo to identify USB 2.0 ports or slower. "SS" markings, which stand for SuperSpeed, to identify USB 3.0 ports, otherwise known as USB 3.1 gen 1. "10" markings, which stand for 10 Gbps, to identify USB 3.1 gen 2 ports with ultra-fast connectivity.',
'“Global warming” refers to the rise in global temperatures due mainly to the increasing concentrations of greenhouse gases in the atmosphere. “Climate change” refers to the increasing changes in the measures of climate over a long period of time – including precipitation, temperature, and wind patterns.',
]
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
Triplet
- Dataset:
gooqa-dev
- Evaluated with
TripletEvaluator
Metric | Value |
---|---|
cosine_accuracy | 0.5798 |
Training Details
Training Dataset
gooaq
- Dataset: gooaq at b089f72
- Size: 1,995,000 training samples
- Columns:
question
andanswer
- Approximate statistics based on the first 1000 samples:
question answer type string string details - min: 8 tokens
- mean: 11.86 tokens
- max: 23 tokens
- min: 14 tokens
- mean: 60.74 tokens
- max: 133 tokens
- Samples:
question answer can twine be a noun?
noun. a strong thread or string composed of two or more strands twisted together. an act of twining, twisting, or interweaving.
what is bo id in nsdl?
The demat account number allotted to the beneficiary holder(s) by DP is known as the BO-ID. In CDSL it is 16 digits number. It is an intermediary (an institution) between the investor and the depository.
how much does it cost to run an electric fan all night?
The average indoor ceiling fan costs around 0.13c to 1.29c per hour to run, or between $1.90 and $18.85 each year. This will depend on the fan's speed settings, how frequently it's used, and the rate you pay on electricity. Like most electrical appliances, a ceiling fan's power is measured in watts.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Evaluation Dataset
gooaq
- Dataset: gooaq at b089f72
- Size: 5,000 evaluation samples
- Columns:
question
andanswer
- Approximate statistics based on the first 1000 samples:
question answer type string string details - min: 8 tokens
- mean: 11.8 tokens
- max: 21 tokens
- min: 14 tokens
- mean: 60.68 tokens
- max: 123 tokens
- Samples:
question answer how much water should a person drink in 8 hours?
Health authorities commonly recommend eight 8-ounce glasses, which equals about 2 liters, or half a gallon. This is called the 8×8 rule and is very easy to remember. However, some health gurus believe that you need to sip on water constantly throughout the day, even when you're not thirsty.
what does this mean in excel #name?
Important: The #NAME? error signifies that something needs to be corrected in the syntax, so when you see the error in your formula, resolve it. Do not use any error-handling functions such as IFERROR to mask the error. To avoid typos in formula names, use the Formula Wizard in Excel.
are hydroflask good for the environment?
Hydro Flasks are a new fad among many students and adults to help minimize plastic waste in the oceans. Hydro Flasks are great because they use a type of metal called TempShield, which keeps your beverage or food either hot for up to six hours or cold for up to twenty-four hours.
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy
: stepsper_device_train_batch_size
: 256per_device_eval_batch_size
: 256num_train_epochs
: 2warmup_ratio
: 0.1fp16
: Truebatch_sampler
: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_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
: 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
: 2max_steps
: -1lr_scheduler_type
: linearlr_scheduler_kwargs
: {}warmup_ratio
: 0.1warmup_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
: Truefp16_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}tp_size
: 0fsdp_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
: no_duplicatesmulti_dataset_batch_sampler
: proportional
Training Logs
Click to expand
Epoch | Step | Training Loss | Validation Loss | gooqa-dev_cosine_accuracy |
---|---|---|---|---|
-1 | -1 | - | - | 0.5368 |
0.0128 | 100 | 0.0762 | - | - |
0.0257 | 200 | 0.0715 | - | - |
0.0385 | 300 | 0.0673 | - | - |
0.0513 | 400 | 0.0664 | - | - |
0.0642 | 500 | 0.0669 | - | - |
0.0770 | 600 | 0.0678 | - | - |
0.0898 | 700 | 0.0656 | - | - |
0.1027 | 800 | 0.0624 | - | - |
0.1155 | 900 | 0.0653 | - | - |
0.1283 | 1000 | 0.0642 | 0.0447 | 0.5426 |
0.1412 | 1100 | 0.0641 | - | - |
0.1540 | 1200 | 0.0639 | - | - |
0.1668 | 1300 | 0.0611 | - | - |
0.1796 | 1400 | 0.0616 | - | - |
0.1925 | 1500 | 0.0611 | - | - |
0.2053 | 1600 | 0.0629 | - | - |
0.2181 | 1700 | 0.0636 | - | - |
0.2310 | 1800 | 0.0632 | - | - |
0.2438 | 1900 | 0.064 | - | - |
0.2566 | 2000 | 0.0614 | 0.0404 | 0.5424 |
0.2695 | 2100 | 0.0622 | - | - |
0.2823 | 2200 | 0.0574 | - | - |
0.2951 | 2300 | 0.0581 | - | - |
0.3080 | 2400 | 0.0598 | - | - |
0.3208 | 2500 | 0.0555 | - | - |
0.3336 | 2600 | 0.0566 | - | - |
0.3465 | 2700 | 0.0583 | - | - |
0.3593 | 2800 | 0.0574 | - | - |
0.3721 | 2900 | 0.0577 | - | - |
0.3850 | 3000 | 0.056 | 0.0405 | 0.5390 |
0.3978 | 3100 | 0.0599 | - | - |
0.4106 | 3200 | 0.0538 | - | - |
0.4235 | 3300 | 0.0559 | - | - |
0.4363 | 3400 | 0.0577 | - | - |
0.4491 | 3500 | 0.0533 | - | - |
0.4620 | 3600 | 0.0528 | - | - |
0.4748 | 3700 | 0.052 | - | - |
0.4876 | 3800 | 0.0523 | - | - |
0.5004 | 3900 | 0.0549 | - | - |
0.5133 | 4000 | 0.0508 | 0.0377 | 0.5550 |
0.5261 | 4100 | 0.0519 | - | - |
0.5389 | 4200 | 0.0501 | - | - |
0.5518 | 4300 | 0.0498 | - | - |
0.5646 | 4400 | 0.0522 | - | - |
0.5774 | 4500 | 0.0521 | - | - |
0.5903 | 4600 | 0.0513 | - | - |
0.6031 | 4700 | 0.0509 | - | - |
0.6159 | 4800 | 0.0502 | - | - |
0.6288 | 4900 | 0.052 | - | - |
0.6416 | 5000 | 0.0516 | 0.0348 | 0.5540 |
0.6544 | 5100 | 0.0496 | - | - |
0.6673 | 5200 | 0.0491 | - | - |
0.6801 | 5300 | 0.0498 | - | - |
0.6929 | 5400 | 0.0537 | - | - |
0.7058 | 5500 | 0.0492 | - | - |
0.7186 | 5600 | 0.0504 | - | - |
0.7314 | 5700 | 0.0488 | - | - |
0.7443 | 5800 | 0.0474 | - | - |
0.7571 | 5900 | 0.048 | - | - |
0.7699 | 6000 | 0.046 | 0.0347 | 0.5596 |
0.7828 | 6100 | 0.0494 | - | - |
0.7956 | 6200 | 0.0482 | - | - |
0.8084 | 6300 | 0.0457 | - | - |
0.8212 | 6400 | 0.05 | - | - |
0.8341 | 6500 | 0.0468 | - | - |
0.8469 | 6600 | 0.0492 | - | - |
0.8597 | 6700 | 0.0463 | - | - |
0.8726 | 6800 | 0.0467 | - | - |
0.8854 | 6900 | 0.0468 | - | - |
0.8982 | 7000 | 0.0455 | 0.0321 | 0.5648 |
0.9111 | 7100 | 0.0442 | - | - |
0.9239 | 7200 | 0.0461 | - | - |
0.9367 | 7300 | 0.0441 | - | - |
0.9496 | 7400 | 0.0449 | - | - |
0.9624 | 7500 | 0.0463 | - | - |
0.9752 | 7600 | 0.0435 | - | - |
0.9881 | 7700 | 0.0442 | - | - |
1.0009 | 7800 | 0.0432 | - | - |
1.0137 | 7900 | 0.0396 | - | - |
1.0266 | 8000 | 0.0381 | 0.0307 | 0.5700 |
1.0394 | 8100 | 0.0366 | - | - |
1.0522 | 8200 | 0.0374 | - | - |
1.0651 | 8300 | 0.0401 | - | - |
1.0779 | 8400 | 0.0375 | - | - |
1.0907 | 8500 | 0.0378 | - | - |
1.1036 | 8600 | 0.0391 | - | - |
1.1164 | 8700 | 0.0347 | - | - |
1.1292 | 8800 | 0.0383 | - | - |
1.1421 | 8900 | 0.0369 | - | - |
1.1549 | 9000 | 0.0375 | 0.0305 | 0.5626 |
1.1677 | 9100 | 0.0386 | - | - |
1.1805 | 9200 | 0.0359 | - | - |
1.1934 | 9300 | 0.0361 | - | - |
1.2062 | 9400 | 0.0358 | - | - |
1.2190 | 9500 | 0.0385 | - | - |
1.2319 | 9600 | 0.0335 | - | - |
1.2447 | 9700 | 0.038 | - | - |
1.2575 | 9800 | 0.0372 | - | - |
1.2704 | 9900 | 0.0364 | - | - |
1.2832 | 10000 | 0.0339 | 0.0297 | 0.5766 |
1.2960 | 10100 | 0.0341 | - | - |
1.3089 | 10200 | 0.0375 | - | - |
1.3217 | 10300 | 0.0377 | - | - |
1.3345 | 10400 | 0.0346 | - | - |
1.3474 | 10500 | 0.036 | - | - |
1.3602 | 10600 | 0.034 | - | - |
1.3730 | 10700 | 0.0376 | - | - |
1.3859 | 10800 | 0.0357 | - | - |
1.3987 | 10900 | 0.0362 | - | - |
1.4115 | 11000 | 0.0338 | 0.0284 | 0.5786 |
1.4244 | 11100 | 0.0346 | - | - |
1.4372 | 11200 | 0.0346 | - | - |
1.4500 | 11300 | 0.0354 | - | - |
1.4629 | 11400 | 0.0346 | - | - |
1.4757 | 11500 | 0.0344 | - | - |
1.4885 | 11600 | 0.0346 | - | - |
1.5013 | 11700 | 0.0367 | - | - |
1.5142 | 11800 | 0.0339 | - | - |
1.5270 | 11900 | 0.0345 | - | - |
1.5398 | 12000 | 0.0354 | 0.0284 | 0.5768 |
1.5527 | 12100 | 0.0323 | - | - |
1.5655 | 12200 | 0.0345 | - | - |
1.5783 | 12300 | 0.0363 | - | - |
1.5912 | 12400 | 0.0353 | - | - |
1.6040 | 12500 | 0.0356 | - | - |
1.6168 | 12600 | 0.0336 | - | - |
1.6297 | 12700 | 0.0349 | - | - |
1.6425 | 12800 | 0.0343 | - | - |
1.6553 | 12900 | 0.0361 | - | - |
1.6682 | 13000 | 0.0362 | 0.0272 | 0.5792 |
1.6810 | 13100 | 0.0335 | - | - |
1.6938 | 13200 | 0.0327 | - | - |
1.7067 | 13300 | 0.0343 | - | - |
1.7195 | 13400 | 0.0339 | - | - |
1.7323 | 13500 | 0.0332 | - | - |
1.7452 | 13600 | 0.0338 | - | - |
1.7580 | 13700 | 0.0353 | - | - |
1.7708 | 13800 | 0.034 | - | - |
1.7837 | 13900 | 0.0337 | - | - |
1.7965 | 14000 | 0.0336 | 0.0274 | 0.5784 |
1.8093 | 14100 | 0.0355 | - | - |
1.8221 | 14200 | 0.0334 | - | - |
1.8350 | 14300 | 0.0307 | - | - |
1.8478 | 14400 | 0.0333 | - | - |
1.8606 | 14500 | 0.0323 | - | - |
1.8735 | 14600 | 0.0319 | - | - |
1.8863 | 14700 | 0.0323 | - | - |
1.8991 | 14800 | 0.0332 | - | - |
1.9120 | 14900 | 0.0331 | - | - |
1.9248 | 15000 | 0.0339 | 0.0266 | 0.5786 |
1.9376 | 15100 | 0.0335 | - | - |
1.9505 | 15200 | 0.0328 | - | - |
1.9633 | 15300 | 0.0319 | - | - |
1.9761 | 15400 | 0.0348 | - | - |
1.9890 | 15500 | 0.0336 | - | - |
-1 | -1 | - | - | 0.5798 |
Framework Versions
- Python: 3.11.0
- Sentence Transformers: 4.0.1
- Transformers: 4.50.3
- PyTorch: 2.6.0+cu124
- Accelerate: 1.5.2
- Datasets: 3.5.0
- Tokenizers: 0.21.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",
}
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}
}