|
---
|
|
base_model: sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
|
datasets:
|
|
- sentence-transformers/msmarco-msmarco-distilbert-base-tas-b
|
|
- jaimevera1107/similarity-sentences-spanish
|
|
- sentence-transformers/all-nli
|
|
- sentence-transformers/stsb
|
|
- sentence-transformers/quora-duplicates
|
|
- sentence-transformers/natural-questions
|
|
language:
|
|
- en
|
|
- es
|
|
library_name: sentence-transformers
|
|
pipeline_tag: sentence-similarity
|
|
tags:
|
|
- sentence-transformers
|
|
- sentence-similarity
|
|
- feature-extraction
|
|
- generated_from_trainer
|
|
- dataset_size:58270
|
|
- loss:MultipleNegativesRankingLoss
|
|
- loss:CoSENTLoss
|
|
- dataset_size:38270
|
|
- dataset_size:18270
|
|
widget:
|
|
- source_sentence: The men are outside.
|
|
sentences:
|
|
- Two men with backpacks hiking up a trail.
|
|
- Two men are leaning out of a window and looking at something to the right of them.
|
|
- Two men are trying to plow some dirt, behind a red motorcycle.
|
|
- source_sentence: The men are outside.
|
|
sentences:
|
|
- Two men work on the sewers in the middle of the road as a BMW stops next to them.
|
|
- Two women work on a project outdoors.
|
|
- Two men work on the sewers in the middle of the road as a BMW stops next to them.
|
|
- source_sentence: Fundamentals of quantum computing.
|
|
sentences:
|
|
- Quantum computing researcher with qubit systems experience.
|
|
- Teacher with classroom management skills.
|
|
- ' Analista financiero con experiencia en predicción de series temporales y modelos
|
|
financieros.'
|
|
- source_sentence: Software architecture fundamentals course.
|
|
sentences:
|
|
- Software architect with system design skills.
|
|
- Desarrollador web con habilidades en WordPress
|
|
- Nurse with neonatal care experience.
|
|
- source_sentence: what creates a bunion
|
|
sentences:
|
|
- Mitral valve regurgitation means that one of the valves in your heart-the mitral
|
|
valve-is letting blood leak backward into the heart.Heart valves work like one-way
|
|
gates, helping blood flow in one direction between heart chambers or in and out
|
|
of the heart. The mitral valve is on the left side of your heart.It lets blood
|
|
flow from the upper to the lower heart chamber. See a picture of mitral valve
|
|
regurgitation.When the mitral valve is damaged-for example, by an infection-it
|
|
may no longer close tightly.This lets blood leak backward, or regurgitate, into
|
|
the upper chamber.t lets blood flow from the upper to the lower heart chamber.
|
|
See a picture of mitral valve regurgitation. When the mitral valve is damaged-for
|
|
example, by an infection-it may no longer close tightly. This lets blood leak
|
|
backward, or regurgitate, into the upper chamber.
|
|
- A bunion is a bony bump that forms on the joint at the base of your big toe. It
|
|
forms when your big toe pushes against your next toe, forcing the joint of your
|
|
big toe to get bigger and stick out. The skin over the bunion might be red and
|
|
sore. Wearing tight, narrow shoes might cause bunions or make them worse. Bunions
|
|
also can develop as a result of an inherited structural defect, stress on your
|
|
foot or a medical condition, such as arthritis. Smaller bunions (bunionettes)
|
|
can develop on the joint of your little toe. Nov. 08, 2016.
|
|
- 'A bunionette , or tailor''s bunion, is one that develops at the base of the little
|
|
toe. When the long bone that connects to the toe (metatarsal ) bends away from
|
|
the foot, the little toe bends inward and the joint swells or enlarges. Other
|
|
factors that can lead to a bunion include: Loose ligaments in the foot.'
|
|
---
|
|
|
|
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-mpnet-base-v2
|
|
|
|
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2) on the dataset, [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b), [spanish](https://huggingface.co/datasets/jaimevera1107/similarity-sentences-spanish), [all-nli-triplet](https://huggingface.co/datasets/sentence-transformers/all-nli) and [stsb](https://huggingface.co/datasets/sentence-transformers/stsb) datasets. 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:** [sentence-transformers/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-mpnet-base-v2) <!-- at revision 79f2382ceacceacdf38563d7c5d16b9ff8d725d6 -->
|
|
- **Maximum Sequence Length:** 128 tokens
|
|
- **Output Dimensionality:** 768 tokens
|
|
- **Similarity Function:** Cosine Similarity
|
|
- **Training Datasets:**
|
|
- dataset
|
|
- [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b)
|
|
- [spanish](https://huggingface.co/datasets/jaimevera1107/similarity-sentences-spanish)
|
|
- [all-nli-triplet](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
|
- [stsb](https://huggingface.co/datasets/sentence-transformers/stsb)
|
|
- **Languages:** en, es
|
|
<!-- - **License:** Unknown -->
|
|
|
|
### 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': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
|
|
(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:
|
|
|
|
```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("saraleivam/GURU-model2")
|
|
# Run inference
|
|
sentences = [
|
|
'what creates a bunion',
|
|
"A bunionette , or tailor's bunion, is one that develops at the base of the little toe. When the long bone that connects to the toe (metatarsal ) bends away from the foot, the little toe bends inward and the joint swells or enlarges. Other factors that can lead to a bunion include: Loose ligaments in the foot.",
|
|
'A bunion is a bony bump that forms on the joint at the base of your big toe. It forms when your big toe pushes against your next toe, forcing the joint of your big toe to get bigger and stick out. The skin over the bunion might be red and sore. Wearing tight, narrow shoes might cause bunions or make them worse. Bunions also can develop as a result of an inherited structural defect, stress on your foot or a medical condition, such as arthritis. Smaller bunions (bunionettes) can develop on the joint of your little toe. Nov. 08, 2016.',
|
|
]
|
|
embeddings = model.encode(sentences)
|
|
print(embeddings.shape)
|
|
# [3, 768]
|
|
|
|
# Get the similarity scores for the embeddings
|
|
similarities = model.similarity(embeddings, embeddings)
|
|
print(similarities.shape)
|
|
# [3, 3]
|
|
```
|
|
|
|
<!--
|
|
### Direct Usage (Transformers)
|
|
|
|
<details><summary>Click to see the direct usage in Transformers</summary>
|
|
|
|
</details>
|
|
-->
|
|
|
|
<!--
|
|
### Downstream Usage (Sentence Transformers)
|
|
|
|
You can finetune this model on your own dataset.
|
|
|
|
<details><summary>Click to expand</summary>
|
|
|
|
</details>
|
|
-->
|
|
|
|
<!--
|
|
### Out-of-Scope Use
|
|
|
|
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
|
-->
|
|
|
|
<!--
|
|
## Bias, Risks and Limitations
|
|
|
|
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
|
-->
|
|
|
|
<!--
|
|
### Recommendations
|
|
|
|
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
|
-->
|
|
|
|
## Training Details
|
|
|
|
### Training Datasets
|
|
|
|
#### dataset
|
|
|
|
* Dataset: dataset
|
|
* Size: 521 training samples
|
|
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | anchor | positive | negative |
|
|
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
|
| type | string | string | string |
|
|
| details | <ul><li>min: 5 tokens</li><li>mean: 18.41 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 19.98 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 15.84 tokens</li><li>max: 128 tokens</li></ul> |
|
|
* Samples:
|
|
| anchor | positive | negative |
|
|
|:-------------------------------------------------------------------|:------------------------------------------------------------------------|:-------------------------------------------------------------|
|
|
| <code>Advanced data analysis with R.</code> | <code>Data analyst with R and statistical modeling experience.</code> | <code>Interior designer with space decoration skills.</code> |
|
|
| <code>Introduction to quantum machine learning.</code> | <code>AI researcher with quantum machine learning skills.</code> | <code>Pharmacist with pharmaceutical care skills.</code> |
|
|
| <code>Fundamentos de diseño de experiencia de usuario (UX).</code> | <code>Diseñador UX con habilidades en investigación de usuarios.</code> | <code>Abogado con habilidades en derecho civil.</code> |
|
|
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "cos_sim"
|
|
}
|
|
```
|
|
|
|
#### distilbert
|
|
|
|
* Dataset: [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b) at [e63dd83](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b/tree/e63dd8397db956cdde78e5e18c0d734585874db2)
|
|
* Size: 1,000 training samples
|
|
* Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | query | positive | negative |
|
|
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
|
| type | string | string | string |
|
|
| details | <ul><li>min: 4 tokens</li><li>mean: 9.95 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 84.21 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 79.55 tokens</li><li>max: 128 tokens</li></ul> |
|
|
* Samples:
|
|
| query | positive | negative |
|
|
|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| <code>what are the liberal arts?</code> | <code>liberal arts. 1. the academic course of instruction at a college intended to provide general knowledge and comprising the arts, humanities, natural sciences, and social sciences, as opposed to professional or technical subjects.</code> | <code>liberal arts definition The areas of learning that cultivate general intellectual ability rather than technical or professional skills. Liberal arts is often used as a synonym for humanities, because literature, languages, history, and philosophy are often considered the primary subjects of the liberal arts.</code> |
|
|
| <code>what is the mechanism of action of fibrinolytic or thrombolytic drugs?</code> | <code>Baillière's Clinical Haematology. 6 Mechanism of action of the thrombolytic agents. 6 Mechanism of action of the thrombolytic agents JEFFREY I. WEITZ Fibrin formed during the haemostatic, inflammatory or tissue repair process serves a temporary role, and must be degraded to restore normal tissue function and structure.</code> | <code>Thrombolytic drugs such as tPA are often the first line of defense in treating some forms of ischemic stroke. The stroke occurs when fibrin strands in the blood trap blood cells and platelets, forming a clot in an artery to the brain (A).</code> |
|
|
| <code>what is normal plat count</code> | <code>78 Followers. A. Platelets are the tiny blood cells that help stop bleeding by binding together to form a clump or plug at sites of injury inside blood vessels. A normal platelet count is between 150,000 and 450,000 platelets per microliter (one-millionth of a liter, abbreviated mcL).The average platelet count is 237,000 per mcL in men and 266,000 per mcL in women.8 Followers. A. Platelets are the tiny blood cells that help stop bleeding by binding together to form a clump or plug at sites of injury inside blood vessels. A normal platelet count is between 150,000 and 450,000 platelets per microliter (one-millionth of a liter, abbreviated mcL).</code> | <code>The normal number of platelets is between 150 and 400 million per millilitre (ml) of blood. Most pregnant women have normal numbers of platelets, but about eight per cent of pregnant women have a slight drop in their platelet count.Your count is below normal if you have between 100 and 150 million platelets per ml of blood.our platelet count will look something like Plat. 160x10.9/L, which means you have a platelet count of 160, which is in the normal range. If your platelet count is low, the blood test should be done again. This will keep track of whether or not your count is dropping.</code> |
|
|
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "cos_sim"
|
|
}
|
|
```
|
|
|
|
#### spanish
|
|
|
|
* Dataset: [spanish](https://huggingface.co/datasets/jaimevera1107/similarity-sentences-spanish) at [de18671](https://huggingface.co/datasets/jaimevera1107/similarity-sentences-spanish/tree/de18671fdc278718fab8a505e209e69264079c7a)
|
|
* Size: 1,000 training samples
|
|
* Columns: <code>sentence1</code>, <code>sentence2</code>, <code>score</code>, and <code>source</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | sentence1 | sentence2 | score | source |
|
|
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|:-------------------------------------------------------------------------------|
|
|
| type | string | string | float | string |
|
|
| details | <ul><li>min: 9 tokens</li><li>mean: 27.57 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 27.6 tokens</li><li>max: 56 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.51</li><li>max: 1.0</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 4.0 tokens</li><li>max: 4 tokens</li></ul> |
|
|
* Samples:
|
|
| sentence1 | sentence2 | score | source |
|
|
|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|:-----------------|
|
|
| <code>La comida china tradicional se basa en la filosofía de equilibrio entre el yin y el yang, y el uso de ingredientes frescos.</code> | <code>Los principios de la cocina china se centran en el equilibrio entre los sabores dulce y salado, así como en el uso de productos naturales.</code> | <code>0.4</code> | <code>GPT</code> |
|
|
| <code>El neokantismo es una corriente filosófica que busca revitalizar los principios del pensamiento de Immanuel Kant en el contexto moderno.</code> | <code>Los neokantianos buscan actualizar los conceptos de Immanuel Kant para aplicarlos a la filosofía contemporánea.</code> | <code>0.4</code> | <code>GPT</code> |
|
|
| <code>La teoría de la paridad del poder adquisitivo sostiene que en el largo plazo, los tipos de cambio entre dos monedas deben ajustarse para reflejar las diferencias en los niveles de precios de los países.</code> | <code>La teoría de la paridad del poder adquisitivo se refiere a la relación entre los niveles de precios de los países y los tipos de cambio entre dos monedas, con el objetivo de mantener el equilibrio a largo plazo.</code> | <code>0.3</code> | <code>GPT</code> |
|
|
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "pairwise_cos_sim"
|
|
}
|
|
```
|
|
|
|
#### all-nli-triplet
|
|
|
|
* Dataset: [all-nli-triplet](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
|
* Size: 10,000 training samples
|
|
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | anchor | positive | negative |
|
|
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
|
| type | string | string | string |
|
|
| details | <ul><li>min: 7 tokens</li><li>mean: 10.9 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 13.62 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.76 tokens</li><li>max: 55 tokens</li></ul> |
|
|
* Samples:
|
|
| anchor | positive | negative |
|
|
|:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
|
|
| <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
|
|
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
|
| <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
|
|
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "cos_sim"
|
|
}
|
|
```
|
|
|
|
#### stsb
|
|
|
|
* Dataset: [stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
|
|
* Size: 5,749 training samples
|
|
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | sentence1 | sentence2 | score |
|
|
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
|
| type | string | string | float |
|
|
| details | <ul><li>min: 6 tokens</li><li>mean: 11.08 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 11.05 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
|
* Samples:
|
|
| sentence1 | sentence2 | score |
|
|
|:-----------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
|
|
| <code>A plane is taking off.</code> | <code>An air plane is taking off.</code> | <code>1.0</code> |
|
|
| <code>A man is playing a large flute.</code> | <code>A man is playing a flute.</code> | <code>0.76</code> |
|
|
| <code>A man is spreading shreded cheese on a pizza.</code> | <code>A man is spreading shredded cheese on an uncooked pizza.</code> | <code>0.76</code> |
|
|
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "pairwise_cos_sim"
|
|
}
|
|
```
|
|
|
|
### Evaluation Datasets
|
|
|
|
#### dataset
|
|
|
|
* Dataset: dataset
|
|
* Size: 131 evaluation samples
|
|
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | anchor | positive | negative |
|
|
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
|
| type | string | string | string |
|
|
| details | <ul><li>min: 7 tokens</li><li>mean: 19.38 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 20.61 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.47 tokens</li><li>max: 122 tokens</li></ul> |
|
|
* Samples:
|
|
| anchor | positive | negative |
|
|
|:---------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------|
|
|
| <code>Curso de matemáticas avanzadas para ingeniería</code> | <code>Ingeniero con habilidades en cálculo y álgebra avanzada</code> | <code>Chef con experiencia en repostería</code> |
|
|
| <code>Fundamentos de análisis financiero y gestión de riesgos</code> | <code>Analista financiero con habilidades en gestión de riesgos y análisis de inversiones</code> | <code>Chef con experiencia en cocina tradicion</code> |
|
|
| <code>Project Management with Agile Methodologies and Scrum.</code> | <code>Project manager with skills in Scrum and agile methodologies.</code> | <code>Mechanical engineer with structural design experience.</code> |
|
|
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "cos_sim"
|
|
}
|
|
```
|
|
|
|
#### distilbert
|
|
|
|
* Dataset: [distilbert](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b) at [e63dd83](https://huggingface.co/datasets/sentence-transformers/msmarco-msmarco-distilbert-base-tas-b/tree/e63dd8397db956cdde78e5e18c0d734585874db2)
|
|
* Size: 100 evaluation samples
|
|
* Columns: <code>query</code>, <code>positive</code>, and <code>negative</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | query | positive | negative |
|
|
|:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
|
|
| type | string | string | string |
|
|
| details | <ul><li>min: 5 tokens</li><li>mean: 9.87 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 28 tokens</li><li>mean: 86.98 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 23 tokens</li><li>mean: 80.97 tokens</li><li>max: 128 tokens</li></ul> |
|
|
* Samples:
|
|
| query | positive | negative |
|
|
|:-----------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| <code>when was the town of farragut tn incorporated</code> | <code>In January of 1980, residents decided to incorporate by an overwhelming margin. The Town of Farragut was incorporated on January 16, 1980, with the first board of Mayor and Alderman elected on April 1, 1980.</code> | <code>Farragut is a town which straddles both Knox and Loudon counties in Tennessee. It is a suburb of Knoxville. The town's population was 20,676 at the 2010 census. It is included in the Knoxville Metropolitan Area. The town is named in honor of American Civil War Admiral David Farragut, who was born just east of Farragut at Campbell's Station in 1801.</code> |
|
|
| <code>how long to roast a chicken</code> | <code>There are two methods for roasting a whole chicken: Regular method: 1 Preheat oven to 350 degrees F (175 degrees C). 2 Roast whole (thawed) chickens for 20 minutes per pound, plus an additional 15 minutes.</code> | <code>1 Roast the chicken at 450 degrees for 20 minutes, then reduce the heat to 400 degrees and continue roasting for about 40 minutes (or until the internal temperature reaches about 175 to 180 degrees F. about 1 hour or a little less).</code> |
|
|
| <code>what is a hormone?</code> | <code>What Are Hormones, And What Do They Do? Hormones are special chemical messengers in the body that are created in the endocrine glands. These messengers control most major bodily functions, from simple basic needs like hunger to complex systems like reproduction, and even the emotions and mood. Understanding the major hormones and what they do will help patients take control of their health. Prostaglandins.</code> | <code>Hormone is a chemical substance that is produced in one part of the body (by an endocrine gland) and is carried in the blood to other distant organs or tissues where it acts to modify their structure or function.</code> |
|
|
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "cos_sim"
|
|
}
|
|
```
|
|
|
|
#### all-nli-triplet
|
|
|
|
* Dataset: [all-nli-triplet](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
|
* Size: 100 evaluation samples
|
|
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | anchor | positive | negative |
|
|
|:--------|:-------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
|
| type | string | string | string |
|
|
| details | <ul><li>min: 7 tokens</li><li>mean: 7.0 tokens</li><li>max: 7 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.62 tokens</li><li>max: 78 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 16.0 tokens</li><li>max: 21 tokens</li></ul> |
|
|
* Samples:
|
|
| anchor | positive | negative |
|
|
|:----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|
|
|
| <code>The men are outside.</code> | <code>A man in a green and white "Irish" baseball uniform is lunging forward as though to throw the ball underhand as an older man in umpire's uniform looks on.</code> | <code>Two men are leaning out of a window and looking at something to the right of them.</code> |
|
|
| <code>The men are outside.</code> | <code>Three men getting some kind of grass together on a windy day.</code> | <code>Two women work on a project outdoors.</code> |
|
|
| <code>The men are outside.</code> | <code>Three men getting some kind of grass together on a windy day.</code> | <code>Two men are leaning out of a window and looking at something to the right of them.</code> |
|
|
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "cos_sim"
|
|
}
|
|
```
|
|
|
|
#### stsb
|
|
|
|
* Dataset: [stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
|
|
* Size: 1,500 evaluation samples
|
|
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
|
* Approximate statistics based on the first 1000 samples:
|
|
| | sentence1 | sentence2 | score |
|
|
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
|
| type | string | string | float |
|
|
| details | <ul><li>min: 5 tokens</li><li>mean: 16.55 tokens</li><li>max: 47 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 16.5 tokens</li><li>max: 47 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
|
|
* Samples:
|
|
| sentence1 | sentence2 | score |
|
|
|:--------------------------------------------------|:------------------------------------------------------|:------------------|
|
|
| <code>A man with a hard hat is dancing.</code> | <code>A man wearing a hard hat is dancing.</code> | <code>1.0</code> |
|
|
| <code>A young child is riding a horse.</code> | <code>A child is riding a horse.</code> | <code>0.95</code> |
|
|
| <code>A man is feeding a mouse to a snake.</code> | <code>The man is feeding a mouse to the snake.</code> | <code>1.0</code> |
|
|
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
|
```json
|
|
{
|
|
"scale": 20.0,
|
|
"similarity_fct": "pairwise_cos_sim"
|
|
}
|
|
```
|
|
|
|
### Training Hyperparameters
|
|
|
|
#### All Hyperparameters
|
|
<details><summary>Click to expand</summary>
|
|
|
|
- `overwrite_output_dir`: False
|
|
- `do_predict`: False
|
|
- `eval_strategy`: no
|
|
- `prediction_loss_only`: True
|
|
- `per_device_train_batch_size`: 8
|
|
- `per_device_eval_batch_size`: 8
|
|
- `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.0
|
|
- `num_train_epochs`: 3.0
|
|
- `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
|
|
- `batch_sampler`: batch_sampler
|
|
- `multi_dataset_batch_sampler`: proportional
|
|
|
|
</details>
|
|
|
|
### Training Logs
|
|
| Epoch | Step | Training Loss | distilbert loss | all-nli-triplet loss | stsb loss | dataset loss |
|
|
|:------:|:----:|:-------------:|:---------------:|:--------------------:|:---------:|:------------:|
|
|
| 0.2188 | 500 | 1.9313 | - | - | - | - |
|
|
| 0.4376 | 1000 | 1.766 | - | - | - | - |
|
|
| 0.6565 | 1500 | 1.6605 | - | - | - | - |
|
|
| 0.8753 | 2000 | 1.6541 | - | - | - | - |
|
|
| 1.0941 | 2500 | 1.6496 | - | - | - | - |
|
|
| 1.3129 | 3000 | 1.4151 | - | - | - | - |
|
|
| 1.5317 | 3500 | 1.3921 | - | - | - | - |
|
|
| 1.7505 | 4000 | 1.301 | - | - | - | - |
|
|
| 1.9694 | 4500 | 1.3356 | - | - | - | - |
|
|
| 2.1882 | 5000 | 1.212 | - | - | - | - |
|
|
| 2.4070 | 5500 | 1.1476 | - | - | - | - |
|
|
| 2.6258 | 6000 | 1.1854 | - | - | - | - |
|
|
| 2.8446 | 6500 | 1.0177 | - | - | - | - |
|
|
| 3.0 | 6855 | - | 1.3369 | 2.6425 | 4.8295 | 0.0736 |
|
|
|
|
|
|
### Framework Versions
|
|
- Python: 3.9.13
|
|
- Sentence Transformers: 3.0.1
|
|
- Transformers: 4.41.2
|
|
- PyTorch: 2.3.1+cpu
|
|
- Accelerate: 0.31.0
|
|
- Datasets: 2.20.0
|
|
- Tokenizers: 0.19.1
|
|
|
|
## Citation
|
|
|
|
### BibTeX
|
|
|
|
#### Sentence Transformers
|
|
```bibtex
|
|
@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
|
|
```bibtex
|
|
@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}
|
|
}
|
|
```
|
|
|
|
#### CoSENTLoss
|
|
```bibtex
|
|
@online{kexuefm-8847,
|
|
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
|
|
author={Su Jianlin},
|
|
year={2022},
|
|
month={Jan},
|
|
url={https://kexue.fm/archives/8847},
|
|
}
|
|
```
|
|
|
|
<!--
|
|
## Glossary
|
|
|
|
*Clearly define terms in order to be accessible across audiences.*
|
|
-->
|
|
|
|
<!--
|
|
## Model Card Authors
|
|
|
|
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
|
-->
|
|
|
|
<!--
|
|
## Model Card Contact
|
|
|
|
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
|
--> |