---
language:
- en
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:20000
- 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.9947599768638611
name: Cosine Accuracy
---
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) on the [gooaq](https://huggingface.co/datasets/sentence-transformers/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](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
- **Maximum Sequence Length:** 256 tokens
- **Output Dimensionality:** 384 dimensions
- **Similarity Function:** Cosine Similarity
- **Training Dataset:**
- [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq)
- **Language:** en
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### 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:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("gabrielegabellone/all-mini-gooaq-4-epoch")
# 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
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| **cosine_accuracy** | **0.9948** |
## Training Details
### Training Dataset
#### gooaq
* Dataset: [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
* Size: 20,000 training samples
* Columns: question
and answer
* Approximate statistics based on the first 1000 samples:
| | question | answer |
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details |
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
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### gooaq
* Dataset: [gooaq](https://huggingface.co/datasets/sentence-transformers/gooaq) at [b089f72](https://huggingface.co/datasets/sentence-transformers/gooaq/tree/b089f728748a068b7bc5234e5bcf5b25e3c8279c)
* Size: 5,000 evaluation samples
* Columns: question
and answer
* Approximate statistics based on the first 1000 samples:
| | question | answer |
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details | 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
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: epoch
- `per_device_train_batch_size`: 256
- `per_device_eval_batch_size`: 256
- `num_train_epochs`: 4
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters