Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +728 -0
- config.json +27 -0
- config_sentence_transformers.json +10 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +64 -0
- vocab.json +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,728 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: sentence-transformers
|
5 |
+
tags:
|
6 |
+
- sentence-transformers
|
7 |
+
- sentence-similarity
|
8 |
+
- feature-extraction
|
9 |
+
- dataset_size:100K<n<1M
|
10 |
+
- loss:MatryoshkaLoss
|
11 |
+
- loss:MultipleNegativesRankingLoss
|
12 |
+
base_model: distilbert/distilroberta-base
|
13 |
+
metrics:
|
14 |
+
- pearson_cosine
|
15 |
+
- spearman_cosine
|
16 |
+
- pearson_manhattan
|
17 |
+
- spearman_manhattan
|
18 |
+
- pearson_euclidean
|
19 |
+
- spearman_euclidean
|
20 |
+
- pearson_dot
|
21 |
+
- spearman_dot
|
22 |
+
- pearson_max
|
23 |
+
- spearman_max
|
24 |
+
widget:
|
25 |
+
- source_sentence: He shrugged.
|
26 |
+
sentences:
|
27 |
+
- Then he shrugged.
|
28 |
+
- Two people are dancing.
|
29 |
+
- The people are Indian.
|
30 |
+
- source_sentence: a young girl
|
31 |
+
sentences:
|
32 |
+
- A girl is playing.
|
33 |
+
- A dog playing outside.
|
34 |
+
- The men are moving.
|
35 |
+
- source_sentence: girl sleeps
|
36 |
+
sentences:
|
37 |
+
- A little girl is sleep.
|
38 |
+
- Two women are walking.
|
39 |
+
- three men are pictured
|
40 |
+
- source_sentence: He walked.
|
41 |
+
sentences:
|
42 |
+
- A man is moving around.
|
43 |
+
- A young man is running.
|
44 |
+
- What idiots girls are!
|
45 |
+
- source_sentence: '''Go now.'''
|
46 |
+
sentences:
|
47 |
+
- Now go.
|
48 |
+
- The door did not budge.
|
49 |
+
- I never knew the man.
|
50 |
+
pipeline_tag: sentence-similarity
|
51 |
+
model-index:
|
52 |
+
- name: SentenceTransformer based on distilbert/distilroberta-base
|
53 |
+
results:
|
54 |
+
- task:
|
55 |
+
type: semantic-similarity
|
56 |
+
name: Semantic Similarity
|
57 |
+
dataset:
|
58 |
+
name: sts dev 768
|
59 |
+
type: sts-dev-768
|
60 |
+
metrics:
|
61 |
+
- type: pearson_cosine
|
62 |
+
value: 0.8418367310465795
|
63 |
+
name: Pearson Cosine
|
64 |
+
- type: spearman_cosine
|
65 |
+
value: 0.8485984004433933
|
66 |
+
name: Spearman Cosine
|
67 |
+
- type: pearson_manhattan
|
68 |
+
value: 0.8356556933767024
|
69 |
+
name: Pearson Manhattan
|
70 |
+
- type: spearman_manhattan
|
71 |
+
value: 0.8341402433895243
|
72 |
+
name: Spearman Manhattan
|
73 |
+
- type: pearson_euclidean
|
74 |
+
value: 0.8378021883964464
|
75 |
+
name: Pearson Euclidean
|
76 |
+
- type: spearman_euclidean
|
77 |
+
value: 0.8364904078404392
|
78 |
+
name: Spearman Euclidean
|
79 |
+
- type: pearson_dot
|
80 |
+
value: 0.7476524989991268
|
81 |
+
name: Pearson Dot
|
82 |
+
- type: spearman_dot
|
83 |
+
value: 0.744450587024694
|
84 |
+
name: Spearman Dot
|
85 |
+
- type: pearson_max
|
86 |
+
value: 0.8418367310465795
|
87 |
+
name: Pearson Max
|
88 |
+
- type: spearman_max
|
89 |
+
value: 0.8485984004433933
|
90 |
+
name: Spearman Max
|
91 |
+
- task:
|
92 |
+
type: semantic-similarity
|
93 |
+
name: Semantic Similarity
|
94 |
+
dataset:
|
95 |
+
name: sts dev 512
|
96 |
+
type: sts-dev-512
|
97 |
+
metrics:
|
98 |
+
- type: pearson_cosine
|
99 |
+
value: 0.8416891989714739
|
100 |
+
name: Pearson Cosine
|
101 |
+
- type: spearman_cosine
|
102 |
+
value: 0.8490082509626217
|
103 |
+
name: Spearman Cosine
|
104 |
+
- type: pearson_manhattan
|
105 |
+
value: 0.8348187780435371
|
106 |
+
name: Pearson Manhattan
|
107 |
+
- type: spearman_manhattan
|
108 |
+
value: 0.8332638443518806
|
109 |
+
name: Spearman Manhattan
|
110 |
+
- type: pearson_euclidean
|
111 |
+
value: 0.837008948364763
|
112 |
+
name: Pearson Euclidean
|
113 |
+
- type: spearman_euclidean
|
114 |
+
value: 0.8356608810942396
|
115 |
+
name: Spearman Euclidean
|
116 |
+
- type: pearson_dot
|
117 |
+
value: 0.7426437744526075
|
118 |
+
name: Pearson Dot
|
119 |
+
- type: spearman_dot
|
120 |
+
value: 0.7393063147821313
|
121 |
+
name: Spearman Dot
|
122 |
+
- type: pearson_max
|
123 |
+
value: 0.8416891989714739
|
124 |
+
name: Pearson Max
|
125 |
+
- type: spearman_max
|
126 |
+
value: 0.8490082509626217
|
127 |
+
name: Spearman Max
|
128 |
+
- task:
|
129 |
+
type: semantic-similarity
|
130 |
+
name: Semantic Similarity
|
131 |
+
dataset:
|
132 |
+
name: sts dev 256
|
133 |
+
type: sts-dev-256
|
134 |
+
metrics:
|
135 |
+
- type: pearson_cosine
|
136 |
+
value: 0.8368212220308662
|
137 |
+
name: Pearson Cosine
|
138 |
+
- type: spearman_cosine
|
139 |
+
value: 0.8458532859579723
|
140 |
+
name: Spearman Cosine
|
141 |
+
- type: pearson_manhattan
|
142 |
+
value: 0.8282949195581827
|
143 |
+
name: Pearson Manhattan
|
144 |
+
- type: spearman_manhattan
|
145 |
+
value: 0.8279757292284411
|
146 |
+
name: Spearman Manhattan
|
147 |
+
- type: pearson_euclidean
|
148 |
+
value: 0.8304309516656533
|
149 |
+
name: Pearson Euclidean
|
150 |
+
- type: spearman_euclidean
|
151 |
+
value: 0.8301347336633305
|
152 |
+
name: Spearman Euclidean
|
153 |
+
- type: pearson_dot
|
154 |
+
value: 0.7158283880571648
|
155 |
+
name: Pearson Dot
|
156 |
+
- type: spearman_dot
|
157 |
+
value: 0.7114038350641958
|
158 |
+
name: Spearman Dot
|
159 |
+
- type: pearson_max
|
160 |
+
value: 0.8368212220308662
|
161 |
+
name: Pearson Max
|
162 |
+
- type: spearman_max
|
163 |
+
value: 0.8458532859579723
|
164 |
+
name: Spearman Max
|
165 |
+
- task:
|
166 |
+
type: semantic-similarity
|
167 |
+
name: Semantic Similarity
|
168 |
+
dataset:
|
169 |
+
name: sts dev 128
|
170 |
+
type: sts-dev-128
|
171 |
+
metrics:
|
172 |
+
- type: pearson_cosine
|
173 |
+
value: 0.8291552182220155
|
174 |
+
name: Pearson Cosine
|
175 |
+
- type: spearman_cosine
|
176 |
+
value: 0.8410315378567165
|
177 |
+
name: Spearman Cosine
|
178 |
+
- type: pearson_manhattan
|
179 |
+
value: 0.8205197124842151
|
180 |
+
name: Pearson Manhattan
|
181 |
+
- type: spearman_manhattan
|
182 |
+
value: 0.8211956528048456
|
183 |
+
name: Spearman Manhattan
|
184 |
+
- type: pearson_euclidean
|
185 |
+
value: 0.8218377581296912
|
186 |
+
name: Pearson Euclidean
|
187 |
+
- type: spearman_euclidean
|
188 |
+
value: 0.8223376697977559
|
189 |
+
name: Spearman Euclidean
|
190 |
+
- type: pearson_dot
|
191 |
+
value: 0.6736747525126793
|
192 |
+
name: Pearson Dot
|
193 |
+
- type: spearman_dot
|
194 |
+
value: 0.6704632728499174
|
195 |
+
name: Spearman Dot
|
196 |
+
- type: pearson_max
|
197 |
+
value: 0.8291552182220155
|
198 |
+
name: Pearson Max
|
199 |
+
- type: spearman_max
|
200 |
+
value: 0.8410315378567165
|
201 |
+
name: Spearman Max
|
202 |
+
- task:
|
203 |
+
type: semantic-similarity
|
204 |
+
name: Semantic Similarity
|
205 |
+
dataset:
|
206 |
+
name: sts dev 64
|
207 |
+
type: sts-dev-64
|
208 |
+
metrics:
|
209 |
+
- type: pearson_cosine
|
210 |
+
value: 0.8201110050860942
|
211 |
+
name: Pearson Cosine
|
212 |
+
- type: spearman_cosine
|
213 |
+
value: 0.835036509147006
|
214 |
+
name: Spearman Cosine
|
215 |
+
- type: pearson_manhattan
|
216 |
+
value: 0.8028297556674707
|
217 |
+
name: Pearson Manhattan
|
218 |
+
- type: spearman_manhattan
|
219 |
+
value: 0.8048509047037822
|
220 |
+
name: Spearman Manhattan
|
221 |
+
- type: pearson_euclidean
|
222 |
+
value: 0.8046682420071583
|
223 |
+
name: Pearson Euclidean
|
224 |
+
- type: spearman_euclidean
|
225 |
+
value: 0.8063788129340022
|
226 |
+
name: Spearman Euclidean
|
227 |
+
- type: pearson_dot
|
228 |
+
value: 0.6171580093307325
|
229 |
+
name: Pearson Dot
|
230 |
+
- type: spearman_dot
|
231 |
+
value: 0.6176751811391049
|
232 |
+
name: Spearman Dot
|
233 |
+
- type: pearson_max
|
234 |
+
value: 0.8201110050860942
|
235 |
+
name: Pearson Max
|
236 |
+
- type: spearman_max
|
237 |
+
value: 0.835036509147006
|
238 |
+
name: Spearman Max
|
239 |
+
---
|
240 |
+
|
241 |
+
# SentenceTransformer based on distilbert/distilroberta-base
|
242 |
+
|
243 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) on the [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) 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.
|
244 |
+
|
245 |
+
## Model Details
|
246 |
+
|
247 |
+
### Model Description
|
248 |
+
- **Model Type:** Sentence Transformer
|
249 |
+
- **Base model:** [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) <!-- at revision fb53ab8802853c8e4fbdbcd0529f21fc6f459b2b -->
|
250 |
+
- **Maximum Sequence Length:** 512 tokens
|
251 |
+
- **Output Dimensionality:** 768 tokens
|
252 |
+
- **Similarity Function:** Cosine Similarity
|
253 |
+
- **Training Dataset:**
|
254 |
+
- [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
|
255 |
+
- **Language:** en
|
256 |
+
<!-- - **License:** Unknown -->
|
257 |
+
|
258 |
+
### Model Sources
|
259 |
+
|
260 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
261 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
262 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
263 |
+
|
264 |
+
### Full Model Architecture
|
265 |
+
|
266 |
+
```
|
267 |
+
SentenceTransformer(
|
268 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: RobertaModel
|
269 |
+
(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})
|
270 |
+
)
|
271 |
+
```
|
272 |
+
|
273 |
+
## Usage
|
274 |
+
|
275 |
+
### Direct Usage (Sentence Transformers)
|
276 |
+
|
277 |
+
First install the Sentence Transformers library:
|
278 |
+
|
279 |
+
```bash
|
280 |
+
pip install -U sentence-transformers
|
281 |
+
```
|
282 |
+
|
283 |
+
Then you can load this model and run inference.
|
284 |
+
```python
|
285 |
+
from sentence_transformers import SentenceTransformer
|
286 |
+
|
287 |
+
# Download from the 🤗 Hub
|
288 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
289 |
+
# Run inference
|
290 |
+
sentences = [
|
291 |
+
"'Go now.'",
|
292 |
+
'Now go.',
|
293 |
+
'The door did not budge.',
|
294 |
+
]
|
295 |
+
embeddings = model.encode(sentences)
|
296 |
+
print(embeddings.shape)
|
297 |
+
# [3, 768]
|
298 |
+
|
299 |
+
# Get the similarity scores for the embeddings
|
300 |
+
similarities = model.similarity(embeddings, embeddings)
|
301 |
+
print(similarities.shape)
|
302 |
+
# [3, 3]
|
303 |
+
```
|
304 |
+
|
305 |
+
<!--
|
306 |
+
### Direct Usage (Transformers)
|
307 |
+
|
308 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
309 |
+
|
310 |
+
</details>
|
311 |
+
-->
|
312 |
+
|
313 |
+
<!--
|
314 |
+
### Downstream Usage (Sentence Transformers)
|
315 |
+
|
316 |
+
You can finetune this model on your own dataset.
|
317 |
+
|
318 |
+
<details><summary>Click to expand</summary>
|
319 |
+
|
320 |
+
</details>
|
321 |
+
-->
|
322 |
+
|
323 |
+
<!--
|
324 |
+
### Out-of-Scope Use
|
325 |
+
|
326 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
327 |
+
-->
|
328 |
+
|
329 |
+
## Evaluation
|
330 |
+
|
331 |
+
### Metrics
|
332 |
+
|
333 |
+
#### Semantic Similarity
|
334 |
+
* Dataset: `sts-dev-768`
|
335 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
336 |
+
|
337 |
+
| Metric | Value |
|
338 |
+
|:--------------------|:-----------|
|
339 |
+
| pearson_cosine | 0.8418 |
|
340 |
+
| **spearman_cosine** | **0.8486** |
|
341 |
+
| pearson_manhattan | 0.8357 |
|
342 |
+
| spearman_manhattan | 0.8341 |
|
343 |
+
| pearson_euclidean | 0.8378 |
|
344 |
+
| spearman_euclidean | 0.8365 |
|
345 |
+
| pearson_dot | 0.7477 |
|
346 |
+
| spearman_dot | 0.7445 |
|
347 |
+
| pearson_max | 0.8418 |
|
348 |
+
| spearman_max | 0.8486 |
|
349 |
+
|
350 |
+
#### Semantic Similarity
|
351 |
+
* Dataset: `sts-dev-512`
|
352 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
353 |
+
|
354 |
+
| Metric | Value |
|
355 |
+
|:--------------------|:----------|
|
356 |
+
| pearson_cosine | 0.8417 |
|
357 |
+
| **spearman_cosine** | **0.849** |
|
358 |
+
| pearson_manhattan | 0.8348 |
|
359 |
+
| spearman_manhattan | 0.8333 |
|
360 |
+
| pearson_euclidean | 0.837 |
|
361 |
+
| spearman_euclidean | 0.8357 |
|
362 |
+
| pearson_dot | 0.7426 |
|
363 |
+
| spearman_dot | 0.7393 |
|
364 |
+
| pearson_max | 0.8417 |
|
365 |
+
| spearman_max | 0.849 |
|
366 |
+
|
367 |
+
#### Semantic Similarity
|
368 |
+
* Dataset: `sts-dev-256`
|
369 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
370 |
+
|
371 |
+
| Metric | Value |
|
372 |
+
|:--------------------|:-----------|
|
373 |
+
| pearson_cosine | 0.8368 |
|
374 |
+
| **spearman_cosine** | **0.8459** |
|
375 |
+
| pearson_manhattan | 0.8283 |
|
376 |
+
| spearman_manhattan | 0.828 |
|
377 |
+
| pearson_euclidean | 0.8304 |
|
378 |
+
| spearman_euclidean | 0.8301 |
|
379 |
+
| pearson_dot | 0.7158 |
|
380 |
+
| spearman_dot | 0.7114 |
|
381 |
+
| pearson_max | 0.8368 |
|
382 |
+
| spearman_max | 0.8459 |
|
383 |
+
|
384 |
+
#### Semantic Similarity
|
385 |
+
* Dataset: `sts-dev-128`
|
386 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
387 |
+
|
388 |
+
| Metric | Value |
|
389 |
+
|:--------------------|:----------|
|
390 |
+
| pearson_cosine | 0.8292 |
|
391 |
+
| **spearman_cosine** | **0.841** |
|
392 |
+
| pearson_manhattan | 0.8205 |
|
393 |
+
| spearman_manhattan | 0.8212 |
|
394 |
+
| pearson_euclidean | 0.8218 |
|
395 |
+
| spearman_euclidean | 0.8223 |
|
396 |
+
| pearson_dot | 0.6737 |
|
397 |
+
| spearman_dot | 0.6705 |
|
398 |
+
| pearson_max | 0.8292 |
|
399 |
+
| spearman_max | 0.841 |
|
400 |
+
|
401 |
+
#### Semantic Similarity
|
402 |
+
* Dataset: `sts-dev-64`
|
403 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
404 |
+
|
405 |
+
| Metric | Value |
|
406 |
+
|:--------------------|:----------|
|
407 |
+
| pearson_cosine | 0.8201 |
|
408 |
+
| **spearman_cosine** | **0.835** |
|
409 |
+
| pearson_manhattan | 0.8028 |
|
410 |
+
| spearman_manhattan | 0.8049 |
|
411 |
+
| pearson_euclidean | 0.8047 |
|
412 |
+
| spearman_euclidean | 0.8064 |
|
413 |
+
| pearson_dot | 0.6172 |
|
414 |
+
| spearman_dot | 0.6177 |
|
415 |
+
| pearson_max | 0.8201 |
|
416 |
+
| spearman_max | 0.835 |
|
417 |
+
|
418 |
+
<!--
|
419 |
+
## Bias, Risks and Limitations
|
420 |
+
|
421 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
422 |
+
-->
|
423 |
+
|
424 |
+
<!--
|
425 |
+
### Recommendations
|
426 |
+
|
427 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
428 |
+
-->
|
429 |
+
|
430 |
+
## Training Details
|
431 |
+
|
432 |
+
### Training Dataset
|
433 |
+
|
434 |
+
#### sentence-transformers/all-nli
|
435 |
+
|
436 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
437 |
+
* Size: 557,850 training samples
|
438 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
439 |
+
* Approximate statistics based on the first 1000 samples:
|
440 |
+
| | anchor | positive | negative |
|
441 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
|
442 |
+
| type | string | string | string |
|
443 |
+
| details | <ul><li>min: 7 tokens</li><li>mean: 10.38 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.8 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 13.4 tokens</li><li>max: 50 tokens</li></ul> |
|
444 |
+
* Samples:
|
445 |
+
| anchor | positive | negative |
|
446 |
+
|:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
|
447 |
+
| <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> |
|
448 |
+
| <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
|
449 |
+
| <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> |
|
450 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
451 |
+
```json
|
452 |
+
{
|
453 |
+
"loss": "MultipleNegativesRankingLoss",
|
454 |
+
"matryoshka_dims": [
|
455 |
+
768,
|
456 |
+
512,
|
457 |
+
256,
|
458 |
+
128,
|
459 |
+
64
|
460 |
+
],
|
461 |
+
"matryoshka_weights": [
|
462 |
+
1,
|
463 |
+
1,
|
464 |
+
1,
|
465 |
+
1,
|
466 |
+
1
|
467 |
+
],
|
468 |
+
"n_dims_per_step": -1
|
469 |
+
}
|
470 |
+
```
|
471 |
+
|
472 |
+
### Evaluation Dataset
|
473 |
+
|
474 |
+
#### sentence-transformers/all-nli
|
475 |
+
|
476 |
+
* Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
|
477 |
+
* Size: 6,584 evaluation samples
|
478 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
479 |
+
* Approximate statistics based on the first 1000 samples:
|
480 |
+
| | anchor | positive | negative |
|
481 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
482 |
+
| type | string | string | string |
|
483 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 18.02 tokens</li><li>max: 66 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 9.81 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.37 tokens</li><li>max: 29 tokens</li></ul> |
|
484 |
+
* Samples:
|
485 |
+
| anchor | positive | negative |
|
486 |
+
|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
|
487 |
+
| <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
|
488 |
+
| <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
|
489 |
+
| <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
|
490 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
491 |
+
```json
|
492 |
+
{
|
493 |
+
"loss": "MultipleNegativesRankingLoss",
|
494 |
+
"matryoshka_dims": [
|
495 |
+
768,
|
496 |
+
512,
|
497 |
+
256,
|
498 |
+
128,
|
499 |
+
64
|
500 |
+
],
|
501 |
+
"matryoshka_weights": [
|
502 |
+
1,
|
503 |
+
1,
|
504 |
+
1,
|
505 |
+
1,
|
506 |
+
1
|
507 |
+
],
|
508 |
+
"n_dims_per_step": -1
|
509 |
+
}
|
510 |
+
```
|
511 |
+
|
512 |
+
### Training Hyperparameters
|
513 |
+
#### Non-Default Hyperparameters
|
514 |
+
|
515 |
+
- `eval_strategy`: steps
|
516 |
+
- `per_device_train_batch_size`: 256
|
517 |
+
- `per_device_eval_batch_size`: 256
|
518 |
+
- `num_train_epochs`: 1
|
519 |
+
- `warmup_ratio`: 0.1
|
520 |
+
- `bf16`: True
|
521 |
+
- `batch_sampler`: no_duplicates
|
522 |
+
|
523 |
+
#### All Hyperparameters
|
524 |
+
<details><summary>Click to expand</summary>
|
525 |
+
|
526 |
+
- `overwrite_output_dir`: False
|
527 |
+
- `do_predict`: False
|
528 |
+
- `eval_strategy`: steps
|
529 |
+
- `prediction_loss_only`: True
|
530 |
+
- `per_device_train_batch_size`: 256
|
531 |
+
- `per_device_eval_batch_size`: 256
|
532 |
+
- `per_gpu_train_batch_size`: None
|
533 |
+
- `per_gpu_eval_batch_size`: None
|
534 |
+
- `gradient_accumulation_steps`: 1
|
535 |
+
- `eval_accumulation_steps`: None
|
536 |
+
- `learning_rate`: 5e-05
|
537 |
+
- `weight_decay`: 0.0
|
538 |
+
- `adam_beta1`: 0.9
|
539 |
+
- `adam_beta2`: 0.999
|
540 |
+
- `adam_epsilon`: 1e-08
|
541 |
+
- `max_grad_norm`: 1.0
|
542 |
+
- `num_train_epochs`: 1
|
543 |
+
- `max_steps`: -1
|
544 |
+
- `lr_scheduler_type`: linear
|
545 |
+
- `lr_scheduler_kwargs`: {}
|
546 |
+
- `warmup_ratio`: 0.1
|
547 |
+
- `warmup_steps`: 0
|
548 |
+
- `log_level`: passive
|
549 |
+
- `log_level_replica`: warning
|
550 |
+
- `log_on_each_node`: True
|
551 |
+
- `logging_nan_inf_filter`: True
|
552 |
+
- `save_safetensors`: True
|
553 |
+
- `save_on_each_node`: False
|
554 |
+
- `save_only_model`: False
|
555 |
+
- `restore_callback_states_from_checkpoint`: False
|
556 |
+
- `no_cuda`: False
|
557 |
+
- `use_cpu`: False
|
558 |
+
- `use_mps_device`: False
|
559 |
+
- `seed`: 42
|
560 |
+
- `data_seed`: None
|
561 |
+
- `jit_mode_eval`: False
|
562 |
+
- `use_ipex`: False
|
563 |
+
- `bf16`: True
|
564 |
+
- `fp16`: False
|
565 |
+
- `fp16_opt_level`: O1
|
566 |
+
- `half_precision_backend`: auto
|
567 |
+
- `bf16_full_eval`: False
|
568 |
+
- `fp16_full_eval`: False
|
569 |
+
- `tf32`: None
|
570 |
+
- `local_rank`: 0
|
571 |
+
- `ddp_backend`: None
|
572 |
+
- `tpu_num_cores`: None
|
573 |
+
- `tpu_metrics_debug`: False
|
574 |
+
- `debug`: []
|
575 |
+
- `dataloader_drop_last`: False
|
576 |
+
- `dataloader_num_workers`: 0
|
577 |
+
- `dataloader_prefetch_factor`: None
|
578 |
+
- `past_index`: -1
|
579 |
+
- `disable_tqdm`: False
|
580 |
+
- `remove_unused_columns`: True
|
581 |
+
- `label_names`: None
|
582 |
+
- `load_best_model_at_end`: False
|
583 |
+
- `ignore_data_skip`: False
|
584 |
+
- `fsdp`: []
|
585 |
+
- `fsdp_min_num_params`: 0
|
586 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
587 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
588 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
589 |
+
- `deepspeed`: None
|
590 |
+
- `label_smoothing_factor`: 0.0
|
591 |
+
- `optim`: adamw_torch
|
592 |
+
- `optim_args`: None
|
593 |
+
- `adafactor`: False
|
594 |
+
- `group_by_length`: False
|
595 |
+
- `length_column_name`: length
|
596 |
+
- `ddp_find_unused_parameters`: None
|
597 |
+
- `ddp_bucket_cap_mb`: None
|
598 |
+
- `ddp_broadcast_buffers`: False
|
599 |
+
- `dataloader_pin_memory`: True
|
600 |
+
- `dataloader_persistent_workers`: False
|
601 |
+
- `skip_memory_metrics`: True
|
602 |
+
- `use_legacy_prediction_loop`: False
|
603 |
+
- `push_to_hub`: False
|
604 |
+
- `resume_from_checkpoint`: None
|
605 |
+
- `hub_model_id`: None
|
606 |
+
- `hub_strategy`: every_save
|
607 |
+
- `hub_private_repo`: False
|
608 |
+
- `hub_always_push`: False
|
609 |
+
- `gradient_checkpointing`: False
|
610 |
+
- `gradient_checkpointing_kwargs`: None
|
611 |
+
- `include_inputs_for_metrics`: False
|
612 |
+
- `eval_do_concat_batches`: True
|
613 |
+
- `fp16_backend`: auto
|
614 |
+
- `push_to_hub_model_id`: None
|
615 |
+
- `push_to_hub_organization`: None
|
616 |
+
- `mp_parameters`:
|
617 |
+
- `auto_find_batch_size`: False
|
618 |
+
- `full_determinism`: False
|
619 |
+
- `torchdynamo`: None
|
620 |
+
- `ray_scope`: last
|
621 |
+
- `ddp_timeout`: 1800
|
622 |
+
- `torch_compile`: False
|
623 |
+
- `torch_compile_backend`: None
|
624 |
+
- `torch_compile_mode`: None
|
625 |
+
- `dispatch_batches`: None
|
626 |
+
- `split_batches`: None
|
627 |
+
- `include_tokens_per_second`: False
|
628 |
+
- `include_num_input_tokens_seen`: False
|
629 |
+
- `neftune_noise_alpha`: None
|
630 |
+
- `optim_target_modules`: None
|
631 |
+
- `batch_eval_metrics`: False
|
632 |
+
- `batch_sampler`: no_duplicates
|
633 |
+
- `multi_dataset_batch_sampler`: proportional
|
634 |
+
|
635 |
+
</details>
|
636 |
+
|
637 |
+
### Training Logs
|
638 |
+
| Epoch | Step | Training Loss | loss | sts-dev-128_spearman_cosine | sts-dev-256_spearman_cosine | sts-dev-512_spearman_cosine | sts-dev-64_spearman_cosine | sts-dev-768_spearman_cosine |
|
639 |
+
|:------:|:----:|:-------------:|:------:|:---------------------------:|:---------------------------:|:---------------------------:|:--------------------------:|:---------------------------:|
|
640 |
+
| 0.0459 | 100 | 19.459 | 8.2665 | 0.7796 | 0.8046 | 0.8114 | 0.8082 | 0.7996 |
|
641 |
+
| 0.0917 | 200 | 11.0035 | 7.6606 | 0.7696 | 0.7971 | 0.8083 | 0.7987 | 0.7933 |
|
642 |
+
| 0.1376 | 300 | 9.7634 | 6.4912 | 0.7992 | 0.8126 | 0.8190 | 0.8062 | 0.8127 |
|
643 |
+
| 0.1835 | 400 | 9.1103 | 5.9960 | 0.8081 | 0.8229 | 0.8263 | 0.8136 | 0.8224 |
|
644 |
+
| 0.2294 | 500 | 8.7099 | 5.9388 | 0.7984 | 0.8138 | 0.8189 | 0.8021 | 0.8166 |
|
645 |
+
| 0.2752 | 600 | 8.1215 | 5.6457 | 0.7963 | 0.8104 | 0.8149 | 0.8057 | 0.8121 |
|
646 |
+
| 0.3211 | 700 | 7.7441 | 5.4632 | 0.7937 | 0.8153 | 0.8199 | 0.8119 | 0.8150 |
|
647 |
+
| 0.3670 | 800 | 7.4849 | 5.1815 | 0.8076 | 0.8208 | 0.8238 | 0.8152 | 0.8172 |
|
648 |
+
| 0.4128 | 900 | 7.1386 | 5.1419 | 0.8035 | 0.8181 | 0.8235 | 0.8139 | 0.8189 |
|
649 |
+
| 0.4587 | 1000 | 6.839 | 5.1548 | 0.7943 | 0.8118 | 0.8172 | 0.8054 | 0.8153 |
|
650 |
+
| 0.5046 | 1100 | 6.6597 | 5.1015 | 0.7895 | 0.8066 | 0.8119 | 0.8059 | 0.8063 |
|
651 |
+
| 0.5505 | 1200 | 6.7172 | 5.3707 | 0.7753 | 0.7987 | 0.8068 | 0.7989 | 0.8014 |
|
652 |
+
| 0.5963 | 1300 | 6.6514 | 4.9368 | 0.7904 | 0.8086 | 0.8139 | 0.8051 | 0.8083 |
|
653 |
+
| 0.6422 | 1400 | 6.5573 | 5.0196 | 0.7882 | 0.8066 | 0.8128 | 0.8035 | 0.8091 |
|
654 |
+
| 0.6881 | 1500 | 6.7596 | 4.9381 | 0.7960 | 0.8120 | 0.8169 | 0.8058 | 0.8140 |
|
655 |
+
| 0.7339 | 1600 | 6.2686 | 4.4018 | 0.8136 | 0.8245 | 0.8268 | 0.8160 | 0.8244 |
|
656 |
+
| 0.7798 | 1700 | 3.4607 | 3.8397 | 0.8415 | 0.8466 | 0.8502 | 0.8345 | 0.8503 |
|
657 |
+
| 0.8257 | 1800 | 2.6912 | 3.7914 | 0.8415 | 0.8459 | 0.8493 | 0.8350 | 0.8488 |
|
658 |
+
| 0.8716 | 1900 | 2.4958 | 3.7752 | 0.8402 | 0.8450 | 0.8484 | 0.8340 | 0.8478 |
|
659 |
+
| 0.9174 | 2000 | 2.3413 | 3.7997 | 0.8410 | 0.8459 | 0.8490 | 0.8350 | 0.8486 |
|
660 |
+
|
661 |
+
|
662 |
+
### Framework Versions
|
663 |
+
- Python: 3.10.12
|
664 |
+
- Sentence Transformers: 3.0.0
|
665 |
+
- Transformers: 4.41.1
|
666 |
+
- PyTorch: 2.3.0+cu121
|
667 |
+
- Accelerate: 0.30.1
|
668 |
+
- Datasets: 2.19.2
|
669 |
+
- Tokenizers: 0.19.1
|
670 |
+
|
671 |
+
## Citation
|
672 |
+
|
673 |
+
### BibTeX
|
674 |
+
|
675 |
+
#### Sentence Transformers
|
676 |
+
```bibtex
|
677 |
+
@inproceedings{reimers-2019-sentence-bert,
|
678 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
679 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
680 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
681 |
+
month = "11",
|
682 |
+
year = "2019",
|
683 |
+
publisher = "Association for Computational Linguistics",
|
684 |
+
url = "https://arxiv.org/abs/1908.10084",
|
685 |
+
}
|
686 |
+
```
|
687 |
+
|
688 |
+
#### MatryoshkaLoss
|
689 |
+
```bibtex
|
690 |
+
@misc{kusupati2024matryoshka,
|
691 |
+
title={Matryoshka Representation Learning},
|
692 |
+
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
|
693 |
+
year={2024},
|
694 |
+
eprint={2205.13147},
|
695 |
+
archivePrefix={arXiv},
|
696 |
+
primaryClass={cs.LG}
|
697 |
+
}
|
698 |
+
```
|
699 |
+
|
700 |
+
#### MultipleNegativesRankingLoss
|
701 |
+
```bibtex
|
702 |
+
@misc{henderson2017efficient,
|
703 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
704 |
+
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},
|
705 |
+
year={2017},
|
706 |
+
eprint={1705.00652},
|
707 |
+
archivePrefix={arXiv},
|
708 |
+
primaryClass={cs.CL}
|
709 |
+
}
|
710 |
+
```
|
711 |
+
|
712 |
+
<!--
|
713 |
+
## Glossary
|
714 |
+
|
715 |
+
*Clearly define terms in order to be accessible across audiences.*
|
716 |
+
-->
|
717 |
+
|
718 |
+
<!--
|
719 |
+
## Model Card Authors
|
720 |
+
|
721 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
722 |
+
-->
|
723 |
+
|
724 |
+
<!--
|
725 |
+
## Model Card Contact
|
726 |
+
|
727 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
728 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/content/drive/MyDrive/matryoshka_nli_2_distilroberta-base_256_bs_1_e/checkpoint-2000",
|
3 |
+
"architectures": [
|
4 |
+
"RobertaModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 514,
|
17 |
+
"model_type": "roberta",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 6,
|
20 |
+
"pad_token_id": 1,
|
21 |
+
"position_embedding_type": "absolute",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.41.1",
|
24 |
+
"type_vocab_size": 1,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 50265
|
27 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.0",
|
4 |
+
"transformers": "4.41.1",
|
5 |
+
"pytorch": "2.3.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0332e4ce6f3f1e288667ccdabc510285f8de92ee284c111595c123c5188178b1
|
3 |
+
size 328485128
|
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,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
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 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"0": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"1": {
|
13 |
+
"content": "<pad>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"2": {
|
21 |
+
"content": "</s>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"3": {
|
29 |
+
"content": "<unk>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"50264": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": false,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"bos_token": "<s>",
|
46 |
+
"clean_up_tokenization_spaces": true,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"errors": "replace",
|
50 |
+
"mask_token": "<mask>",
|
51 |
+
"max_length": 512,
|
52 |
+
"model_max_length": 512,
|
53 |
+
"pad_to_multiple_of": null,
|
54 |
+
"pad_token": "<pad>",
|
55 |
+
"pad_token_type_id": 0,
|
56 |
+
"padding_side": "right",
|
57 |
+
"sep_token": "</s>",
|
58 |
+
"stride": 0,
|
59 |
+
"tokenizer_class": "RobertaTokenizer",
|
60 |
+
"trim_offsets": true,
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "<unk>"
|
64 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|