Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +510 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
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,510 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: sentence-transformers
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- sentence-similarity
|
8 |
+
- feature-extraction
|
9 |
+
- loss:CosineSimilarityLoss
|
10 |
+
base_model: google-bert/bert-base-uncased
|
11 |
+
metrics:
|
12 |
+
- pearson_cosine
|
13 |
+
- spearman_cosine
|
14 |
+
- pearson_manhattan
|
15 |
+
- spearman_manhattan
|
16 |
+
- pearson_euclidean
|
17 |
+
- spearman_euclidean
|
18 |
+
- pearson_dot
|
19 |
+
- spearman_dot
|
20 |
+
- pearson_max
|
21 |
+
- spearman_max
|
22 |
+
widget:
|
23 |
+
- source_sentence: A woman is dancing.
|
24 |
+
sentences:
|
25 |
+
- An audience watches a girl dance.
|
26 |
+
- A man is outside on a July day.
|
27 |
+
- A man is cutting up carrots.
|
28 |
+
- source_sentence: A man shoots a man.
|
29 |
+
sentences:
|
30 |
+
- The man is aiming a gun.
|
31 |
+
- A helicopter flies over water.
|
32 |
+
- a dog trots through the grass.
|
33 |
+
- source_sentence: A man is spitting.
|
34 |
+
sentences:
|
35 |
+
- A man is crying.
|
36 |
+
- A helicopter flies over water.
|
37 |
+
- A slow loris hanging on a cord.
|
38 |
+
- source_sentence: A boy is vacuuming.
|
39 |
+
sentences:
|
40 |
+
- A little boy is vacuuming the floor.
|
41 |
+
- A guy is playing an instrument.
|
42 |
+
- A woman equestrian riding a horse.
|
43 |
+
- source_sentence: A woman is reading.
|
44 |
+
sentences:
|
45 |
+
- A woman is writing something.
|
46 |
+
- A man is standing in the rain.
|
47 |
+
- A man slices an onion.
|
48 |
+
pipeline_tag: sentence-similarity
|
49 |
+
co2_eq_emissions:
|
50 |
+
emissions: 4.738044659547021
|
51 |
+
energy_consumed: 0.012189401288254294
|
52 |
+
source: codecarbon
|
53 |
+
training_type: fine-tuning
|
54 |
+
on_cloud: false
|
55 |
+
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
|
56 |
+
ram_total_size: 31.777088165283203
|
57 |
+
hours_used: 0.058
|
58 |
+
hardware_used: 1 x NVIDIA GeForce RTX 3090
|
59 |
+
model-index:
|
60 |
+
- name: SentenceTransformer based on google-bert/bert-base-uncased
|
61 |
+
results:
|
62 |
+
- task:
|
63 |
+
type: semantic-similarity
|
64 |
+
name: Semantic Similarity
|
65 |
+
dataset:
|
66 |
+
name: sts test
|
67 |
+
type: sts-test
|
68 |
+
metrics:
|
69 |
+
- type: pearson_cosine
|
70 |
+
value: 0.8682431647858876
|
71 |
+
name: Pearson Cosine
|
72 |
+
- type: spearman_cosine
|
73 |
+
value: 0.8703313606188837
|
74 |
+
name: Spearman Cosine
|
75 |
+
- type: pearson_manhattan
|
76 |
+
value: 0.8385159885167599
|
77 |
+
name: Pearson Manhattan
|
78 |
+
- type: spearman_manhattan
|
79 |
+
value: 0.8435007318066774
|
80 |
+
name: Spearman Manhattan
|
81 |
+
- type: pearson_euclidean
|
82 |
+
value: 0.8391102057706885
|
83 |
+
name: Pearson Euclidean
|
84 |
+
- type: spearman_euclidean
|
85 |
+
value: 0.8441165556372876
|
86 |
+
name: Spearman Euclidean
|
87 |
+
- type: pearson_dot
|
88 |
+
value: 0.8140605796498762
|
89 |
+
name: Pearson Dot
|
90 |
+
- type: spearman_dot
|
91 |
+
value: 0.8174591525223206
|
92 |
+
name: Spearman Dot
|
93 |
+
- type: pearson_max
|
94 |
+
value: 0.8682431647858876
|
95 |
+
name: Pearson Max
|
96 |
+
- type: spearman_max
|
97 |
+
value: 0.8703313606188837
|
98 |
+
name: Spearman Max
|
99 |
+
- type: pearson_cosine
|
100 |
+
value: 0.8418519780467144
|
101 |
+
name: Pearson Cosine
|
102 |
+
- type: spearman_cosine
|
103 |
+
value: 0.8363102079867478
|
104 |
+
name: Spearman Cosine
|
105 |
+
- type: pearson_manhattan
|
106 |
+
value: 0.8282641539296681
|
107 |
+
name: Pearson Manhattan
|
108 |
+
- type: spearman_manhattan
|
109 |
+
value: 0.8261442750405601
|
110 |
+
name: Spearman Manhattan
|
111 |
+
- type: pearson_euclidean
|
112 |
+
value: 0.8279900369159026
|
113 |
+
name: Pearson Euclidean
|
114 |
+
- type: spearman_euclidean
|
115 |
+
value: 0.8258841934048688
|
116 |
+
name: Spearman Euclidean
|
117 |
+
- type: pearson_dot
|
118 |
+
value: 0.7681509901549408
|
119 |
+
name: Pearson Dot
|
120 |
+
- type: spearman_dot
|
121 |
+
value: 0.757455580460212
|
122 |
+
name: Spearman Dot
|
123 |
+
- type: pearson_max
|
124 |
+
value: 0.8418519780467144
|
125 |
+
name: Pearson Max
|
126 |
+
- type: spearman_max
|
127 |
+
value: 0.8363102079867478
|
128 |
+
name: Spearman Max
|
129 |
+
---
|
130 |
+
|
131 |
+
# SentenceTransformer based on google-bert/bert-base-uncased
|
132 |
+
|
133 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) on the [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) dataset. 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.
|
134 |
+
|
135 |
+
## Model Details
|
136 |
+
|
137 |
+
### Model Description
|
138 |
+
- **Model Type:** Sentence Transformer
|
139 |
+
- **Base model:** [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) <!-- at revision 86b5e0934494bd15c9632b12f734a8a67f723594 -->
|
140 |
+
- **Maximum Sequence Length:** 512 tokens
|
141 |
+
- **Output Dimensionality:** 768 tokens
|
142 |
+
- **Similarity Function:** Cosine Similarity
|
143 |
+
- **Training Dataset:**
|
144 |
+
- [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb)
|
145 |
+
- **Language:** en
|
146 |
+
<!-- - **License:** Unknown -->
|
147 |
+
|
148 |
+
### Model Sources
|
149 |
+
|
150 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
151 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
152 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
153 |
+
|
154 |
+
### Full Model Architecture
|
155 |
+
|
156 |
+
```
|
157 |
+
SentenceTransformer(
|
158 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
159 |
+
(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})
|
160 |
+
)
|
161 |
+
```
|
162 |
+
|
163 |
+
## Usage
|
164 |
+
|
165 |
+
### Direct Usage (Sentence Transformers)
|
166 |
+
|
167 |
+
First install the Sentence Transformers library:
|
168 |
+
|
169 |
+
```bash
|
170 |
+
pip install -U sentence-transformers
|
171 |
+
```
|
172 |
+
|
173 |
+
Then you can load this model and run inference.
|
174 |
+
```python
|
175 |
+
from sentence_transformers import SentenceTransformer
|
176 |
+
|
177 |
+
# Download from the 🤗 Hub
|
178 |
+
model = SentenceTransformer("tomaarsen/bert-base-uncased-augmentation-indomain-nlpaug-sts")
|
179 |
+
# Run inference
|
180 |
+
sentences = [
|
181 |
+
'A woman is reading.',
|
182 |
+
'A woman is writing something.',
|
183 |
+
'A man is standing in the rain.',
|
184 |
+
]
|
185 |
+
embeddings = model.encode(sentences)
|
186 |
+
print(embeddings.shape)
|
187 |
+
# [3, 768]
|
188 |
+
|
189 |
+
# Get the similarity scores for the embeddings
|
190 |
+
similarities = model.similarity(embeddings)
|
191 |
+
print(similarities.shape)
|
192 |
+
# [3, 3]
|
193 |
+
```
|
194 |
+
|
195 |
+
<!--
|
196 |
+
### Direct Usage (Transformers)
|
197 |
+
|
198 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
199 |
+
|
200 |
+
</details>
|
201 |
+
-->
|
202 |
+
|
203 |
+
<!--
|
204 |
+
### Downstream Usage (Sentence Transformers)
|
205 |
+
|
206 |
+
You can finetune this model on your own dataset.
|
207 |
+
|
208 |
+
<details><summary>Click to expand</summary>
|
209 |
+
|
210 |
+
</details>
|
211 |
+
-->
|
212 |
+
|
213 |
+
<!--
|
214 |
+
### Out-of-Scope Use
|
215 |
+
|
216 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
217 |
+
-->
|
218 |
+
|
219 |
+
## Evaluation
|
220 |
+
|
221 |
+
### Metrics
|
222 |
+
|
223 |
+
#### Semantic Similarity
|
224 |
+
* Dataset: `sts-test`
|
225 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
226 |
+
|
227 |
+
| Metric | Value |
|
228 |
+
|:--------------------|:-----------|
|
229 |
+
| pearson_cosine | 0.8682 |
|
230 |
+
| **spearman_cosine** | **0.8703** |
|
231 |
+
| pearson_manhattan | 0.8385 |
|
232 |
+
| spearman_manhattan | 0.8435 |
|
233 |
+
| pearson_euclidean | 0.8391 |
|
234 |
+
| spearman_euclidean | 0.8441 |
|
235 |
+
| pearson_dot | 0.8141 |
|
236 |
+
| spearman_dot | 0.8175 |
|
237 |
+
| pearson_max | 0.8682 |
|
238 |
+
| spearman_max | 0.8703 |
|
239 |
+
|
240 |
+
#### Semantic Similarity
|
241 |
+
* Dataset: `sts-test`
|
242 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
243 |
+
|
244 |
+
| Metric | Value |
|
245 |
+
|:--------------------|:-----------|
|
246 |
+
| pearson_cosine | 0.8419 |
|
247 |
+
| **spearman_cosine** | **0.8363** |
|
248 |
+
| pearson_manhattan | 0.8283 |
|
249 |
+
| spearman_manhattan | 0.8261 |
|
250 |
+
| pearson_euclidean | 0.828 |
|
251 |
+
| spearman_euclidean | 0.8259 |
|
252 |
+
| pearson_dot | 0.7682 |
|
253 |
+
| spearman_dot | 0.7575 |
|
254 |
+
| pearson_max | 0.8419 |
|
255 |
+
| spearman_max | 0.8363 |
|
256 |
+
|
257 |
+
<!--
|
258 |
+
## Bias, Risks and Limitations
|
259 |
+
|
260 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
261 |
+
-->
|
262 |
+
|
263 |
+
<!--
|
264 |
+
### Recommendations
|
265 |
+
|
266 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
267 |
+
-->
|
268 |
+
|
269 |
+
## Training Details
|
270 |
+
|
271 |
+
### Training Dataset
|
272 |
+
|
273 |
+
#### sentence-transformers/stsb
|
274 |
+
|
275 |
+
* Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [d999f12](https://huggingface.co/datasets/sentence-transformers/stsb/tree/d999f12281623b0925506817d9bd85e88289218a)
|
276 |
+
* Size: 11,498 training samples
|
277 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
278 |
+
* Approximate statistics based on the first 1000 samples:
|
279 |
+
| | sentence1 | sentence2 | score |
|
280 |
+
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
281 |
+
| type | string | string | float |
|
282 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 10.0 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 9.95 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
283 |
+
* Samples:
|
284 |
+
| sentence1 | sentence2 | score |
|
285 |
+
|:-----------------------------------------------------------|:----------------------------------------------------------------------|:------------------|
|
286 |
+
| <code>A plane is taking off.</code> | <code>An air plane is taking off.</code> | <code>1.0</code> |
|
287 |
+
| <code>A man is playing a large flute.</code> | <code>A man is playing a flute.</code> | <code>0.76</code> |
|
288 |
+
| <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> |
|
289 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/losses.html#cosinesimilarityloss) with these parameters:
|
290 |
+
```json
|
291 |
+
{
|
292 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
293 |
+
}
|
294 |
+
```
|
295 |
+
|
296 |
+
### Evaluation Dataset
|
297 |
+
|
298 |
+
#### sentence-transformers/stsb
|
299 |
+
|
300 |
+
* Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [d999f12](https://huggingface.co/datasets/sentence-transformers/stsb/tree/d999f12281623b0925506817d9bd85e88289218a)
|
301 |
+
* Size: 1,500 evaluation samples
|
302 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
303 |
+
* Approximate statistics based on the first 1000 samples:
|
304 |
+
| | sentence1 | sentence2 | score |
|
305 |
+
|:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
306 |
+
| type | string | string | float |
|
307 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 15.1 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.11 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
|
308 |
+
* Samples:
|
309 |
+
| sentence1 | sentence2 | score |
|
310 |
+
|:--------------------------------------------------|:------------------------------------------------------|:------------------|
|
311 |
+
| <code>A man with a hard hat is dancing.</code> | <code>A man wearing a hard hat is dancing.</code> | <code>1.0</code> |
|
312 |
+
| <code>A young child is riding a horse.</code> | <code>A child is riding a horse.</code> | <code>0.95</code> |
|
313 |
+
| <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> |
|
314 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/losses.html#cosinesimilarityloss) with these parameters:
|
315 |
+
```json
|
316 |
+
{
|
317 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
318 |
+
}
|
319 |
+
```
|
320 |
+
|
321 |
+
### Training Hyperparameters
|
322 |
+
#### Non-Default Hyperparameters
|
323 |
+
|
324 |
+
- `eval_strategy`: steps
|
325 |
+
- `per_device_train_batch_size`: 16
|
326 |
+
- `per_device_eval_batch_size`: 16
|
327 |
+
- `num_train_epochs`: 1
|
328 |
+
- `warmup_ratio`: 0.1
|
329 |
+
- `fp16`: True
|
330 |
+
|
331 |
+
#### All Hyperparameters
|
332 |
+
<details><summary>Click to expand</summary>
|
333 |
+
|
334 |
+
- `overwrite_output_dir`: False
|
335 |
+
- `do_predict`: False
|
336 |
+
- `eval_strategy`: steps
|
337 |
+
- `prediction_loss_only`: False
|
338 |
+
- `per_device_train_batch_size`: 16
|
339 |
+
- `per_device_eval_batch_size`: 16
|
340 |
+
- `per_gpu_train_batch_size`: None
|
341 |
+
- `per_gpu_eval_batch_size`: None
|
342 |
+
- `gradient_accumulation_steps`: 1
|
343 |
+
- `eval_accumulation_steps`: None
|
344 |
+
- `learning_rate`: 5e-05
|
345 |
+
- `weight_decay`: 0.0
|
346 |
+
- `adam_beta1`: 0.9
|
347 |
+
- `adam_beta2`: 0.999
|
348 |
+
- `adam_epsilon`: 1e-08
|
349 |
+
- `max_grad_norm`: 1.0
|
350 |
+
- `num_train_epochs`: 1
|
351 |
+
- `max_steps`: -1
|
352 |
+
- `lr_scheduler_type`: linear
|
353 |
+
- `lr_scheduler_kwargs`: {}
|
354 |
+
- `warmup_ratio`: 0.1
|
355 |
+
- `warmup_steps`: 0
|
356 |
+
- `log_level`: passive
|
357 |
+
- `log_level_replica`: warning
|
358 |
+
- `log_on_each_node`: True
|
359 |
+
- `logging_nan_inf_filter`: True
|
360 |
+
- `save_safetensors`: True
|
361 |
+
- `save_on_each_node`: False
|
362 |
+
- `save_only_model`: False
|
363 |
+
- `no_cuda`: False
|
364 |
+
- `use_cpu`: False
|
365 |
+
- `use_mps_device`: False
|
366 |
+
- `seed`: 42
|
367 |
+
- `data_seed`: None
|
368 |
+
- `jit_mode_eval`: False
|
369 |
+
- `use_ipex`: False
|
370 |
+
- `bf16`: False
|
371 |
+
- `fp16`: True
|
372 |
+
- `fp16_opt_level`: O1
|
373 |
+
- `half_precision_backend`: auto
|
374 |
+
- `bf16_full_eval`: False
|
375 |
+
- `fp16_full_eval`: False
|
376 |
+
- `tf32`: None
|
377 |
+
- `local_rank`: 0
|
378 |
+
- `ddp_backend`: None
|
379 |
+
- `tpu_num_cores`: None
|
380 |
+
- `tpu_metrics_debug`: False
|
381 |
+
- `debug`: []
|
382 |
+
- `dataloader_drop_last`: False
|
383 |
+
- `dataloader_num_workers`: 0
|
384 |
+
- `dataloader_prefetch_factor`: None
|
385 |
+
- `past_index`: -1
|
386 |
+
- `disable_tqdm`: False
|
387 |
+
- `remove_unused_columns`: True
|
388 |
+
- `label_names`: None
|
389 |
+
- `load_best_model_at_end`: False
|
390 |
+
- `ignore_data_skip`: False
|
391 |
+
- `fsdp`: []
|
392 |
+
- `fsdp_min_num_params`: 0
|
393 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
394 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
395 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
396 |
+
- `deepspeed`: None
|
397 |
+
- `label_smoothing_factor`: 0.0
|
398 |
+
- `optim`: adamw_torch
|
399 |
+
- `optim_args`: None
|
400 |
+
- `adafactor`: False
|
401 |
+
- `group_by_length`: False
|
402 |
+
- `length_column_name`: length
|
403 |
+
- `ddp_find_unused_parameters`: None
|
404 |
+
- `ddp_bucket_cap_mb`: None
|
405 |
+
- `ddp_broadcast_buffers`: None
|
406 |
+
- `dataloader_pin_memory`: True
|
407 |
+
- `dataloader_persistent_workers`: False
|
408 |
+
- `skip_memory_metrics`: True
|
409 |
+
- `use_legacy_prediction_loop`: False
|
410 |
+
- `push_to_hub`: False
|
411 |
+
- `resume_from_checkpoint`: None
|
412 |
+
- `hub_model_id`: None
|
413 |
+
- `hub_strategy`: every_save
|
414 |
+
- `hub_private_repo`: False
|
415 |
+
- `hub_always_push`: False
|
416 |
+
- `gradient_checkpointing`: False
|
417 |
+
- `gradient_checkpointing_kwargs`: None
|
418 |
+
- `include_inputs_for_metrics`: False
|
419 |
+
- `eval_do_concat_batches`: True
|
420 |
+
- `fp16_backend`: auto
|
421 |
+
- `push_to_hub_model_id`: None
|
422 |
+
- `push_to_hub_organization`: None
|
423 |
+
- `mp_parameters`:
|
424 |
+
- `auto_find_batch_size`: False
|
425 |
+
- `full_determinism`: False
|
426 |
+
- `torchdynamo`: None
|
427 |
+
- `ray_scope`: last
|
428 |
+
- `ddp_timeout`: 1800
|
429 |
+
- `torch_compile`: False
|
430 |
+
- `torch_compile_backend`: None
|
431 |
+
- `torch_compile_mode`: None
|
432 |
+
- `dispatch_batches`: None
|
433 |
+
- `split_batches`: None
|
434 |
+
- `include_tokens_per_second`: False
|
435 |
+
- `include_num_input_tokens_seen`: False
|
436 |
+
- `neftune_noise_alpha`: None
|
437 |
+
- `optim_target_modules`: None
|
438 |
+
- `batch_sampler`: batch_sampler
|
439 |
+
- `multi_dataset_batch_sampler`: proportional
|
440 |
+
|
441 |
+
</details>
|
442 |
+
|
443 |
+
### Training Logs
|
444 |
+
| Epoch | Step | Training Loss | loss | sts-test_spearman_cosine |
|
445 |
+
|:------:|:----:|:-------------:|:------:|:------------------------:|
|
446 |
+
| 0.1391 | 100 | 0.0572 | 0.0427 | 0.8222 |
|
447 |
+
| 0.2782 | 200 | 0.0316 | 0.0342 | 0.8450 |
|
448 |
+
| 0.4172 | 300 | 0.0276 | 0.0324 | 0.8621 |
|
449 |
+
| 0.5563 | 400 | 0.0246 | 0.0300 | 0.8661 |
|
450 |
+
| 0.6954 | 500 | 0.0206 | 0.0288 | 0.8650 |
|
451 |
+
| 0.8345 | 600 | 0.0186 | 0.0301 | 0.8696 |
|
452 |
+
| 0.9736 | 700 | 0.0185 | 0.0286 | 0.8703 |
|
453 |
+
| 1.0 | 719 | - | - | 0.8363 |
|
454 |
+
|
455 |
+
|
456 |
+
### Environmental Impact
|
457 |
+
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
458 |
+
- **Energy Consumed**: 0.012 kWh
|
459 |
+
- **Carbon Emitted**: 0.005 kg of CO2
|
460 |
+
- **Hours Used**: 0.058 hours
|
461 |
+
|
462 |
+
### Training Hardware
|
463 |
+
- **On Cloud**: No
|
464 |
+
- **GPU Model**: 1 x NVIDIA GeForce RTX 3090
|
465 |
+
- **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
|
466 |
+
- **RAM Size**: 31.78 GB
|
467 |
+
|
468 |
+
### Framework Versions
|
469 |
+
- Python: 3.11.6
|
470 |
+
- Sentence Transformers: 3.0.0.dev0
|
471 |
+
- Transformers: 4.41.0.dev0
|
472 |
+
- PyTorch: 2.3.0+cu121
|
473 |
+
- Accelerate: 0.26.1
|
474 |
+
- Datasets: 2.18.0
|
475 |
+
- Tokenizers: 0.19.1
|
476 |
+
|
477 |
+
## Citation
|
478 |
+
|
479 |
+
### BibTeX
|
480 |
+
|
481 |
+
#### Sentence Transformers
|
482 |
+
```bibtex
|
483 |
+
@inproceedings{reimers-2019-sentence-bert,
|
484 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
485 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
486 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
487 |
+
month = "11",
|
488 |
+
year = "2019",
|
489 |
+
publisher = "Association for Computational Linguistics",
|
490 |
+
url = "https://arxiv.org/abs/1908.10084",
|
491 |
+
}
|
492 |
+
```
|
493 |
+
|
494 |
+
<!--
|
495 |
+
## Glossary
|
496 |
+
|
497 |
+
*Clearly define terms in order to be accessible across audiences.*
|
498 |
+
-->
|
499 |
+
|
500 |
+
<!--
|
501 |
+
## Model Card Authors
|
502 |
+
|
503 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
504 |
+
-->
|
505 |
+
|
506 |
+
<!--
|
507 |
+
## Model Card Contact
|
508 |
+
|
509 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
510 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "bert-base-uncased",
|
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": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.0.dev0",
|
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": "3.0.0.dev0",
|
4 |
+
"transformers": "4.41.0.dev0",
|
5 |
+
"pytorch": "2.3.0+cu121"
|
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:d908ab1874e2824ea4024b9e8f1fb0622a1f5304869a9e44e4039b09c90ff27b
|
3 |
+
size 437951328
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "BertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|