Update README.md
Browse files
README.md
CHANGED
@@ -1,479 +1,490 @@
|
|
1 |
-
---
|
2 |
-
base_model: indobenchmark/indobert-base-p2
|
3 |
-
datasets: []
|
4 |
-
language: []
|
5 |
-
library_name: sentence-transformers
|
6 |
-
metrics:
|
7 |
-
- pearson_cosine
|
8 |
-
- spearman_cosine
|
9 |
-
- pearson_manhattan
|
10 |
-
- spearman_manhattan
|
11 |
-
- pearson_euclidean
|
12 |
-
- spearman_euclidean
|
13 |
-
- pearson_dot
|
14 |
-
- spearman_dot
|
15 |
-
- pearson_max
|
16 |
-
- spearman_max
|
17 |
-
pipeline_tag: sentence-similarity
|
18 |
-
tags:
|
19 |
-
- sentence-transformers
|
20 |
-
- sentence-similarity
|
21 |
-
- feature-extraction
|
22 |
-
- generated_from_trainer
|
23 |
-
- dataset_size:5749
|
24 |
-
- loss:CosineSimilarityLoss
|
25 |
-
widget:
|
26 |
-
- source_sentence: Dua ekor anjing berenang di kolam renang.
|
27 |
-
sentences:
|
28 |
-
- Anjing-anjing sedang berenang di kolam renang.
|
29 |
-
- Seekor binatang sedang berjalan di atas tanah.
|
30 |
-
- Seorang pria sedang menyeka pinggiran mangkuk.
|
31 |
-
- source_sentence: Seorang anak perempuan sedang mengiris mentega menjadi dua bagian.
|
32 |
-
sentences:
|
33 |
-
- Seorang wanita sedang mengiris tahu.
|
34 |
-
- Dua orang berkelahi.
|
35 |
-
- Seorang pria sedang menari.
|
36 |
-
- source_sentence: Seorang gadis sedang makan kue mangkuk.
|
37 |
-
sentences:
|
38 |
-
- Seorang pria sedang mengiris bawang putih dengan alat pengiris mandolin.
|
39 |
-
- Seorang pria sedang memotong dan memotong bawang.
|
40 |
-
- Seorang wanita sedang makan kue mangkuk.
|
41 |
-
- source_sentence: Sebuah helikopter mendarat di landasan helikopter.
|
42 |
-
sentences:
|
43 |
-
- Seorang pria sedang mengiris mentimun.
|
44 |
-
- Seorang pria sedang memotong batang pohon dengan kapak.
|
45 |
-
- Sebuah helikopter mendarat.
|
46 |
-
- source_sentence: Seorang pria sedang berjalan dengan seekor kuda.
|
47 |
-
sentences:
|
48 |
-
- Seorang pria sedang menuntun seekor kuda dengan tali kekang.
|
49 |
-
- Seorang pria sedang menembakkan pistol.
|
50 |
-
- Seorang wanita sedang memetik tomat.
|
51 |
-
model-index:
|
52 |
-
- name: SentenceTransformer based on indobenchmark/indobert-base-p2
|
53 |
-
results:
|
54 |
-
- task:
|
55 |
-
type: semantic-similarity
|
56 |
-
name: Semantic Similarity
|
57 |
-
dataset:
|
58 |
-
name: Unknown
|
59 |
-
type: unknown
|
60 |
-
metrics:
|
61 |
-
- type: pearson_cosine
|
62 |
-
value: 0.8577280779646681
|
63 |
-
name: Pearson Cosine
|
64 |
-
- type: spearman_cosine
|
65 |
-
value: 0.8588776334781149
|
66 |
-
name: Spearman Cosine
|
67 |
-
- type: pearson_manhattan
|
68 |
-
value: 0.8315261521874587
|
69 |
-
name: Pearson Manhattan
|
70 |
-
- type: spearman_manhattan
|
71 |
-
value: 0.8355406849443783
|
72 |
-
name: Spearman Manhattan
|
73 |
-
- type: pearson_euclidean
|
74 |
-
value: 0.8318083198603524
|
75 |
-
name: Pearson Euclidean
|
76 |
-
- type: spearman_euclidean
|
77 |
-
value: 0.8359194889385243
|
78 |
-
name: Spearman Euclidean
|
79 |
-
- type: pearson_dot
|
80 |
-
value: 0.7767060276322824
|
81 |
-
name: Pearson Dot
|
82 |
-
- type: spearman_dot
|
83 |
-
value: 0.783607744137448
|
84 |
-
name: Spearman Dot
|
85 |
-
- type: pearson_max
|
86 |
-
value: 0.8577280779646681
|
87 |
-
name: Pearson Max
|
88 |
-
- type: spearman_max
|
89 |
-
value: 0.8588776334781149
|
90 |
-
name: Spearman Max
|
91 |
-
- type: pearson_cosine
|
92 |
-
value: 0.8122790124383042
|
93 |
-
name: Pearson Cosine
|
94 |
-
- type: spearman_cosine
|
95 |
-
value: 0.8123119892530147
|
96 |
-
name: Spearman Cosine
|
97 |
-
- type: pearson_manhattan
|
98 |
-
value: 0.7987643661729152
|
99 |
-
name: Pearson Manhattan
|
100 |
-
- type: spearman_manhattan
|
101 |
-
value: 0.7966661480553803
|
102 |
-
name: Spearman Manhattan
|
103 |
-
- type: pearson_euclidean
|
104 |
-
value: 0.7992882233155829
|
105 |
-
name: Pearson Euclidean
|
106 |
-
- type: spearman_euclidean
|
107 |
-
value: 0.797227936168015
|
108 |
-
name: Spearman Euclidean
|
109 |
-
- type: pearson_dot
|
110 |
-
value: 0.712195542080357
|
111 |
-
name: Pearson Dot
|
112 |
-
- type: spearman_dot
|
113 |
-
value: 0.7014898656834544
|
114 |
-
name: Spearman Dot
|
115 |
-
- type: pearson_max
|
116 |
-
value: 0.8122790124383042
|
117 |
-
name: Pearson Max
|
118 |
-
- type: spearman_max
|
119 |
-
value: 0.8123119892530147
|
120 |
-
name: Spearman Max
|
121 |
-
---
|
122 |
-
|
123 |
-
# SentenceTransformer based on indobenchmark/indobert-base-p2
|
124 |
-
|
125 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2). 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.
|
126 |
-
|
127 |
-
##
|
128 |
-
|
129 |
-
|
130 |
-
-
|
131 |
-
|
132 |
-
-
|
133 |
-
-
|
134 |
-
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
- **
|
142 |
-
- **
|
143 |
-
- **
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
###
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
|
236 |
-
|
237 |
-
|
|
238 |
-
|
|
239 |
-
|
|
240 |
-
|
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
##
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
*
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
*
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
####
|
300 |
-
|
301 |
-
|
302 |
-
- `
|
303 |
-
- `
|
304 |
-
- `
|
305 |
-
- `
|
306 |
-
- `
|
307 |
-
- `
|
308 |
-
- `
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
- `
|
314 |
-
- `
|
315 |
-
- `
|
316 |
-
- `
|
317 |
-
- `
|
318 |
-
- `
|
319 |
-
- `
|
320 |
-
- `
|
321 |
-
- `
|
322 |
-
- `
|
323 |
-
- `
|
324 |
-
- `
|
325 |
-
- `
|
326 |
-
- `
|
327 |
-
- `
|
328 |
-
- `
|
329 |
-
- `
|
330 |
-
- `
|
331 |
-
- `
|
332 |
-
- `
|
333 |
-
- `
|
334 |
-
- `
|
335 |
-
- `
|
336 |
-
- `
|
337 |
-
- `
|
338 |
-
- `
|
339 |
-
- `
|
340 |
-
- `
|
341 |
-
- `
|
342 |
-
- `
|
343 |
-
- `
|
344 |
-
- `
|
345 |
-
- `
|
346 |
-
- `
|
347 |
-
- `
|
348 |
-
- `
|
349 |
-
- `
|
350 |
-
- `
|
351 |
-
- `
|
352 |
-
- `
|
353 |
-
- `
|
354 |
-
- `
|
355 |
-
- `
|
356 |
-
- `
|
357 |
-
- `
|
358 |
-
- `
|
359 |
-
- `
|
360 |
-
- `
|
361 |
-
- `
|
362 |
-
- `
|
363 |
-
- `
|
364 |
-
- `
|
365 |
-
- `
|
366 |
-
- `
|
367 |
-
- `
|
368 |
-
- `
|
369 |
-
- `
|
370 |
-
- `
|
371 |
-
- `
|
372 |
-
- `
|
373 |
-
- `
|
374 |
-
- `
|
375 |
-
- `
|
376 |
-
- `
|
377 |
-
- `
|
378 |
-
- `
|
379 |
-
- `
|
380 |
-
- `
|
381 |
-
- `
|
382 |
-
- `
|
383 |
-
- `
|
384 |
-
- `
|
385 |
-
- `
|
386 |
-
- `
|
387 |
-
- `
|
388 |
-
- `
|
389 |
-
- `
|
390 |
-
- `
|
391 |
-
- `
|
392 |
-
- `
|
393 |
-
- `
|
394 |
-
- `
|
395 |
-
- `
|
396 |
-
- `
|
397 |
-
- `
|
398 |
-
- `
|
399 |
-
- `
|
400 |
-
- `
|
401 |
-
- `
|
402 |
-
- `
|
403 |
-
- `
|
404 |
-
- `
|
405 |
-
- `
|
406 |
-
- `
|
407 |
-
- `
|
408 |
-
- `
|
409 |
-
- `
|
410 |
-
- `
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
|
427 |
-
|
428 |
-
|
|
429 |
-
|
|
430 |
-
|
|
431 |
-
|
|
432 |
-
|
|
433 |
-
|
|
434 |
-
|
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
###
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
-->
|
|
|
1 |
+
---
|
2 |
+
base_model: indobenchmark/indobert-base-p2
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
metrics:
|
7 |
+
- pearson_cosine
|
8 |
+
- spearman_cosine
|
9 |
+
- pearson_manhattan
|
10 |
+
- spearman_manhattan
|
11 |
+
- pearson_euclidean
|
12 |
+
- spearman_euclidean
|
13 |
+
- pearson_dot
|
14 |
+
- spearman_dot
|
15 |
+
- pearson_max
|
16 |
+
- spearman_max
|
17 |
+
pipeline_tag: sentence-similarity
|
18 |
+
tags:
|
19 |
+
- sentence-transformers
|
20 |
+
- sentence-similarity
|
21 |
+
- feature-extraction
|
22 |
+
- generated_from_trainer
|
23 |
+
- dataset_size:5749
|
24 |
+
- loss:CosineSimilarityLoss
|
25 |
+
widget:
|
26 |
+
- source_sentence: Dua ekor anjing berenang di kolam renang.
|
27 |
+
sentences:
|
28 |
+
- Anjing-anjing sedang berenang di kolam renang.
|
29 |
+
- Seekor binatang sedang berjalan di atas tanah.
|
30 |
+
- Seorang pria sedang menyeka pinggiran mangkuk.
|
31 |
+
- source_sentence: Seorang anak perempuan sedang mengiris mentega menjadi dua bagian.
|
32 |
+
sentences:
|
33 |
+
- Seorang wanita sedang mengiris tahu.
|
34 |
+
- Dua orang berkelahi.
|
35 |
+
- Seorang pria sedang menari.
|
36 |
+
- source_sentence: Seorang gadis sedang makan kue mangkuk.
|
37 |
+
sentences:
|
38 |
+
- Seorang pria sedang mengiris bawang putih dengan alat pengiris mandolin.
|
39 |
+
- Seorang pria sedang memotong dan memotong bawang.
|
40 |
+
- Seorang wanita sedang makan kue mangkuk.
|
41 |
+
- source_sentence: Sebuah helikopter mendarat di landasan helikopter.
|
42 |
+
sentences:
|
43 |
+
- Seorang pria sedang mengiris mentimun.
|
44 |
+
- Seorang pria sedang memotong batang pohon dengan kapak.
|
45 |
+
- Sebuah helikopter mendarat.
|
46 |
+
- source_sentence: Seorang pria sedang berjalan dengan seekor kuda.
|
47 |
+
sentences:
|
48 |
+
- Seorang pria sedang menuntun seekor kuda dengan tali kekang.
|
49 |
+
- Seorang pria sedang menembakkan pistol.
|
50 |
+
- Seorang wanita sedang memetik tomat.
|
51 |
+
model-index:
|
52 |
+
- name: SentenceTransformer based on indobenchmark/indobert-base-p2
|
53 |
+
results:
|
54 |
+
- task:
|
55 |
+
type: semantic-similarity
|
56 |
+
name: Semantic Similarity
|
57 |
+
dataset:
|
58 |
+
name: Unknown
|
59 |
+
type: unknown
|
60 |
+
metrics:
|
61 |
+
- type: pearson_cosine
|
62 |
+
value: 0.8577280779646681
|
63 |
+
name: Pearson Cosine
|
64 |
+
- type: spearman_cosine
|
65 |
+
value: 0.8588776334781149
|
66 |
+
name: Spearman Cosine
|
67 |
+
- type: pearson_manhattan
|
68 |
+
value: 0.8315261521874587
|
69 |
+
name: Pearson Manhattan
|
70 |
+
- type: spearman_manhattan
|
71 |
+
value: 0.8355406849443783
|
72 |
+
name: Spearman Manhattan
|
73 |
+
- type: pearson_euclidean
|
74 |
+
value: 0.8318083198603524
|
75 |
+
name: Pearson Euclidean
|
76 |
+
- type: spearman_euclidean
|
77 |
+
value: 0.8359194889385243
|
78 |
+
name: Spearman Euclidean
|
79 |
+
- type: pearson_dot
|
80 |
+
value: 0.7767060276322824
|
81 |
+
name: Pearson Dot
|
82 |
+
- type: spearman_dot
|
83 |
+
value: 0.783607744137448
|
84 |
+
name: Spearman Dot
|
85 |
+
- type: pearson_max
|
86 |
+
value: 0.8577280779646681
|
87 |
+
name: Pearson Max
|
88 |
+
- type: spearman_max
|
89 |
+
value: 0.8588776334781149
|
90 |
+
name: Spearman Max
|
91 |
+
- type: pearson_cosine
|
92 |
+
value: 0.8122790124383042
|
93 |
+
name: Pearson Cosine
|
94 |
+
- type: spearman_cosine
|
95 |
+
value: 0.8123119892530147
|
96 |
+
name: Spearman Cosine
|
97 |
+
- type: pearson_manhattan
|
98 |
+
value: 0.7987643661729152
|
99 |
+
name: Pearson Manhattan
|
100 |
+
- type: spearman_manhattan
|
101 |
+
value: 0.7966661480553803
|
102 |
+
name: Spearman Manhattan
|
103 |
+
- type: pearson_euclidean
|
104 |
+
value: 0.7992882233155829
|
105 |
+
name: Pearson Euclidean
|
106 |
+
- type: spearman_euclidean
|
107 |
+
value: 0.797227936168015
|
108 |
+
name: Spearman Euclidean
|
109 |
+
- type: pearson_dot
|
110 |
+
value: 0.712195542080357
|
111 |
+
name: Pearson Dot
|
112 |
+
- type: spearman_dot
|
113 |
+
value: 0.7014898656834544
|
114 |
+
name: Spearman Dot
|
115 |
+
- type: pearson_max
|
116 |
+
value: 0.8122790124383042
|
117 |
+
name: Pearson Max
|
118 |
+
- type: spearman_max
|
119 |
+
value: 0.8123119892530147
|
120 |
+
name: Spearman Max
|
121 |
+
---
|
122 |
+
|
123 |
+
# SentenceTransformer based on indobenchmark/indobert-base-p2
|
124 |
+
|
125 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2). 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.
|
126 |
+
|
127 |
+
## STSB Test
|
128 |
+
| | Spearman Correlation |
|
129 |
+
|:----------------------------------------|-----------------------:|
|
130 |
+
| models/indobert-large-stsb | 0.8366 |
|
131 |
+
| models/indobert-base-stsb | 0.8123 |
|
132 |
+
| sentence-transformers/all-MiniLM-L6-v2 | 0.5952 |
|
133 |
+
| indobenchmark/indobert-large-p2 | 0.5673 |
|
134 |
+
| sentence-transformers/all-mpnet-base-v2 | 0.5531 |
|
135 |
+
| sentence-transformers/stsb-bert-base | 0.5349 |
|
136 |
+
| indobenchmark/indobert-base-p2 | 0.5309 |
|
137 |
+
|
138 |
+
## Model Details
|
139 |
+
|
140 |
+
### Model Description
|
141 |
+
- **Model Type:** Sentence Transformer
|
142 |
+
- **Base model:** [indobenchmark/indobert-base-p2](https://huggingface.co/indobenchmark/indobert-base-p2) <!-- at revision 94b4e0a82081fa57f227fcc2024d1ea89b57ac1f -->
|
143 |
+
- **Maximum Sequence Length:** 512 tokens
|
144 |
+
- **Output Dimensionality:** 768 tokens
|
145 |
+
- **Similarity Function:** Cosine Similarity
|
146 |
+
<!-- - **Training Dataset:** Unknown -->
|
147 |
+
<!-- - **Language:** Unknown -->
|
148 |
+
<!-- - **License:** Unknown -->
|
149 |
+
|
150 |
+
### Model Sources
|
151 |
+
|
152 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
153 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
154 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
155 |
+
|
156 |
+
### Full Model Architecture
|
157 |
+
|
158 |
+
```
|
159 |
+
SentenceTransformer(
|
160 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
161 |
+
(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})
|
162 |
+
)
|
163 |
+
```
|
164 |
+
|
165 |
+
## Usage
|
166 |
+
|
167 |
+
### Direct Usage (Sentence Transformers)
|
168 |
+
|
169 |
+
First install the Sentence Transformers library:
|
170 |
+
|
171 |
+
```bash
|
172 |
+
pip install -U sentence-transformers
|
173 |
+
```
|
174 |
+
|
175 |
+
Then you can load this model and run inference.
|
176 |
+
```python
|
177 |
+
from sentence_transformers import SentenceTransformer
|
178 |
+
|
179 |
+
# Download from the 🤗 Hub
|
180 |
+
model = SentenceTransformer("quarkss/indobert-base-stsb")
|
181 |
+
# Run inference
|
182 |
+
sentences = [
|
183 |
+
'Seorang pria sedang berjalan dengan seekor kuda.',
|
184 |
+
'Seorang pria sedang menuntun seekor kuda dengan tali kekang.',
|
185 |
+
'Seorang pria sedang menembakkan pistol.',
|
186 |
+
]
|
187 |
+
embeddings = model.encode(sentences)
|
188 |
+
print(embeddings.shape)
|
189 |
+
# [3, 768]
|
190 |
+
|
191 |
+
# Get the similarity scores for the embeddings
|
192 |
+
similarities = model.similarity(embeddings, embeddings)
|
193 |
+
print(similarities.shape)
|
194 |
+
# [3, 3]
|
195 |
+
```
|
196 |
+
|
197 |
+
<!--
|
198 |
+
### Direct Usage (Transformers)
|
199 |
+
|
200 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
201 |
+
|
202 |
+
</details>
|
203 |
+
-->
|
204 |
+
|
205 |
+
<!--
|
206 |
+
### Downstream Usage (Sentence Transformers)
|
207 |
+
|
208 |
+
You can finetune this model on your own dataset.
|
209 |
+
|
210 |
+
<details><summary>Click to expand</summary>
|
211 |
+
|
212 |
+
</details>
|
213 |
+
-->
|
214 |
+
|
215 |
+
<!--
|
216 |
+
### Out-of-Scope Use
|
217 |
+
|
218 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
219 |
+
-->
|
220 |
+
|
221 |
+
## Evaluation
|
222 |
+
|
223 |
+
### Metrics
|
224 |
+
|
225 |
+
#### Semantic Similarity
|
226 |
+
|
227 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
228 |
+
|
229 |
+
| Metric | Value |
|
230 |
+
|:--------------------|:-----------|
|
231 |
+
| pearson_cosine | 0.8577 |
|
232 |
+
| **spearman_cosine** | **0.8589** |
|
233 |
+
| pearson_manhattan | 0.8315 |
|
234 |
+
| spearman_manhattan | 0.8355 |
|
235 |
+
| pearson_euclidean | 0.8318 |
|
236 |
+
| spearman_euclidean | 0.8359 |
|
237 |
+
| pearson_dot | 0.7767 |
|
238 |
+
| spearman_dot | 0.7836 |
|
239 |
+
| pearson_max | 0.8577 |
|
240 |
+
| spearman_max | 0.8589 |
|
241 |
+
|
242 |
+
#### Semantic Similarity
|
243 |
+
|
244 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
245 |
+
|
246 |
+
| Metric | Value |
|
247 |
+
|:-------------------|:-----------|
|
248 |
+
| pearson_cosine | 0.8123 |
|
249 |
+
| spearman_cosine | 0.8123 |
|
250 |
+
| pearson_manhattan | 0.7988 |
|
251 |
+
| spearman_manhattan | 0.7967 |
|
252 |
+
| pearson_euclidean | 0.7993 |
|
253 |
+
| spearman_euclidean | 0.7972 |
|
254 |
+
| pearson_dot | 0.7122 |
|
255 |
+
| spearman_dot | 0.7015 |
|
256 |
+
| pearson_max | 0.8123 |
|
257 |
+
| **spearman_max** | **0.8123** |
|
258 |
+
|
259 |
+
<!--
|
260 |
+
## Bias, Risks and Limitations
|
261 |
+
|
262 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
263 |
+
-->
|
264 |
+
|
265 |
+
<!--
|
266 |
+
### Recommendations
|
267 |
+
|
268 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
269 |
+
-->
|
270 |
+
|
271 |
+
## Training Details
|
272 |
+
|
273 |
+
### Training Dataset
|
274 |
+
|
275 |
+
#### Unnamed Dataset
|
276 |
+
|
277 |
+
|
278 |
+
* Size: 5,749 training samples
|
279 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
|
280 |
+
* Approximate statistics based on the first 1000 samples:
|
281 |
+
| | sentence1 | sentence2 | score |
|
282 |
+
|:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------|
|
283 |
+
| type | string | string | float |
|
284 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 9.65 tokens</li><li>max: 25 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 9.59 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.54</li><li>max: 1.0</li></ul> |
|
285 |
+
* Samples:
|
286 |
+
| sentence1 | sentence2 | score |
|
287 |
+
|:-----------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:------------------|
|
288 |
+
| <code>Sebuah pesawat sedang lepas landas.</code> | <code>Sebuah pesawat terbang sedang lepas landas.</code> | <code>1.0</code> |
|
289 |
+
| <code>Seorang pria sedang memainkan seruling besar.</code> | <code>Seorang pria sedang memainkan seruling.</code> | <code>0.76</code> |
|
290 |
+
| <code>Seorang pria sedang mengoleskan keju parut di atas pizza.</code> | <code>Seorang pria sedang mengoleskan keju parut di atas pizza yang belum matang.</code> | <code>0.76</code> |
|
291 |
+
* Loss: [<code>CosineSimilarityLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosinesimilarityloss) with these parameters:
|
292 |
+
```json
|
293 |
+
{
|
294 |
+
"loss_fct": "torch.nn.modules.loss.MSELoss"
|
295 |
+
}
|
296 |
+
```
|
297 |
+
|
298 |
+
### Training Hyperparameters
|
299 |
+
#### Non-Default Hyperparameters
|
300 |
+
|
301 |
+
- `eval_strategy`: steps
|
302 |
+
- `per_device_train_batch_size`: 16
|
303 |
+
- `per_device_eval_batch_size`: 16
|
304 |
+
- `learning_rate`: 2e-05
|
305 |
+
- `weight_decay`: 0.01
|
306 |
+
- `num_train_epochs`: 5
|
307 |
+
- `warmup_ratio`: 0.1
|
308 |
+
- `fp16`: True
|
309 |
+
|
310 |
+
#### All Hyperparameters
|
311 |
+
<details><summary>Click to expand</summary>
|
312 |
+
|
313 |
+
- `overwrite_output_dir`: False
|
314 |
+
- `do_predict`: False
|
315 |
+
- `eval_strategy`: steps
|
316 |
+
- `prediction_loss_only`: True
|
317 |
+
- `per_device_train_batch_size`: 16
|
318 |
+
- `per_device_eval_batch_size`: 16
|
319 |
+
- `per_gpu_train_batch_size`: None
|
320 |
+
- `per_gpu_eval_batch_size`: None
|
321 |
+
- `gradient_accumulation_steps`: 1
|
322 |
+
- `eval_accumulation_steps`: None
|
323 |
+
- `learning_rate`: 2e-05
|
324 |
+
- `weight_decay`: 0.01
|
325 |
+
- `adam_beta1`: 0.9
|
326 |
+
- `adam_beta2`: 0.999
|
327 |
+
- `adam_epsilon`: 1e-08
|
328 |
+
- `max_grad_norm`: 1.0
|
329 |
+
- `num_train_epochs`: 5
|
330 |
+
- `max_steps`: -1
|
331 |
+
- `lr_scheduler_type`: linear
|
332 |
+
- `lr_scheduler_kwargs`: {}
|
333 |
+
- `warmup_ratio`: 0.1
|
334 |
+
- `warmup_steps`: 0
|
335 |
+
- `log_level`: passive
|
336 |
+
- `log_level_replica`: warning
|
337 |
+
- `log_on_each_node`: True
|
338 |
+
- `logging_nan_inf_filter`: True
|
339 |
+
- `save_safetensors`: True
|
340 |
+
- `save_on_each_node`: False
|
341 |
+
- `save_only_model`: False
|
342 |
+
- `restore_callback_states_from_checkpoint`: False
|
343 |
+
- `no_cuda`: False
|
344 |
+
- `use_cpu`: False
|
345 |
+
- `use_mps_device`: False
|
346 |
+
- `seed`: 42
|
347 |
+
- `data_seed`: None
|
348 |
+
- `jit_mode_eval`: False
|
349 |
+
- `use_ipex`: False
|
350 |
+
- `bf16`: False
|
351 |
+
- `fp16`: True
|
352 |
+
- `fp16_opt_level`: O1
|
353 |
+
- `half_precision_backend`: auto
|
354 |
+
- `bf16_full_eval`: False
|
355 |
+
- `fp16_full_eval`: False
|
356 |
+
- `tf32`: None
|
357 |
+
- `local_rank`: 0
|
358 |
+
- `ddp_backend`: None
|
359 |
+
- `tpu_num_cores`: None
|
360 |
+
- `tpu_metrics_debug`: False
|
361 |
+
- `debug`: []
|
362 |
+
- `dataloader_drop_last`: False
|
363 |
+
- `dataloader_num_workers`: 0
|
364 |
+
- `dataloader_prefetch_factor`: None
|
365 |
+
- `past_index`: -1
|
366 |
+
- `disable_tqdm`: False
|
367 |
+
- `remove_unused_columns`: True
|
368 |
+
- `label_names`: None
|
369 |
+
- `load_best_model_at_end`: False
|
370 |
+
- `ignore_data_skip`: False
|
371 |
+
- `fsdp`: []
|
372 |
+
- `fsdp_min_num_params`: 0
|
373 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
374 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
375 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
376 |
+
- `deepspeed`: None
|
377 |
+
- `label_smoothing_factor`: 0.0
|
378 |
+
- `optim`: adamw_torch
|
379 |
+
- `optim_args`: None
|
380 |
+
- `adafactor`: False
|
381 |
+
- `group_by_length`: False
|
382 |
+
- `length_column_name`: length
|
383 |
+
- `ddp_find_unused_parameters`: None
|
384 |
+
- `ddp_bucket_cap_mb`: None
|
385 |
+
- `ddp_broadcast_buffers`: False
|
386 |
+
- `dataloader_pin_memory`: True
|
387 |
+
- `dataloader_persistent_workers`: False
|
388 |
+
- `skip_memory_metrics`: True
|
389 |
+
- `use_legacy_prediction_loop`: False
|
390 |
+
- `push_to_hub`: False
|
391 |
+
- `resume_from_checkpoint`: None
|
392 |
+
- `hub_model_id`: None
|
393 |
+
- `hub_strategy`: every_save
|
394 |
+
- `hub_private_repo`: False
|
395 |
+
- `hub_always_push`: False
|
396 |
+
- `gradient_checkpointing`: False
|
397 |
+
- `gradient_checkpointing_kwargs`: None
|
398 |
+
- `include_inputs_for_metrics`: False
|
399 |
+
- `eval_do_concat_batches`: True
|
400 |
+
- `fp16_backend`: auto
|
401 |
+
- `push_to_hub_model_id`: None
|
402 |
+
- `push_to_hub_organization`: None
|
403 |
+
- `mp_parameters`:
|
404 |
+
- `auto_find_batch_size`: False
|
405 |
+
- `full_determinism`: False
|
406 |
+
- `torchdynamo`: None
|
407 |
+
- `ray_scope`: last
|
408 |
+
- `ddp_timeout`: 1800
|
409 |
+
- `torch_compile`: False
|
410 |
+
- `torch_compile_backend`: None
|
411 |
+
- `torch_compile_mode`: None
|
412 |
+
- `dispatch_batches`: None
|
413 |
+
- `split_batches`: None
|
414 |
+
- `include_tokens_per_second`: False
|
415 |
+
- `include_num_input_tokens_seen`: False
|
416 |
+
- `neftune_noise_alpha`: None
|
417 |
+
- `optim_target_modules`: None
|
418 |
+
- `batch_eval_metrics`: False
|
419 |
+
- `eval_on_start`: False
|
420 |
+
- `batch_sampler`: batch_sampler
|
421 |
+
- `multi_dataset_batch_sampler`: proportional
|
422 |
+
|
423 |
+
</details>
|
424 |
+
|
425 |
+
### Training Logs
|
426 |
+
| Epoch | Step | Training Loss | spearman_cosine | spearman_max |
|
427 |
+
|:------:|:----:|:-------------:|:---------------:|:------------:|
|
428 |
+
| 0.2778 | 100 | 0.0615 | - | - |
|
429 |
+
| 0.5556 | 200 | 0.0336 | - | - |
|
430 |
+
| 0.8333 | 300 | 0.0331 | - | - |
|
431 |
+
| 1.1111 | 400 | 0.0235 | - | - |
|
432 |
+
| 1.3889 | 500 | 0.018 | 0.8472 | - |
|
433 |
+
| 1.6667 | 600 | 0.0164 | - | - |
|
434 |
+
| 1.9444 | 700 | 0.0159 | - | - |
|
435 |
+
| 2.2222 | 800 | 0.0097 | - | - |
|
436 |
+
| 2.5 | 900 | 0.0085 | - | - |
|
437 |
+
| 2.7778 | 1000 | 0.0084 | 0.8563 | - |
|
438 |
+
| 3.0556 | 1100 | 0.0076 | - | - |
|
439 |
+
| 3.3333 | 1200 | 0.0056 | - | - |
|
440 |
+
| 3.6111 | 1300 | 0.0054 | - | - |
|
441 |
+
| 3.8889 | 1400 | 0.0052 | - | - |
|
442 |
+
| 4.1667 | 1500 | 0.0047 | 0.8589 | - |
|
443 |
+
| 4.4444 | 1600 | 0.0045 | - | - |
|
444 |
+
| 4.7222 | 1700 | 0.004 | - | - |
|
445 |
+
| 5.0 | 1800 | 0.0042 | - | 0.8123 |
|
446 |
+
|
447 |
+
|
448 |
+
### Framework Versions
|
449 |
+
- Python: 3.10.13
|
450 |
+
- Sentence Transformers: 3.0.1
|
451 |
+
- Transformers: 4.42.4
|
452 |
+
- PyTorch: 2.0.1+cu117
|
453 |
+
- Accelerate: 0.32.1
|
454 |
+
- Datasets: 2.17.0
|
455 |
+
- Tokenizers: 0.19.1
|
456 |
+
|
457 |
+
## Citation
|
458 |
+
|
459 |
+
### BibTeX
|
460 |
+
|
461 |
+
#### Sentence Transformers
|
462 |
+
```bibtex
|
463 |
+
@inproceedings{reimers-2019-sentence-bert,
|
464 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
465 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
466 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
467 |
+
month = "11",
|
468 |
+
year = "2019",
|
469 |
+
publisher = "Association for Computational Linguistics",
|
470 |
+
url = "https://arxiv.org/abs/1908.10084",
|
471 |
+
}
|
472 |
+
```
|
473 |
+
|
474 |
+
<!--
|
475 |
+
## Glossary
|
476 |
+
|
477 |
+
*Clearly define terms in order to be accessible across audiences.*
|
478 |
+
-->
|
479 |
+
|
480 |
+
<!--
|
481 |
+
## Model Card Authors
|
482 |
+
|
483 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
484 |
+
-->
|
485 |
+
|
486 |
+
<!--
|
487 |
+
## Model Card Contact
|
488 |
+
|
489 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
490 |
-->
|