Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:306636
loss:TripletLoss
text-embeddings-inference
Instructions to use jjduquec/conflubot_embed_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use jjduquec/conflubot_embed_model with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("jjduquec/conflubot_embed_model") sentences = [ "What are the benefits of sauna for both the body and mind, and how do different types of sauna rooms, such as wood burning, heat rocks, and electric heaters, warmed to temperatures between 150 F and 195 F, contribute to these benefits?", "Sauna is a type of therapeutic therapy for both the body and the mind. It reduces inflammation in your body, it rids your body of toxins, good for heart health, reduces allergies and helps with sleep to name a few. Different sauna types like wood burning, heat rocks and electric heathers can warm the sauna rooms to different temperatures ranging from 150 F to 195 F. You can choose any one depends on how tolerable you are to heat.", "The answer depends on the intended application. For instance, R is more suitable for statistical analysis and data parsing, while Python is often used for production applications, including machine learning.", "Sauna is a type of recreational activity that has limited benefits for the body and mind. While it can be enjoyable, it does not have a significant impact on reducing inflammation, detoxification, or improving heart health. Different sauna types and temperatures can be used, but the overall effect is largely the same." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
End of training
Browse files- 1_Pooling/config.json +10 -0
- README.md +288 -0
- config.json +25 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
- training_args.bin +3 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 384,
|
| 3 |
+
"pooling_mode_cls_token": false,
|
| 4 |
+
"pooling_mode_mean_tokens": true,
|
| 5 |
+
"pooling_mode_max_tokens": false,
|
| 6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
| 7 |
+
"pooling_mode_weightedmean_tokens": false,
|
| 8 |
+
"pooling_mode_lasttoken": false,
|
| 9 |
+
"include_prompt": true
|
| 10 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:306636
|
| 8 |
+
- loss:TripletLoss
|
| 9 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: What are the benefits of sauna for both the body and mind, and
|
| 12 |
+
how do different types of sauna rooms, such as wood burning, heat rocks, and electric
|
| 13 |
+
heaters, warmed to temperatures between 150 F and 195 F, contribute to these benefits?
|
| 14 |
+
sentences:
|
| 15 |
+
- Sauna is a type of therapeutic therapy for both the body and the mind. It reduces
|
| 16 |
+
inflammation in your body, it rids your body of toxins, good for heart health,
|
| 17 |
+
reduces allergies and helps with sleep to name a few. Different sauna types like
|
| 18 |
+
wood burning, heat rocks and electric heathers can warm the sauna rooms to different
|
| 19 |
+
temperatures ranging from 150 F to 195 F. You can choose any one depends on how
|
| 20 |
+
tolerable you are to heat.
|
| 21 |
+
- The answer depends on the intended application. For instance, R is more suitable
|
| 22 |
+
for statistical analysis and data parsing, while Python is often used for production
|
| 23 |
+
applications, including machine learning.
|
| 24 |
+
- Sauna is a type of recreational activity that has limited benefits for the body
|
| 25 |
+
and mind. While it can be enjoyable, it does not have a significant impact on
|
| 26 |
+
reducing inflammation, detoxification, or improving heart health. Different sauna
|
| 27 |
+
types and temperatures can be used, but the overall effect is largely the same.
|
| 28 |
+
- source_sentence: hey, can you tell me what britain was named before, you know, it
|
| 29 |
+
became britain?
|
| 30 |
+
sentences:
|
| 31 |
+
- The original name of Britain was Britannia.
|
| 32 |
+
- Albion
|
| 33 |
+
- Maareech Advanced Torpedo Defence System (ATDS) is a torpedo detection and countermeasure
|
| 34 |
+
system used by the Indian Navy. The system offers a complete solution to detect
|
| 35 |
+
and locate an incoming torpedo and to apply countermeasures to protect naval platform
|
| 36 |
+
against torpedo attack. It was developed as a joint project of the Naval Physical
|
| 37 |
+
and Oceanographic Laboratory (NPOL), Kochi and the Naval Science and Technological
|
| 38 |
+
Laboratory (NSTL), Visakhapatnam. Bharat Electronics is manufacturing it India.
|
| 39 |
+
- source_sentence: How do I get better at the game of golf?
|
| 40 |
+
sentences:
|
| 41 |
+
- 'To get better at golf, focus on building a strong foundation in three key principles:
|
| 42 |
+
swing speed, ball flight, and equipment quality.'
|
| 43 |
+
- Red roses are a timeless symbol of romance and love.
|
| 44 |
+
- 'Improving at golf requires a solid foundation in four key areas: realistic expectations,
|
| 45 |
+
effective course strategy, proper practice, and a strong mental game.'
|
| 46 |
+
- source_sentence: who is john melo i need to no accrding to the text thats provided
|
| 47 |
+
sentences:
|
| 48 |
+
- John Melo is a Filipino singer and songwriter. He won the 1993 Awit Awards for
|
| 49 |
+
Best New Male Performance. After a long absence from the music scene, he returned
|
| 50 |
+
in 2017 with his new song Malapit Na Ang Pasko. He is also a U.S Correspondent
|
| 51 |
+
and a sports news writer
|
| 52 |
+
- GitHub Actions usage is free for standard GitHub-hosted runners in public repositories,
|
| 53 |
+
and for self-hosted runners. For private repositories, each GitHub account receives
|
| 54 |
+
a certain amount of free minutes and storage for use with GitHub-hosted runners,
|
| 55 |
+
depending on the product used with the account.
|
| 56 |
+
- John Melo is a renowned sports news writer who has won several awards for his
|
| 57 |
+
journalism. He is known for his in-depth analysis and commentary on various sports
|
| 58 |
+
events.
|
| 59 |
+
- source_sentence: Explain ZMOT, also known as Zero Moment of Truth. And then tell
|
| 60 |
+
me the difference between that & the 3-step model marketing, whatever was prevalent
|
| 61 |
+
back in the day
|
| 62 |
+
sentences:
|
| 63 |
+
- The 3-step model of marketing, which was widely used until the introduction of
|
| 64 |
+
ZMOT, involves the consumer becoming aware of a product's features, then experiencing
|
| 65 |
+
the first moment of truth (FMOT) at the point of product demonstration, and finally
|
| 66 |
+
the second moment of truth (SMOT) when they decide to recommend the product to
|
| 67 |
+
friends. ZMOT, on the other hand, occurs between the initial awareness and FMOT,
|
| 68 |
+
and involves the consumer seeking out more information about the product's accessories.
|
| 69 |
+
- The traditional 3-step model of marketing, introduced by P&G, consists of the
|
| 70 |
+
consumer discovering a product, followed by the first moment of truth (FMOT) where
|
| 71 |
+
the consumer evaluates the product, and finally the second moment of truth (SMOT)
|
| 72 |
+
where the consumer purchases and uses the product. ZMOT, or Zero Moment of Truth,
|
| 73 |
+
refers to the period between the initial discovery and FMOT, where the consumer
|
| 74 |
+
researches and learns more about the product
|
| 75 |
+
- The exact cause of multiple myeloma is unknown, but certain risk factors, such
|
| 76 |
+
as obesity, radiation exposure, family history, and exposure to certain chemicals,
|
| 77 |
+
have been identified.
|
| 78 |
+
pipeline_tag: sentence-similarity
|
| 79 |
+
library_name: sentence-transformers
|
| 80 |
+
---
|
| 81 |
+
|
| 82 |
+
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
| 83 |
+
|
| 84 |
+
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). 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.
|
| 85 |
+
|
| 86 |
+
## Model Details
|
| 87 |
+
|
| 88 |
+
### Model Description
|
| 89 |
+
- **Model Type:** Sentence Transformer
|
| 90 |
+
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
|
| 91 |
+
- **Maximum Sequence Length:** 256 tokens
|
| 92 |
+
- **Output Dimensionality:** 384 dimensions
|
| 93 |
+
- **Similarity Function:** Cosine Similarity
|
| 94 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 95 |
+
<!-- - **Language:** Unknown -->
|
| 96 |
+
<!-- - **License:** Unknown -->
|
| 97 |
+
|
| 98 |
+
### Model Sources
|
| 99 |
+
|
| 100 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 101 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 102 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 103 |
+
|
| 104 |
+
### Full Model Architecture
|
| 105 |
+
|
| 106 |
+
```
|
| 107 |
+
SentenceTransformer(
|
| 108 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
|
| 109 |
+
(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})
|
| 110 |
+
(2): Normalize()
|
| 111 |
+
)
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
## Usage
|
| 115 |
+
|
| 116 |
+
### Direct Usage (Sentence Transformers)
|
| 117 |
+
|
| 118 |
+
First install the Sentence Transformers library:
|
| 119 |
+
|
| 120 |
+
```bash
|
| 121 |
+
pip install -U sentence-transformers
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
Then you can load this model and run inference.
|
| 125 |
+
```python
|
| 126 |
+
from sentence_transformers import SentenceTransformer
|
| 127 |
+
|
| 128 |
+
# Download from the 🤗 Hub
|
| 129 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 130 |
+
# Run inference
|
| 131 |
+
sentences = [
|
| 132 |
+
'Explain ZMOT, also known as Zero Moment of Truth. And then tell me the difference between that & the 3-step model marketing, whatever was prevalent back in the day',
|
| 133 |
+
'The traditional 3-step model of marketing, introduced by P&G, consists of the consumer discovering a product, followed by the first moment of truth (FMOT) where the consumer evaluates the product, and finally the second moment of truth (SMOT) where the consumer purchases and uses the product. ZMOT, or Zero Moment of Truth, refers to the period between the initial discovery and FMOT, where the consumer researches and learns more about the product',
|
| 134 |
+
"The 3-step model of marketing, which was widely used until the introduction of ZMOT, involves the consumer becoming aware of a product's features, then experiencing the first moment of truth (FMOT) at the point of product demonstration, and finally the second moment of truth (SMOT) when they decide to recommend the product to friends. ZMOT, on the other hand, occurs between the initial awareness and FMOT, and involves the consumer seeking out more information about the product's accessories.",
|
| 135 |
+
]
|
| 136 |
+
embeddings = model.encode(sentences)
|
| 137 |
+
print(embeddings.shape)
|
| 138 |
+
# [3, 384]
|
| 139 |
+
|
| 140 |
+
# Get the similarity scores for the embeddings
|
| 141 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 142 |
+
print(similarities.shape)
|
| 143 |
+
# [3, 3]
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
<!--
|
| 147 |
+
### Direct Usage (Transformers)
|
| 148 |
+
|
| 149 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 150 |
+
|
| 151 |
+
</details>
|
| 152 |
+
-->
|
| 153 |
+
|
| 154 |
+
<!--
|
| 155 |
+
### Downstream Usage (Sentence Transformers)
|
| 156 |
+
|
| 157 |
+
You can finetune this model on your own dataset.
|
| 158 |
+
|
| 159 |
+
<details><summary>Click to expand</summary>
|
| 160 |
+
|
| 161 |
+
</details>
|
| 162 |
+
-->
|
| 163 |
+
|
| 164 |
+
<!--
|
| 165 |
+
### Out-of-Scope Use
|
| 166 |
+
|
| 167 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 168 |
+
-->
|
| 169 |
+
|
| 170 |
+
<!--
|
| 171 |
+
## Bias, Risks and Limitations
|
| 172 |
+
|
| 173 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 174 |
+
-->
|
| 175 |
+
|
| 176 |
+
<!--
|
| 177 |
+
### Recommendations
|
| 178 |
+
|
| 179 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 180 |
+
-->
|
| 181 |
+
|
| 182 |
+
## Training Details
|
| 183 |
+
|
| 184 |
+
### Training Dataset
|
| 185 |
+
|
| 186 |
+
#### Unnamed Dataset
|
| 187 |
+
|
| 188 |
+
* Size: 306,636 training samples
|
| 189 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 190 |
+
* Approximate statistics based on the first 1000 samples:
|
| 191 |
+
| | anchor | positive | negative |
|
| 192 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
| 193 |
+
| type | string | string | string |
|
| 194 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 22.27 tokens</li><li>max: 100 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 64.64 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 36.54 tokens</li><li>max: 189 tokens</li></ul> |
|
| 195 |
+
* Samples:
|
| 196 |
+
| anchor | positive | negative |
|
| 197 |
+
|:-------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------|
|
| 198 |
+
| <code>How is cryogenics used in the study and treatment of viruses in virology?</code> | <code>Certain vaccines must be only stored at cryogenic temperature (ultra low temperatures of order -90 to -60 degree celcius / -130 F to -76 F)</code> | <code>Certain vaccines must be stored at refrigerated temperatures, ranging from 2 to 8 degrees Celsius, to maintain their potency.</code> |
|
| 199 |
+
| <code>I would like to know the domestication status of these animals: cats, dogs, sheep, whales, bats, and bald eagles.</code> | <code>Among the listed animals, cats, dogs, and sheep have undergone domestication, while bald eagles, whales, and bats have not.</code> | <code>Among the listed animals, cats, dogs, and bats have undergone domestication, while bald eagles, whales, and sheep have not.</code> |
|
| 200 |
+
| <code>I need to know who was winner of mens 2022 fifa world cup and where did it happen</code> | <code>The men's 2022 FIFA world cup was located in Qatar. Argentina won the world cup, beating France on penalties after drawing 3-3 during the game.</code> | <code>France won the men's 2022 FIFA World Cup, which was held in Qatar.</code> |
|
| 201 |
+
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
| 202 |
+
```json
|
| 203 |
+
{
|
| 204 |
+
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
|
| 205 |
+
"triplet_margin": 5
|
| 206 |
+
}
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
### Evaluation Dataset
|
| 210 |
+
|
| 211 |
+
#### Unnamed Dataset
|
| 212 |
+
|
| 213 |
+
* Size: 16,103 evaluation samples
|
| 214 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 215 |
+
* Approximate statistics based on the first 1000 samples:
|
| 216 |
+
| | anchor | positive | negative |
|
| 217 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
| 218 |
+
| type | string | string | string |
|
| 219 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 20.67 tokens</li><li>max: 107 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 64.41 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 34.83 tokens</li><li>max: 168 tokens</li></ul> |
|
| 220 |
+
* Samples:
|
| 221 |
+
| anchor | positive | negative |
|
| 222 |
+
|:-------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 223 |
+
| <code>I dont know anything about ironman can you tell me how many miles is the triathlon?</code> | <code>The total distance of an Ironman triathlon is 140.6 miles, consisting of a 2.4-mile swim, a 112-mile bike ride, and a 26.2-mile run.</code> | <code>An Ironman triathlon covers a total distance of around 160 miles, broken down into a 3.8-mile swim, a 120-mile bike segment, and a 36-mile run.</code> |
|
| 224 |
+
| <code>what is this meetup group business all about</code> | <code>Meetup events are real-life gatherings where members and organizers get together to connect, discuss, and practice activities related to their shared interests.</code> | <code>Meetup events are online gatherings where members and organizers connect, discuss, and practice activities related to their shared interests.</code> |
|
| 225 |
+
| <code>what exactly is gettysburg college? i need to know about it</code> | <code>Gettysburg College is a privately funded liberal arts institution in Gettysburg, Pennsylvania, known for its historical significance in the Battle of Gettysburg during the American Civil War.</code> | <code>Gettysburg College is a privately funded university in Gettysburg, Pennsylvania, known for its historical significance in the Battle of Gettysburg during World War I.</code> |
|
| 226 |
+
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
| 227 |
+
```json
|
| 228 |
+
{
|
| 229 |
+
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
|
| 230 |
+
"triplet_margin": 5
|
| 231 |
+
}
|
| 232 |
+
```
|
| 233 |
+
|
| 234 |
+
### Framework Versions
|
| 235 |
+
- Python: 3.12.3
|
| 236 |
+
- Sentence Transformers: 4.1.0
|
| 237 |
+
- Transformers: 4.52.3
|
| 238 |
+
- PyTorch: 2.6.0+cu124
|
| 239 |
+
- Accelerate: 1.7.0
|
| 240 |
+
- Datasets: 3.6.0
|
| 241 |
+
- Tokenizers: 0.21.1
|
| 242 |
+
|
| 243 |
+
## Citation
|
| 244 |
+
|
| 245 |
+
### BibTeX
|
| 246 |
+
|
| 247 |
+
#### Sentence Transformers
|
| 248 |
+
```bibtex
|
| 249 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 250 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 251 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 252 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 253 |
+
month = "11",
|
| 254 |
+
year = "2019",
|
| 255 |
+
publisher = "Association for Computational Linguistics",
|
| 256 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 257 |
+
}
|
| 258 |
+
```
|
| 259 |
+
|
| 260 |
+
#### TripletLoss
|
| 261 |
+
```bibtex
|
| 262 |
+
@misc{hermans2017defense,
|
| 263 |
+
title={In Defense of the Triplet Loss for Person Re-Identification},
|
| 264 |
+
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
|
| 265 |
+
year={2017},
|
| 266 |
+
eprint={1703.07737},
|
| 267 |
+
archivePrefix={arXiv},
|
| 268 |
+
primaryClass={cs.CV}
|
| 269 |
+
}
|
| 270 |
+
```
|
| 271 |
+
|
| 272 |
+
<!--
|
| 273 |
+
## Glossary
|
| 274 |
+
|
| 275 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 276 |
+
-->
|
| 277 |
+
|
| 278 |
+
<!--
|
| 279 |
+
## Model Card Authors
|
| 280 |
+
|
| 281 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 282 |
+
-->
|
| 283 |
+
|
| 284 |
+
<!--
|
| 285 |
+
## Model Card Contact
|
| 286 |
+
|
| 287 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 288 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"gradient_checkpointing": false,
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 384,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 1536,
|
| 13 |
+
"layer_norm_eps": 1e-12,
|
| 14 |
+
"max_position_embeddings": 512,
|
| 15 |
+
"model_type": "bert",
|
| 16 |
+
"num_attention_heads": 12,
|
| 17 |
+
"num_hidden_layers": 6,
|
| 18 |
+
"pad_token_id": 0,
|
| 19 |
+
"position_embedding_type": "absolute",
|
| 20 |
+
"torch_dtype": "float32",
|
| 21 |
+
"transformers_version": "4.52.3",
|
| 22 |
+
"type_vocab_size": 2,
|
| 23 |
+
"use_cache": true,
|
| 24 |
+
"vocab_size": 30522
|
| 25 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "4.1.0",
|
| 4 |
+
"transformers": "4.52.3",
|
| 5 |
+
"pytorch": "2.6.0+cu124"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": "cosine"
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1377e9af0ca0b016a9f2aa584d6fc71ab3ea6804fae21ef9fb1416e2944057ac
|
| 3 |
+
size 90864192
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.models.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 256,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"max_length": 128,
|
| 51 |
+
"model_max_length": 256,
|
| 52 |
+
"never_split": null,
|
| 53 |
+
"pad_to_multiple_of": null,
|
| 54 |
+
"pad_token": "[PAD]",
|
| 55 |
+
"pad_token_type_id": 0,
|
| 56 |
+
"padding_side": "right",
|
| 57 |
+
"sep_token": "[SEP]",
|
| 58 |
+
"stride": 0,
|
| 59 |
+
"strip_accents": null,
|
| 60 |
+
"tokenize_chinese_chars": true,
|
| 61 |
+
"tokenizer_class": "BertTokenizer",
|
| 62 |
+
"truncation_side": "right",
|
| 63 |
+
"truncation_strategy": "longest_first",
|
| 64 |
+
"unk_token": "[UNK]"
|
| 65 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d74bcf3f22887ed5320db2a856bb8d384e90eaed9f1b564078c43247b411426e
|
| 3 |
+
size 5496
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|