Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +445 -0
- config.json +26 -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 +64 -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,445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- dataset_size:10K<n<100K
|
9 |
+
- loss:TripletLoss
|
10 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
11 |
+
metrics:
|
12 |
+
- cosine_accuracy
|
13 |
+
- dot_accuracy
|
14 |
+
- manhattan_accuracy
|
15 |
+
- euclidean_accuracy
|
16 |
+
- max_accuracy
|
17 |
+
widget:
|
18 |
+
- source_sentence: The agoraphobic situations almost always provoke fear or anxiety.
|
19 |
+
sentences:
|
20 |
+
- Attending crowded events or public gatherings fills me with anxiety because of
|
21 |
+
the fear of a potential threat in the crowd.
|
22 |
+
- The struggle to focus during the day is often due to feeling exhausted even after
|
23 |
+
a full night's sleep.
|
24 |
+
- It's not uncommon for me to engage in risky behaviors like reckless driving or
|
25 |
+
reckless sexual encounters.
|
26 |
+
- source_sentence: Due to my insomnia, I have frequent headaches and muscle soreness.
|
27 |
+
sentences:
|
28 |
+
- My insomnia results in frequent headaches and muscle soreness for me.
|
29 |
+
- My fear of heights prevents me from going on roller coasters or visiting scenic
|
30 |
+
overlooks on mountains.
|
31 |
+
- Focusing on tasks becomes challenging due to my constant worry about when the
|
32 |
+
next panic attack will strike.
|
33 |
+
- source_sentence: Commuting to work, even when it's a short distance, feels draining.
|
34 |
+
sentences:
|
35 |
+
- Even a short distance can make driving or commuting to work feel draining.
|
36 |
+
- My fear of heights prevents me from going on roller coasters or visiting scenic
|
37 |
+
overlooks on mountains.
|
38 |
+
- The impact on my ability to focus on tasks is due to my constant worry about when
|
39 |
+
the next panic attack will strike.
|
40 |
+
- source_sentence: Frequent headaches and muscle soreness are a result of my insomnia.
|
41 |
+
sentences:
|
42 |
+
- My frequent headaches and muscle soreness are a direct result of my insomnia.
|
43 |
+
- My fear of heights prevents me from going on roller coasters or visiting scenic
|
44 |
+
overlooks on mountains.
|
45 |
+
- Focusing on tasks becomes challenging due to my constant worry about when the
|
46 |
+
next panic attack will strike.
|
47 |
+
- source_sentence: Experience frequent headaches and muscle soreness due to my insomnia.
|
48 |
+
sentences:
|
49 |
+
- I experience frequent headaches and muscle soreness because of my insomnia.
|
50 |
+
- The struggle to focus during the day is often due to feeling exhausted even after
|
51 |
+
a full night's sleep.
|
52 |
+
- Focusing on tasks becomes challenging due to my constant worry about when the
|
53 |
+
next panic attack will strike.
|
54 |
+
pipeline_tag: sentence-similarity
|
55 |
+
model-index:
|
56 |
+
- name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
57 |
+
results:
|
58 |
+
- task:
|
59 |
+
type: triplet
|
60 |
+
name: Triplet
|
61 |
+
dataset:
|
62 |
+
name: FT triple
|
63 |
+
type: FT-triple
|
64 |
+
metrics:
|
65 |
+
- type: cosine_accuracy
|
66 |
+
value: 0.8093060785368478
|
67 |
+
name: Cosine Accuracy
|
68 |
+
- type: dot_accuracy
|
69 |
+
value: 0.19069392146315223
|
70 |
+
name: Dot Accuracy
|
71 |
+
- type: manhattan_accuracy
|
72 |
+
value: 0.8103819257665411
|
73 |
+
name: Manhattan Accuracy
|
74 |
+
- type: euclidean_accuracy
|
75 |
+
value: 0.8093060785368478
|
76 |
+
name: Euclidean Accuracy
|
77 |
+
- type: max_accuracy
|
78 |
+
value: 0.8103819257665411
|
79 |
+
name: Max Accuracy
|
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 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
|
91 |
+
- **Maximum Sequence Length:** 256 tokens
|
92 |
+
- **Output Dimensionality:** 384 tokens
|
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("Hgkang00/FT-triple-2")
|
130 |
+
# Run inference
|
131 |
+
sentences = [
|
132 |
+
'Experience frequent headaches and muscle soreness due to my insomnia.',
|
133 |
+
'I experience frequent headaches and muscle soreness because of my insomnia.',
|
134 |
+
"The struggle to focus during the day is often due to feeling exhausted even after a full night's sleep.",
|
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 |
+
## Evaluation
|
171 |
+
|
172 |
+
### Metrics
|
173 |
+
|
174 |
+
#### Triplet
|
175 |
+
* Dataset: `FT-triple`
|
176 |
+
* Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
|
177 |
+
|
178 |
+
| Metric | Value |
|
179 |
+
|:-------------------|:-----------|
|
180 |
+
| cosine_accuracy | 0.8093 |
|
181 |
+
| dot_accuracy | 0.1907 |
|
182 |
+
| manhattan_accuracy | 0.8104 |
|
183 |
+
| euclidean_accuracy | 0.8093 |
|
184 |
+
| **max_accuracy** | **0.8104** |
|
185 |
+
|
186 |
+
<!--
|
187 |
+
## Bias, Risks and Limitations
|
188 |
+
|
189 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
190 |
+
-->
|
191 |
+
|
192 |
+
<!--
|
193 |
+
### Recommendations
|
194 |
+
|
195 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
196 |
+
-->
|
197 |
+
|
198 |
+
## Training Details
|
199 |
+
|
200 |
+
### Training Dataset
|
201 |
+
|
202 |
+
#### Unnamed Dataset
|
203 |
+
|
204 |
+
|
205 |
+
* Size: 52,000 training samples
|
206 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
207 |
+
* Approximate statistics based on the first 1000 samples:
|
208 |
+
| | anchor | positive | negative |
|
209 |
+
|:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
|
210 |
+
| type | string | string | string |
|
211 |
+
| details | <ul><li>min: 29 tokens</li><li>mean: 29.0 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 18 tokens</li><li>mean: 23.16 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 13 tokens</li><li>mean: 24.81 tokens</li><li>max: 42 tokens</li></ul> |
|
212 |
+
* Samples:
|
213 |
+
| anchor | positive | negative |
|
214 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------|
|
215 |
+
| <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>Even in the privacy of my room, I hear voices that tell me things that are not real frequently.</code> | <code>My lack of pleasure in things I once enjoyed has caused me to lose interest in hobbies or activities that used to bring me joy.</code> |
|
216 |
+
| <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>It's common for me to hear things that are not real, even when I'm in my room by myself.</code> | <code>Starting multiple projects simultaneously during these episodes makes me feel like I can accomplish everything at once.</code> |
|
217 |
+
| <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>Even in the privacy of my room, I hear voices that tell me things that are not real frequently.</code> | <code>Even after a full night's sleep, I struggle to get out of bed in the morning, feeling tired.</code> |
|
218 |
+
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
219 |
+
```json
|
220 |
+
{
|
221 |
+
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
|
222 |
+
"triplet_margin": 5
|
223 |
+
}
|
224 |
+
```
|
225 |
+
|
226 |
+
### Evaluation Dataset
|
227 |
+
|
228 |
+
#### Unnamed Dataset
|
229 |
+
|
230 |
+
|
231 |
+
* Size: 3,718 evaluation samples
|
232 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
233 |
+
* Approximate statistics based on the first 1000 samples:
|
234 |
+
| | anchor | positive | negative |
|
235 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
236 |
+
| type | string | string | string |
|
237 |
+
| details | <ul><li>min: 18 tokens</li><li>mean: 32.73 tokens</li><li>max: 60 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 22.72 tokens</li><li>max: 35 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 24.7 tokens</li><li>max: 47 tokens</li></ul> |
|
238 |
+
* Samples:
|
239 |
+
| anchor | positive | negative |
|
240 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|
|
241 |
+
| <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>Observers in my vicinity have noted the escalation of my erratic and unpredictable behavior.</code> | <code>It's a challenge for me to seek assistance in public places, even when I clearly need help.</code> |
|
242 |
+
| <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>There has been a growing awareness among those around me about my increasingly erratic and unpredictable behavior.</code> | <code>The difficulty of connecting with others on a deeper level stems from feeling like I've lost a part of myself due to the traumatic event.</code> |
|
243 |
+
| <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>It has come to the attention of those around me that my behavior is becoming more erratic and unpredictable.</code> | <code>My thoughts exhibited a chaotic and disconnected pattern in that manic episode.</code> |
|
244 |
+
* Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
|
245 |
+
```json
|
246 |
+
{
|
247 |
+
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
|
248 |
+
"triplet_margin": 5
|
249 |
+
}
|
250 |
+
```
|
251 |
+
|
252 |
+
### Training Hyperparameters
|
253 |
+
#### Non-Default Hyperparameters
|
254 |
+
|
255 |
+
- `eval_strategy`: epoch
|
256 |
+
- `per_device_train_batch_size`: 128
|
257 |
+
- `per_device_eval_batch_size`: 64
|
258 |
+
- `num_train_epochs`: 2
|
259 |
+
- `warmup_ratio`: 0.1
|
260 |
+
|
261 |
+
#### All Hyperparameters
|
262 |
+
<details><summary>Click to expand</summary>
|
263 |
+
|
264 |
+
- `overwrite_output_dir`: False
|
265 |
+
- `do_predict`: False
|
266 |
+
- `eval_strategy`: epoch
|
267 |
+
- `prediction_loss_only`: True
|
268 |
+
- `per_device_train_batch_size`: 128
|
269 |
+
- `per_device_eval_batch_size`: 64
|
270 |
+
- `per_gpu_train_batch_size`: None
|
271 |
+
- `per_gpu_eval_batch_size`: None
|
272 |
+
- `gradient_accumulation_steps`: 1
|
273 |
+
- `eval_accumulation_steps`: None
|
274 |
+
- `learning_rate`: 5e-05
|
275 |
+
- `weight_decay`: 0.0
|
276 |
+
- `adam_beta1`: 0.9
|
277 |
+
- `adam_beta2`: 0.999
|
278 |
+
- `adam_epsilon`: 1e-08
|
279 |
+
- `max_grad_norm`: 1.0
|
280 |
+
- `num_train_epochs`: 2
|
281 |
+
- `max_steps`: -1
|
282 |
+
- `lr_scheduler_type`: linear
|
283 |
+
- `lr_scheduler_kwargs`: {}
|
284 |
+
- `warmup_ratio`: 0.1
|
285 |
+
- `warmup_steps`: 0
|
286 |
+
- `log_level`: passive
|
287 |
+
- `log_level_replica`: warning
|
288 |
+
- `log_on_each_node`: True
|
289 |
+
- `logging_nan_inf_filter`: True
|
290 |
+
- `save_safetensors`: True
|
291 |
+
- `save_on_each_node`: False
|
292 |
+
- `save_only_model`: False
|
293 |
+
- `restore_callback_states_from_checkpoint`: False
|
294 |
+
- `no_cuda`: False
|
295 |
+
- `use_cpu`: False
|
296 |
+
- `use_mps_device`: False
|
297 |
+
- `seed`: 42
|
298 |
+
- `data_seed`: None
|
299 |
+
- `jit_mode_eval`: False
|
300 |
+
- `use_ipex`: False
|
301 |
+
- `bf16`: False
|
302 |
+
- `fp16`: False
|
303 |
+
- `fp16_opt_level`: O1
|
304 |
+
- `half_precision_backend`: auto
|
305 |
+
- `bf16_full_eval`: False
|
306 |
+
- `fp16_full_eval`: False
|
307 |
+
- `tf32`: None
|
308 |
+
- `local_rank`: 0
|
309 |
+
- `ddp_backend`: None
|
310 |
+
- `tpu_num_cores`: None
|
311 |
+
- `tpu_metrics_debug`: False
|
312 |
+
- `debug`: []
|
313 |
+
- `dataloader_drop_last`: False
|
314 |
+
- `dataloader_num_workers`: 0
|
315 |
+
- `dataloader_prefetch_factor`: None
|
316 |
+
- `past_index`: -1
|
317 |
+
- `disable_tqdm`: False
|
318 |
+
- `remove_unused_columns`: True
|
319 |
+
- `label_names`: None
|
320 |
+
- `load_best_model_at_end`: False
|
321 |
+
- `ignore_data_skip`: False
|
322 |
+
- `fsdp`: []
|
323 |
+
- `fsdp_min_num_params`: 0
|
324 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
325 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
326 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
327 |
+
- `deepspeed`: None
|
328 |
+
- `label_smoothing_factor`: 0.0
|
329 |
+
- `optim`: adamw_torch
|
330 |
+
- `optim_args`: None
|
331 |
+
- `adafactor`: False
|
332 |
+
- `group_by_length`: False
|
333 |
+
- `length_column_name`: length
|
334 |
+
- `ddp_find_unused_parameters`: None
|
335 |
+
- `ddp_bucket_cap_mb`: None
|
336 |
+
- `ddp_broadcast_buffers`: False
|
337 |
+
- `dataloader_pin_memory`: True
|
338 |
+
- `dataloader_persistent_workers`: False
|
339 |
+
- `skip_memory_metrics`: True
|
340 |
+
- `use_legacy_prediction_loop`: False
|
341 |
+
- `push_to_hub`: False
|
342 |
+
- `resume_from_checkpoint`: None
|
343 |
+
- `hub_model_id`: None
|
344 |
+
- `hub_strategy`: every_save
|
345 |
+
- `hub_private_repo`: False
|
346 |
+
- `hub_always_push`: False
|
347 |
+
- `gradient_checkpointing`: False
|
348 |
+
- `gradient_checkpointing_kwargs`: None
|
349 |
+
- `include_inputs_for_metrics`: False
|
350 |
+
- `eval_do_concat_batches`: True
|
351 |
+
- `fp16_backend`: auto
|
352 |
+
- `push_to_hub_model_id`: None
|
353 |
+
- `push_to_hub_organization`: None
|
354 |
+
- `mp_parameters`:
|
355 |
+
- `auto_find_batch_size`: False
|
356 |
+
- `full_determinism`: False
|
357 |
+
- `torchdynamo`: None
|
358 |
+
- `ray_scope`: last
|
359 |
+
- `ddp_timeout`: 1800
|
360 |
+
- `torch_compile`: False
|
361 |
+
- `torch_compile_backend`: None
|
362 |
+
- `torch_compile_mode`: None
|
363 |
+
- `dispatch_batches`: None
|
364 |
+
- `split_batches`: None
|
365 |
+
- `include_tokens_per_second`: False
|
366 |
+
- `include_num_input_tokens_seen`: False
|
367 |
+
- `neftune_noise_alpha`: None
|
368 |
+
- `optim_target_modules`: None
|
369 |
+
- `batch_eval_metrics`: False
|
370 |
+
- `batch_sampler`: batch_sampler
|
371 |
+
- `multi_dataset_batch_sampler`: proportional
|
372 |
+
|
373 |
+
</details>
|
374 |
+
|
375 |
+
### Training Logs
|
376 |
+
| Epoch | Step | Training Loss | loss | FT-triple_max_accuracy |
|
377 |
+
|:------:|:----:|:-------------:|:------:|:----------------------:|
|
378 |
+
| 0.2015 | 82 | 4.5671 | - | - |
|
379 |
+
| 0.4029 | 164 | 4.0669 | - | - |
|
380 |
+
| 0.6044 | 246 | 3.9861 | - | - |
|
381 |
+
| 0.8059 | 328 | 3.9519 | - | - |
|
382 |
+
| 1.0 | 407 | - | 4.0778 | 0.8244 |
|
383 |
+
| 1.0074 | 410 | 3.9194 | - | - |
|
384 |
+
| 1.2088 | 492 | 3.8925 | - | - |
|
385 |
+
| 1.4103 | 574 | 3.8823 | - | - |
|
386 |
+
| 1.6118 | 656 | 3.8871 | - | - |
|
387 |
+
| 1.8133 | 738 | 3.8603 | - | - |
|
388 |
+
| 2.0 | 814 | - | 4.0806 | 0.8104 |
|
389 |
+
|
390 |
+
|
391 |
+
### Framework Versions
|
392 |
+
- Python: 3.10.12
|
393 |
+
- Sentence Transformers: 3.0.0
|
394 |
+
- Transformers: 4.41.1
|
395 |
+
- PyTorch: 2.3.0+cu121
|
396 |
+
- Accelerate: 0.30.1
|
397 |
+
- Datasets: 2.19.1
|
398 |
+
- Tokenizers: 0.19.1
|
399 |
+
|
400 |
+
## Citation
|
401 |
+
|
402 |
+
### BibTeX
|
403 |
+
|
404 |
+
#### Sentence Transformers
|
405 |
+
```bibtex
|
406 |
+
@inproceedings{reimers-2019-sentence-bert,
|
407 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
408 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
409 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
410 |
+
month = "11",
|
411 |
+
year = "2019",
|
412 |
+
publisher = "Association for Computational Linguistics",
|
413 |
+
url = "https://arxiv.org/abs/1908.10084",
|
414 |
+
}
|
415 |
+
```
|
416 |
+
|
417 |
+
#### TripletLoss
|
418 |
+
```bibtex
|
419 |
+
@misc{hermans2017defense,
|
420 |
+
title={In Defense of the Triplet Loss for Person Re-Identification},
|
421 |
+
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
|
422 |
+
year={2017},
|
423 |
+
eprint={1703.07737},
|
424 |
+
archivePrefix={arXiv},
|
425 |
+
primaryClass={cs.CV}
|
426 |
+
}
|
427 |
+
```
|
428 |
+
|
429 |
+
<!--
|
430 |
+
## Glossary
|
431 |
+
|
432 |
+
*Clearly define terms in order to be accessible across audiences.*
|
433 |
+
-->
|
434 |
+
|
435 |
+
<!--
|
436 |
+
## Model Card Authors
|
437 |
+
|
438 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
439 |
+
-->
|
440 |
+
|
441 |
+
<!--
|
442 |
+
## Model Card Contact
|
443 |
+
|
444 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
445 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 6,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.1",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 30522
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.6.1",
|
5 |
+
"pytorch": "1.8.1"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:22f71475374fecd1c092882bfd525889083353d58ee8f908ea0a8e969e079844
|
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,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 128,
|
50 |
+
"model_max_length": 256,
|
51 |
+
"never_split": null,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "[SEP]",
|
57 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "[UNK]"
|
64 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|