ictumuk commited on
Commit
eb8f16f
1 Parent(s): 438f864

Add new SentenceTransformer model.

Browse files
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,909 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: sentence-transformers
6
+ tags:
7
+ - sentence-transformers
8
+ - sentence-similarity
9
+ - feature-extraction
10
+ - generated_from_trainer
11
+ - dataset_size:2720
12
+ - loss:MatryoshkaLoss
13
+ - loss:MultipleNegativesRankingLoss
14
+ base_model: keepitreal/vietnamese-sbert
15
+ datasets: []
16
+ metrics:
17
+ - cosine_accuracy@1
18
+ - cosine_accuracy@3
19
+ - cosine_accuracy@5
20
+ - cosine_accuracy@10
21
+ - cosine_precision@1
22
+ - cosine_precision@3
23
+ - cosine_precision@5
24
+ - cosine_precision@10
25
+ - cosine_recall@1
26
+ - cosine_recall@3
27
+ - cosine_recall@5
28
+ - cosine_recall@10
29
+ - cosine_ndcg@10
30
+ - cosine_mrr@10
31
+ - cosine_map@100
32
+ widget:
33
+ - source_sentence: 'Tại Bộ phận Một cửa: Bố trí khu vực cung cấp thông tin, thủ tục
34
+ hành chính; khu vực tiếp nhận và trả kết quả được chia thành từng quầy tương ứng
35
+ với từng lĩnh vực khác nhau; bố trí đủ ghế ngồi chờ, bàn để viết, máy tính có
36
+ kết nối mạng dành cho tổ chức, cá nhân đến giao dịch, thực hiện dịch vụ công trực
37
+ tuyến; lắp đặt camera theo dõi toàn bộ khu vực làm việc của Bộ phận Một cửa có
38
+ kết nối với cơ quan nhà nước cấp trên và trong toàn hệ thống; bố trí khu vực đặt
39
+ các trang thiết bị: máy lấy số xếp hàng tự động kết nối tới Hệ thống thông tin
40
+ một cửa điện tử; các màn hình cảm ứng phục vụ tổ chức, cá nhân tra cứu thông tin,
41
+ thủ tục hành chính, tra cứu kết quả giải quyết thủ tục hành chính; bố trí khu
42
+ vực cung cấp dịch vụ quy định tại điểm g Khoản 1 Điều 8 Nghị định này.'
43
+ sentences:
44
+ - Bộ phận một cửa của UBND xã phải được bố trí những trang thiết bị nào?
45
+ - Tổ chức thẩm định kết quả pháp điển hệ thống quy phạm pháp luật tại Bộ Tư pháp
46
+ được quy định như thế nào?
47
+ - Có được đọc, sử dụng thánh kinh trong trại giam không?
48
+ - source_sentence: "Cơ sở sản xuất được rút tên khỏi Danh sách cơ sở sản xuất có thuốc\
49
+ \ vi phạm chất lượng khi đáp ứng đầy đủ các quy định sau đây: \na) Cơ sở nhập\
50
+ \ khẩu thực hiện đầy đủ việc kiểm nghiệm thuốc trước khi đưa ra lưu hành theo\
51
+ \ thời hạn quy định tại Khoản 1 Điều này; \nb) Cơ sở sản xuất hoặc cơ sở đăng\
52
+ \ ký thuốc có báo cáo theo quy định tại Mẫu số 07 Phụ lục III ban hành kèm theo\
53
+ \ Thông tư này, kèm theo bằng chứng thực hiện việc kiểm nghiệm toàn bộ các lô\
54
+ \ thuốc nhập khẩu vào Việt Nam trong thời hạn thực hiện quy định tại Khoản 1 Điều\
55
+ \ này; \nc) Cơ sở sản xuất không có vi phạm chất lượng thuốc (kể cả thu hồi thuốc\
56
+ \ theo hình thức tự nguyện vì lý do chất lượng) trong thời hạn thực hiện quy định\
57
+ \ tại Khoản 1 Điều này."
58
+ sentences:
59
+ - Đi du học 2 năm có bị xóa tên trong sổ đăng ký tạm trú không?
60
+ - Điều kiện để cơ sở sản xuất được rút tên khỏi Danh sách cơ sở sản xuất có thuốc
61
+ vi phạm chất lượng được quy định như thế nào?
62
+ - Thế nào là kinh doanh vận tải khách du lịch bằng xe ô tô?
63
+ - source_sentence: '"k) Cơ sở đã được cấp một trong các Giấy chứng nhận: ... Hệ thống
64
+ quản lý an toàn thực phẩm ISO 22000, ... hoặc tương đương còn hiệu lực."'
65
+ sentences:
66
+ - Thế nào là phương thức khớp lệnh tập trung?
67
+ - Đã có giấy chứng nhận ISO có phải xin giấy chứng nhận cơ sở đủ điều kiện an toàn
68
+ thực phẩm không?
69
+ - Hợp đồng tặng cho bất động sản có hiệu lực từ khi nào?
70
+ - source_sentence: 'Hồ sơ nhập khẩu thức ăn chăn nuôi để giới thiệu tại hội chợ, triển
71
+ lãm bao gồm:
72
+
73
+ a) Đơn đề nghị nhập khẩu thức ăn chăn nuôi để giới thiệu tại hội chợ, triển lãm
74
+ theo Mẫu số 07.TACN Phụ lục I ban hành kèm theo Nghị định này;
75
+
76
+ b) Văn bản chứng minh về việc tổ chức, tham gia hội chợ, triển lãm tại Việt Nam.'
77
+ sentences:
78
+ - Quy định về hồ sơ nhập khẩu thức ăn chăn nuôi để giới thiệu tại hội chợ, triển
79
+ lãm
80
+ - Mức phạt người điều khiển ô tô sử dụng tem kiểm định an toàn kỹ thuật và BVMT
81
+ không do cơ quan có thẩm quyền cấp
82
+ - Xác định mục tiêu, thời hạn của chương trình quản lý tổng hợp tài nguyên vùng
83
+ bờ được quy định như thế nào?
84
+ - source_sentence: Trường hợp bảo đảm bằng quyền sử dụng đất, tài sản gắn liền với
85
+ đất thì hợp đồng thế chấp v���n còn hiệu lực, biện pháp thế chấp vẫn còn hiệu lực
86
+ đối kháng với người thứ ba khi tài sản gắn liền với đất hoặc quyền sử dụng đất
87
+ không phải là tài sản bảo đảm được mua bán, được chuyển nhượng, được chuyển giao
88
+ khác về quyền sở hữu hoặc được dùng để bảo đảm thực hiện nghĩa vụ. Hiệu lực của
89
+ hợp đồng bảo đảm, hiệu lực đối kháng của biện pháp bảo đảm bằng tài sản được tạo
90
+ lập từ quyền bề mặt, quyền hưởng dụng với người thứ ba không thay đổi hoặc không
91
+ chấm dứt trong trường hợp quyền sử dụng đất có quyền bề mặt, tài sản là đối tượng
92
+ của quyền hưởng dụng được mua bán, được chuyển nhượng, được chuyển giao khác về
93
+ quyền sở hữu hoặc được dùng để bảo đảm thực hiện nghĩa vụ.
94
+ sentences:
95
+ - Thời hạn hủy bỏ quyết định tạm đình chỉ liên quan đến tham nhũng được quy định
96
+ như thế nào?
97
+ - Bảo đảm bằng quyền sử dụng đất, tài sản gắn liền với đất và tài sản được tạo lập
98
+ từ quyền bề mặt, quyền hưởng dụng được quy định như thế nào?
99
+ - Phòng Kinh tế thuộc UBND huyện được giao quản lý về thú y có được thu phí, lệ
100
+ phí thú y không?
101
+ pipeline_tag: sentence-similarity
102
+ model-index:
103
+ - name: Legal vietnamese-sbert
104
+ results:
105
+ - task:
106
+ type: information-retrieval
107
+ name: Information Retrieval
108
+ dataset:
109
+ name: dim 768
110
+ type: dim_768
111
+ metrics:
112
+ - type: cosine_accuracy@1
113
+ value: 0.6105610561056105
114
+ name: Cosine Accuracy@1
115
+ - type: cosine_accuracy@3
116
+ value: 0.7557755775577558
117
+ name: Cosine Accuracy@3
118
+ - type: cosine_accuracy@5
119
+ value: 0.7887788778877888
120
+ name: Cosine Accuracy@5
121
+ - type: cosine_accuracy@10
122
+ value: 0.834983498349835
123
+ name: Cosine Accuracy@10
124
+ - type: cosine_precision@1
125
+ value: 0.6105610561056105
126
+ name: Cosine Precision@1
127
+ - type: cosine_precision@3
128
+ value: 0.2519251925192519
129
+ name: Cosine Precision@3
130
+ - type: cosine_precision@5
131
+ value: 0.15775577557755774
132
+ name: Cosine Precision@5
133
+ - type: cosine_precision@10
134
+ value: 0.08349834983498348
135
+ name: Cosine Precision@10
136
+ - type: cosine_recall@1
137
+ value: 0.6105610561056105
138
+ name: Cosine Recall@1
139
+ - type: cosine_recall@3
140
+ value: 0.7557755775577558
141
+ name: Cosine Recall@3
142
+ - type: cosine_recall@5
143
+ value: 0.7887788778877888
144
+ name: Cosine Recall@5
145
+ - type: cosine_recall@10
146
+ value: 0.834983498349835
147
+ name: Cosine Recall@10
148
+ - type: cosine_ndcg@10
149
+ value: 0.7257394196122352
150
+ name: Cosine Ndcg@10
151
+ - type: cosine_mrr@10
152
+ value: 0.6905364345958406
153
+ name: Cosine Mrr@10
154
+ - type: cosine_map@100
155
+ value: 0.6948809217615789
156
+ name: Cosine Map@100
157
+ - task:
158
+ type: information-retrieval
159
+ name: Information Retrieval
160
+ dataset:
161
+ name: dim 512
162
+ type: dim_512
163
+ metrics:
164
+ - type: cosine_accuracy@1
165
+ value: 0.6072607260726073
166
+ name: Cosine Accuracy@1
167
+ - type: cosine_accuracy@3
168
+ value: 0.7524752475247525
169
+ name: Cosine Accuracy@3
170
+ - type: cosine_accuracy@5
171
+ value: 0.7854785478547854
172
+ name: Cosine Accuracy@5
173
+ - type: cosine_accuracy@10
174
+ value: 0.8283828382838284
175
+ name: Cosine Accuracy@10
176
+ - type: cosine_precision@1
177
+ value: 0.6072607260726073
178
+ name: Cosine Precision@1
179
+ - type: cosine_precision@3
180
+ value: 0.25082508250825075
181
+ name: Cosine Precision@3
182
+ - type: cosine_precision@5
183
+ value: 0.15709570957095706
184
+ name: Cosine Precision@5
185
+ - type: cosine_precision@10
186
+ value: 0.08283828382838283
187
+ name: Cosine Precision@10
188
+ - type: cosine_recall@1
189
+ value: 0.6072607260726073
190
+ name: Cosine Recall@1
191
+ - type: cosine_recall@3
192
+ value: 0.7524752475247525
193
+ name: Cosine Recall@3
194
+ - type: cosine_recall@5
195
+ value: 0.7854785478547854
196
+ name: Cosine Recall@5
197
+ - type: cosine_recall@10
198
+ value: 0.8283828382838284
199
+ name: Cosine Recall@10
200
+ - type: cosine_ndcg@10
201
+ value: 0.72090653484064
202
+ name: Cosine Ndcg@10
203
+ - type: cosine_mrr@10
204
+ value: 0.6861739745403111
205
+ name: Cosine Mrr@10
206
+ - type: cosine_map@100
207
+ value: 0.6912926659337115
208
+ name: Cosine Map@100
209
+ - task:
210
+ type: information-retrieval
211
+ name: Information Retrieval
212
+ dataset:
213
+ name: dim 256
214
+ type: dim_256
215
+ metrics:
216
+ - type: cosine_accuracy@1
217
+ value: 0.5742574257425742
218
+ name: Cosine Accuracy@1
219
+ - type: cosine_accuracy@3
220
+ value: 0.7425742574257426
221
+ name: Cosine Accuracy@3
222
+ - type: cosine_accuracy@5
223
+ value: 0.7788778877887789
224
+ name: Cosine Accuracy@5
225
+ - type: cosine_accuracy@10
226
+ value: 0.8250825082508251
227
+ name: Cosine Accuracy@10
228
+ - type: cosine_precision@1
229
+ value: 0.5742574257425742
230
+ name: Cosine Precision@1
231
+ - type: cosine_precision@3
232
+ value: 0.24752475247524747
233
+ name: Cosine Precision@3
234
+ - type: cosine_precision@5
235
+ value: 0.15577557755775576
236
+ name: Cosine Precision@5
237
+ - type: cosine_precision@10
238
+ value: 0.08250825082508248
239
+ name: Cosine Precision@10
240
+ - type: cosine_recall@1
241
+ value: 0.5742574257425742
242
+ name: Cosine Recall@1
243
+ - type: cosine_recall@3
244
+ value: 0.7425742574257426
245
+ name: Cosine Recall@3
246
+ - type: cosine_recall@5
247
+ value: 0.7788778877887789
248
+ name: Cosine Recall@5
249
+ - type: cosine_recall@10
250
+ value: 0.8250825082508251
251
+ name: Cosine Recall@10
252
+ - type: cosine_ndcg@10
253
+ value: 0.7044686281966969
254
+ name: Cosine Ndcg@10
255
+ - type: cosine_mrr@10
256
+ value: 0.6654683325475405
257
+ name: Cosine Mrr@10
258
+ - type: cosine_map@100
259
+ value: 0.6705497333666119
260
+ name: Cosine Map@100
261
+ - task:
262
+ type: information-retrieval
263
+ name: Information Retrieval
264
+ dataset:
265
+ name: dim 128
266
+ type: dim_128
267
+ metrics:
268
+ - type: cosine_accuracy@1
269
+ value: 0.570957095709571
270
+ name: Cosine Accuracy@1
271
+ - type: cosine_accuracy@3
272
+ value: 0.7062706270627063
273
+ name: Cosine Accuracy@3
274
+ - type: cosine_accuracy@5
275
+ value: 0.7557755775577558
276
+ name: Cosine Accuracy@5
277
+ - type: cosine_accuracy@10
278
+ value: 0.8118811881188119
279
+ name: Cosine Accuracy@10
280
+ - type: cosine_precision@1
281
+ value: 0.570957095709571
282
+ name: Cosine Precision@1
283
+ - type: cosine_precision@3
284
+ value: 0.23542354235423535
285
+ name: Cosine Precision@3
286
+ - type: cosine_precision@5
287
+ value: 0.15115511551155114
288
+ name: Cosine Precision@5
289
+ - type: cosine_precision@10
290
+ value: 0.08118811881188116
291
+ name: Cosine Precision@10
292
+ - type: cosine_recall@1
293
+ value: 0.570957095709571
294
+ name: Cosine Recall@1
295
+ - type: cosine_recall@3
296
+ value: 0.7062706270627063
297
+ name: Cosine Recall@3
298
+ - type: cosine_recall@5
299
+ value: 0.7557755775577558
300
+ name: Cosine Recall@5
301
+ - type: cosine_recall@10
302
+ value: 0.8118811881188119
303
+ name: Cosine Recall@10
304
+ - type: cosine_ndcg@10
305
+ value: 0.6904548657504692
306
+ name: Cosine Ndcg@10
307
+ - type: cosine_mrr@10
308
+ value: 0.6517208863743519
309
+ name: Cosine Mrr@10
310
+ - type: cosine_map@100
311
+ value: 0.6569610011044806
312
+ name: Cosine Map@100
313
+ - task:
314
+ type: information-retrieval
315
+ name: Information Retrieval
316
+ dataset:
317
+ name: dim 64
318
+ type: dim_64
319
+ metrics:
320
+ - type: cosine_accuracy@1
321
+ value: 0.5346534653465347
322
+ name: Cosine Accuracy@1
323
+ - type: cosine_accuracy@3
324
+ value: 0.7029702970297029
325
+ name: Cosine Accuracy@3
326
+ - type: cosine_accuracy@5
327
+ value: 0.7491749174917491
328
+ name: Cosine Accuracy@5
329
+ - type: cosine_accuracy@10
330
+ value: 0.801980198019802
331
+ name: Cosine Accuracy@10
332
+ - type: cosine_precision@1
333
+ value: 0.5346534653465347
334
+ name: Cosine Precision@1
335
+ - type: cosine_precision@3
336
+ value: 0.23432343234323427
337
+ name: Cosine Precision@3
338
+ - type: cosine_precision@5
339
+ value: 0.1498349834983498
340
+ name: Cosine Precision@5
341
+ - type: cosine_precision@10
342
+ value: 0.08019801980198019
343
+ name: Cosine Precision@10
344
+ - type: cosine_recall@1
345
+ value: 0.5346534653465347
346
+ name: Cosine Recall@1
347
+ - type: cosine_recall@3
348
+ value: 0.7029702970297029
349
+ name: Cosine Recall@3
350
+ - type: cosine_recall@5
351
+ value: 0.7491749174917491
352
+ name: Cosine Recall@5
353
+ - type: cosine_recall@10
354
+ value: 0.801980198019802
355
+ name: Cosine Recall@10
356
+ - type: cosine_ndcg@10
357
+ value: 0.670267766192947
358
+ name: Cosine Ndcg@10
359
+ - type: cosine_mrr@10
360
+ value: 0.628023992875478
361
+ name: Cosine Mrr@10
362
+ - type: cosine_map@100
363
+ value: 0.6331293046972268
364
+ name: Cosine Map@100
365
+ ---
366
+
367
+ # Legal vietnamese-sbert
368
+
369
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [keepitreal/vietnamese-sbert](https://huggingface.co/keepitreal/vietnamese-sbert). 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.
370
+
371
+ ## Model Details
372
+
373
+ ### Model Description
374
+ - **Model Type:** Sentence Transformer
375
+ - **Base model:** [keepitreal/vietnamese-sbert](https://huggingface.co/keepitreal/vietnamese-sbert) <!-- at revision a9467ef2ef47caa6448edeabfd8e5e5ce0fa2a23 -->
376
+ - **Maximum Sequence Length:** 256 tokens
377
+ - **Output Dimensionality:** 768 tokens
378
+ - **Similarity Function:** Cosine Similarity
379
+ <!-- - **Training Dataset:** Unknown -->
380
+ - **Language:** en
381
+ - **License:** apache-2.0
382
+
383
+ ### Model Sources
384
+
385
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
386
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
387
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
388
+
389
+ ### Full Model Architecture
390
+
391
+ ```
392
+ SentenceTransformer(
393
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: RobertaModel
394
+ (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})
395
+ )
396
+ ```
397
+
398
+ ## Usage
399
+
400
+ ### Direct Usage (Sentence Transformers)
401
+
402
+ First install the Sentence Transformers library:
403
+
404
+ ```bash
405
+ pip install -U sentence-transformers
406
+ ```
407
+
408
+ Then you can load this model and run inference.
409
+ ```python
410
+ from sentence_transformers import SentenceTransformer
411
+
412
+ # Download from the 🤗 Hub
413
+ model = SentenceTransformer("ictumuk/legal-vietnamese-sbert")
414
+ # Run inference
415
+ sentences = [
416
+ 'Trường hợp bảo đảm bằng quyền sử dụng đất, tài sản gắn liền với đất thì hợp đồng thế chấp vẫn còn hiệu lực, biện pháp thế chấp vẫn còn hiệu lực đối kháng với người thứ ba khi tài sản gắn liền với đất hoặc quyền sử dụng đất không phải là tài sản bảo đảm được mua bán, được chuyển nhượng, được chuyển giao khác về quyền sở hữu hoặc được dùng để bảo đảm thực hiện nghĩa vụ. Hiệu lực của hợp đồng bảo đảm, hiệu lực đối kháng của biện pháp bảo đảm bằng tài sản được tạo lập từ quyền bề mặt, quyền hưởng dụng với người thứ ba không thay đổi hoặc không chấm dứt trong trường hợp quyền sử dụng đất có quyền bề mặt, tài sản là đối tượng của quyền hưởng dụng được mua bán, được chuyển nhượng, được chuyển giao khác về quyền sở hữu hoặc được dùng để bảo đảm thực hiện nghĩa vụ.',
417
+ 'Bảo đảm bằng quyền sử dụng đất, tài sản gắn liền với đất và tài sản được tạo lập từ quyền bề mặt, quyền hưởng dụng được quy định như thế nào?',
418
+ 'Thời hạn hủy bỏ quyết định tạm đình chỉ liên quan đến tham nhũng được quy định như thế nào?',
419
+ ]
420
+ embeddings = model.encode(sentences)
421
+ print(embeddings.shape)
422
+ # [3, 768]
423
+
424
+ # Get the similarity scores for the embeddings
425
+ similarities = model.similarity(embeddings, embeddings)
426
+ print(similarities.shape)
427
+ # [3, 3]
428
+ ```
429
+
430
+ <!--
431
+ ### Direct Usage (Transformers)
432
+
433
+ <details><summary>Click to see the direct usage in Transformers</summary>
434
+
435
+ </details>
436
+ -->
437
+
438
+ <!--
439
+ ### Downstream Usage (Sentence Transformers)
440
+
441
+ You can finetune this model on your own dataset.
442
+
443
+ <details><summary>Click to expand</summary>
444
+
445
+ </details>
446
+ -->
447
+
448
+ <!--
449
+ ### Out-of-Scope Use
450
+
451
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
452
+ -->
453
+
454
+ ## Evaluation
455
+
456
+ ### Metrics
457
+
458
+ #### Information Retrieval
459
+ * Dataset: `dim_768`
460
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
461
+
462
+ | Metric | Value |
463
+ |:--------------------|:-----------|
464
+ | cosine_accuracy@1 | 0.6106 |
465
+ | cosine_accuracy@3 | 0.7558 |
466
+ | cosine_accuracy@5 | 0.7888 |
467
+ | cosine_accuracy@10 | 0.835 |
468
+ | cosine_precision@1 | 0.6106 |
469
+ | cosine_precision@3 | 0.2519 |
470
+ | cosine_precision@5 | 0.1578 |
471
+ | cosine_precision@10 | 0.0835 |
472
+ | cosine_recall@1 | 0.6106 |
473
+ | cosine_recall@3 | 0.7558 |
474
+ | cosine_recall@5 | 0.7888 |
475
+ | cosine_recall@10 | 0.835 |
476
+ | cosine_ndcg@10 | 0.7257 |
477
+ | cosine_mrr@10 | 0.6905 |
478
+ | **cosine_map@100** | **0.6949** |
479
+
480
+ #### Information Retrieval
481
+ * Dataset: `dim_512`
482
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
483
+
484
+ | Metric | Value |
485
+ |:--------------------|:-----------|
486
+ | cosine_accuracy@1 | 0.6073 |
487
+ | cosine_accuracy@3 | 0.7525 |
488
+ | cosine_accuracy@5 | 0.7855 |
489
+ | cosine_accuracy@10 | 0.8284 |
490
+ | cosine_precision@1 | 0.6073 |
491
+ | cosine_precision@3 | 0.2508 |
492
+ | cosine_precision@5 | 0.1571 |
493
+ | cosine_precision@10 | 0.0828 |
494
+ | cosine_recall@1 | 0.6073 |
495
+ | cosine_recall@3 | 0.7525 |
496
+ | cosine_recall@5 | 0.7855 |
497
+ | cosine_recall@10 | 0.8284 |
498
+ | cosine_ndcg@10 | 0.7209 |
499
+ | cosine_mrr@10 | 0.6862 |
500
+ | **cosine_map@100** | **0.6913** |
501
+
502
+ #### Information Retrieval
503
+ * Dataset: `dim_256`
504
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
505
+
506
+ | Metric | Value |
507
+ |:--------------------|:-----------|
508
+ | cosine_accuracy@1 | 0.5743 |
509
+ | cosine_accuracy@3 | 0.7426 |
510
+ | cosine_accuracy@5 | 0.7789 |
511
+ | cosine_accuracy@10 | 0.8251 |
512
+ | cosine_precision@1 | 0.5743 |
513
+ | cosine_precision@3 | 0.2475 |
514
+ | cosine_precision@5 | 0.1558 |
515
+ | cosine_precision@10 | 0.0825 |
516
+ | cosine_recall@1 | 0.5743 |
517
+ | cosine_recall@3 | 0.7426 |
518
+ | cosine_recall@5 | 0.7789 |
519
+ | cosine_recall@10 | 0.8251 |
520
+ | cosine_ndcg@10 | 0.7045 |
521
+ | cosine_mrr@10 | 0.6655 |
522
+ | **cosine_map@100** | **0.6705** |
523
+
524
+ #### Information Retrieval
525
+ * Dataset: `dim_128`
526
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
527
+
528
+ | Metric | Value |
529
+ |:--------------------|:----------|
530
+ | cosine_accuracy@1 | 0.571 |
531
+ | cosine_accuracy@3 | 0.7063 |
532
+ | cosine_accuracy@5 | 0.7558 |
533
+ | cosine_accuracy@10 | 0.8119 |
534
+ | cosine_precision@1 | 0.571 |
535
+ | cosine_precision@3 | 0.2354 |
536
+ | cosine_precision@5 | 0.1512 |
537
+ | cosine_precision@10 | 0.0812 |
538
+ | cosine_recall@1 | 0.571 |
539
+ | cosine_recall@3 | 0.7063 |
540
+ | cosine_recall@5 | 0.7558 |
541
+ | cosine_recall@10 | 0.8119 |
542
+ | cosine_ndcg@10 | 0.6905 |
543
+ | cosine_mrr@10 | 0.6517 |
544
+ | **cosine_map@100** | **0.657** |
545
+
546
+ #### Information Retrieval
547
+ * Dataset: `dim_64`
548
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
549
+
550
+ | Metric | Value |
551
+ |:--------------------|:-----------|
552
+ | cosine_accuracy@1 | 0.5347 |
553
+ | cosine_accuracy@3 | 0.703 |
554
+ | cosine_accuracy@5 | 0.7492 |
555
+ | cosine_accuracy@10 | 0.802 |
556
+ | cosine_precision@1 | 0.5347 |
557
+ | cosine_precision@3 | 0.2343 |
558
+ | cosine_precision@5 | 0.1498 |
559
+ | cosine_precision@10 | 0.0802 |
560
+ | cosine_recall@1 | 0.5347 |
561
+ | cosine_recall@3 | 0.703 |
562
+ | cosine_recall@5 | 0.7492 |
563
+ | cosine_recall@10 | 0.802 |
564
+ | cosine_ndcg@10 | 0.6703 |
565
+ | cosine_mrr@10 | 0.628 |
566
+ | **cosine_map@100** | **0.6331** |
567
+
568
+ <!--
569
+ ## Bias, Risks and Limitations
570
+
571
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
572
+ -->
573
+
574
+ <!--
575
+ ### Recommendations
576
+
577
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
578
+ -->
579
+
580
+ ## Training Details
581
+
582
+ ### Training Dataset
583
+
584
+ #### Unnamed Dataset
585
+
586
+
587
+ * Size: 2,720 training samples
588
+ * Columns: <code>positive</code> and <code>anchor</code>
589
+ * Approximate statistics based on the first 1000 samples:
590
+ | | positive | anchor |
591
+ |:--------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
592
+ | type | string | string |
593
+ | details | <ul><li>min: 5 tokens</li><li>mean: 75.95 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 24.4 tokens</li><li>max: 56 tokens</li></ul> |
594
+ * Samples:
595
+ | positive | anchor |
596
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------|
597
+ | <code>Mỗi năm có thể được rút ngắn thời gian thử thách 01 lần từ 03 tháng đến 02 năm.</code> | <code>01 lần rút ngắn thời gian thử thách được bao nhiêu ngày?</code> |
598
+ | <code>Đánh giá tác động của biến đổi khí hậu đến hoạt động kinh tế - xã hội và các vấn đề liên ngành, liên vùng, liên lĩnh vực, bao gồm các nội dung sau: <br>a) Đánh giá các tác động tích cực, tiêu cực, ngắn hạn, dài hạn của biến đổi khí hậu đến hoạt động kinh tế - xã hội liên quan đến phạm vi của chiến lược, quy hoạch, kế hoạch; <br>b) Đánh giá tác động tích cực, tiêu cực, ngắn hạn, dài hạn của biến đổi khí hậu đến các vấn đề liên ngành, liên vùng, liên lĩnh vực.</code> | <code>Nội dung đánh giá tác động của biến đổi khí hậu đến hoạt động kinh tế - xã hội được quy định như thế nào?</code> |
599
+ | <code>Không có thông tin liên quan tới trách nhiệm của Ngân hàng nhà nước trong hai đoạn văn trên. Hai đoạn văn trên chỉ đề cập tới việc thực hiện xác nhận đăng ký hoặc đăng ký thay đổi khoản vay nước ngoài được Chính phủ bảo lãnh và cập nhật thông tin tín dụng Quốc gia Việt Nam.</code> | <code>Trách nhiệm của Ngân hàng nhà nước liên quan tới bảo lãnh Chính phủ được quy định như thế nào?</code> |
600
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
601
+ ```json
602
+ {
603
+ "loss": "MultipleNegativesRankingLoss",
604
+ "matryoshka_dims": [
605
+ 768,
606
+ 512,
607
+ 256,
608
+ 128,
609
+ 64
610
+ ],
611
+ "matryoshka_weights": [
612
+ 1,
613
+ 1,
614
+ 1,
615
+ 1,
616
+ 1
617
+ ],
618
+ "n_dims_per_step": -1
619
+ }
620
+ ```
621
+
622
+ ### Evaluation Dataset
623
+
624
+ #### Unnamed Dataset
625
+
626
+
627
+ * Size: 303 evaluation samples
628
+ * Columns: <code>positive</code> and <code>anchor</code>
629
+ * Approximate statistics based on the first 1000 samples:
630
+ | | positive | anchor |
631
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
632
+ | type | string | string |
633
+ | details | <ul><li>min: 4 tokens</li><li>mean: 77.76 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 24.18 tokens</li><li>max: 73 tokens</li></ul> |
634
+ * Samples:
635
+ | positive | anchor |
636
+ |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------|
637
+ | <code>Căn cứ lập hồ sơ mời thầu dự án đầu tư có sử dụng đất bao gồm:<br><br>a) Danh mục dự án đầu tư có sử dụng đất cần lựa chọn nhà đầu tư được công bố theo quy định;<br>b) Kế hoạch lựa chọn nhà đầu tư được duyệt;<br>c) Quy định hiện hành của pháp luật về đất đai, nhà ở, kinh doanh bất động s���n, đầu tư, xây dựng và quy định của pháp luật có liên quan.</code> | <code>Lập hồ sơ mời thầu dự án đầu tư có sử dụng đất dựa trên những căn cứ nào?</code> |
638
+ | <code>Phạt tiền từ 3.000.000 đồng đến 5.000.000 đồng đối với hành vi phá hoại cơ sở vật chất - kỹ thuật, kho bảo quản hàng dự trữ quốc gia.</code> | <code>Mức phạt đối với hành vi phá hoại kho bảo quản hàng dự trữ quốc gia được quy định như thế nào?</code> |
639
+ | <code>Hồ sơ đăng ký thành viên bù trừ bao gồm:<br><br>a) Giấy đăng ký thành viên bù trừ theo Mẫu số 48 Phụ lục ban hành kèm theo Nghị định này;<br>b) Giấy chứng nhận đủ điều kiện cung cấp dịch vụ bù trừ, thanh toán giao dịch chứng khoán do Ủy ban Chứng khoán Nhà nước cấp;<br>c) Bản thuyết minh về hạ tầng công nghệ thông tin, nhân sự, quy trình nghiệp vụ.</code> | <code>Hồ sơ về đăng ký thành viên bù trừ chứng khoán Việt Nam được quy định như thế nào?</code> |
640
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
641
+ ```json
642
+ {
643
+ "loss": "MultipleNegativesRankingLoss",
644
+ "matryoshka_dims": [
645
+ 768,
646
+ 512,
647
+ 256,
648
+ 128,
649
+ 64
650
+ ],
651
+ "matryoshka_weights": [
652
+ 1,
653
+ 1,
654
+ 1,
655
+ 1,
656
+ 1
657
+ ],
658
+ "n_dims_per_step": -1
659
+ }
660
+ ```
661
+
662
+ ### Training Hyperparameters
663
+ #### Non-Default Hyperparameters
664
+
665
+ - `eval_strategy`: epoch
666
+ - `per_device_train_batch_size`: 16
667
+ - `per_device_eval_batch_size`: 16
668
+ - `gradient_accumulation_steps`: 16
669
+ - `learning_rate`: 2e-05
670
+ - `num_train_epochs`: 25
671
+ - `lr_scheduler_type`: cosine
672
+ - `warmup_ratio`: 0.1
673
+ - `fp16`: True
674
+ - `load_best_model_at_end`: True
675
+ - `optim`: adamw_torch_fused
676
+ - `batch_sampler`: no_duplicates
677
+
678
+ #### All Hyperparameters
679
+ <details><summary>Click to expand</summary>
680
+
681
+ - `overwrite_output_dir`: False
682
+ - `do_predict`: False
683
+ - `eval_strategy`: epoch
684
+ - `prediction_loss_only`: True
685
+ - `per_device_train_batch_size`: 16
686
+ - `per_device_eval_batch_size`: 16
687
+ - `per_gpu_train_batch_size`: None
688
+ - `per_gpu_eval_batch_size`: None
689
+ - `gradient_accumulation_steps`: 16
690
+ - `eval_accumulation_steps`: None
691
+ - `learning_rate`: 2e-05
692
+ - `weight_decay`: 0.0
693
+ - `adam_beta1`: 0.9
694
+ - `adam_beta2`: 0.999
695
+ - `adam_epsilon`: 1e-08
696
+ - `max_grad_norm`: 1.0
697
+ - `num_train_epochs`: 25
698
+ - `max_steps`: -1
699
+ - `lr_scheduler_type`: cosine
700
+ - `lr_scheduler_kwargs`: {}
701
+ - `warmup_ratio`: 0.1
702
+ - `warmup_steps`: 0
703
+ - `log_level`: passive
704
+ - `log_level_replica`: warning
705
+ - `log_on_each_node`: True
706
+ - `logging_nan_inf_filter`: True
707
+ - `save_safetensors`: True
708
+ - `save_on_each_node`: False
709
+ - `save_only_model`: False
710
+ - `restore_callback_states_from_checkpoint`: False
711
+ - `no_cuda`: False
712
+ - `use_cpu`: False
713
+ - `use_mps_device`: False
714
+ - `seed`: 42
715
+ - `data_seed`: None
716
+ - `jit_mode_eval`: False
717
+ - `use_ipex`: False
718
+ - `bf16`: False
719
+ - `fp16`: True
720
+ - `fp16_opt_level`: O1
721
+ - `half_precision_backend`: auto
722
+ - `bf16_full_eval`: False
723
+ - `fp16_full_eval`: False
724
+ - `tf32`: None
725
+ - `local_rank`: 0
726
+ - `ddp_backend`: None
727
+ - `tpu_num_cores`: None
728
+ - `tpu_metrics_debug`: False
729
+ - `debug`: []
730
+ - `dataloader_drop_last`: False
731
+ - `dataloader_num_workers`: 0
732
+ - `dataloader_prefetch_factor`: None
733
+ - `past_index`: -1
734
+ - `disable_tqdm`: False
735
+ - `remove_unused_columns`: True
736
+ - `label_names`: None
737
+ - `load_best_model_at_end`: True
738
+ - `ignore_data_skip`: False
739
+ - `fsdp`: []
740
+ - `fsdp_min_num_params`: 0
741
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
742
+ - `fsdp_transformer_layer_cls_to_wrap`: None
743
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
744
+ - `deepspeed`: None
745
+ - `label_smoothing_factor`: 0.0
746
+ - `optim`: adamw_torch_fused
747
+ - `optim_args`: None
748
+ - `adafactor`: False
749
+ - `group_by_length`: False
750
+ - `length_column_name`: length
751
+ - `ddp_find_unused_parameters`: None
752
+ - `ddp_bucket_cap_mb`: None
753
+ - `ddp_broadcast_buffers`: False
754
+ - `dataloader_pin_memory`: True
755
+ - `dataloader_persistent_workers`: False
756
+ - `skip_memory_metrics`: True
757
+ - `use_legacy_prediction_loop`: False
758
+ - `push_to_hub`: False
759
+ - `resume_from_checkpoint`: None
760
+ - `hub_model_id`: None
761
+ - `hub_strategy`: every_save
762
+ - `hub_private_repo`: False
763
+ - `hub_always_push`: False
764
+ - `gradient_checkpointing`: False
765
+ - `gradient_checkpointing_kwargs`: None
766
+ - `include_inputs_for_metrics`: False
767
+ - `eval_do_concat_batches`: True
768
+ - `fp16_backend`: auto
769
+ - `push_to_hub_model_id`: None
770
+ - `push_to_hub_organization`: None
771
+ - `mp_parameters`:
772
+ - `auto_find_batch_size`: False
773
+ - `full_determinism`: False
774
+ - `torchdynamo`: None
775
+ - `ray_scope`: last
776
+ - `ddp_timeout`: 1800
777
+ - `torch_compile`: False
778
+ - `torch_compile_backend`: None
779
+ - `torch_compile_mode`: None
780
+ - `dispatch_batches`: None
781
+ - `split_batches`: None
782
+ - `include_tokens_per_second`: False
783
+ - `include_num_input_tokens_seen`: False
784
+ - `neftune_noise_alpha`: None
785
+ - `optim_target_modules`: None
786
+ - `batch_eval_metrics`: False
787
+ - `batch_sampler`: no_duplicates
788
+ - `multi_dataset_batch_sampler`: proportional
789
+
790
+ </details>
791
+
792
+ ### Training Logs
793
+ | Epoch | Step | Training Loss | loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_512_cosine_map@100 | dim_64_cosine_map@100 | dim_768_cosine_map@100 |
794
+ |:-----------:|:-------:|:-------------:|:----------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|:----------------------:|
795
+ | 0.9412 | 10 | 3.6588 | 2.3368 | 0.5313 | 0.5648 | 0.5747 | 0.4508 | 0.5856 |
796
+ | 1.8824 | 20 | 2.6403 | - | - | - | - | - | - |
797
+ | 1.9765 | 21 | - | 1.7613 | 0.5788 | 0.5934 | 0.6062 | 0.5009 | 0.6134 |
798
+ | 2.8235 | 30 | 1.7794 | - | - | - | - | - | - |
799
+ | 2.9176 | 31 | - | 1.5005 | 0.5999 | 0.6218 | 0.6274 | 0.5328 | 0.6299 |
800
+ | 3.7647 | 40 | 1.1983 | - | - | - | - | - | - |
801
+ | 3.9529 | 42 | - | 1.2607 | 0.6128 | 0.6384 | 0.6492 | 0.5776 | 0.6461 |
802
+ | 4.7059 | 50 | 0.8626 | - | - | - | - | - | - |
803
+ | 4.9882 | 53 | - | 1.1057 | 0.6176 | 0.6543 | 0.6542 | 0.5907 | 0.6591 |
804
+ | 5.6471 | 60 | 0.6381 | - | - | - | - | - | - |
805
+ | 5.9294 | 63 | - | 1.0423 | 0.6338 | 0.6678 | 0.6704 | 0.6151 | 0.6755 |
806
+ | 6.5882 | 70 | 0.4149 | - | - | - | - | - | - |
807
+ | 6.9647 | 74 | - | 0.8898 | 0.6350 | 0.6714 | 0.6828 | 0.6183 | 0.6739 |
808
+ | 7.5294 | 80 | 0.3352 | - | - | - | - | - | - |
809
+ | 8.0 | 85 | - | 0.9243 | 0.6468 | 0.6679 | 0.6845 | 0.6244 | 0.6743 |
810
+ | 8.4706 | 90 | 0.2603 | - | - | - | - | - | - |
811
+ | 8.9412 | 95 | - | 0.9162 | 0.6461 | 0.6758 | 0.6900 | 0.6247 | 0.6839 |
812
+ | 9.4118 | 100 | 0.2124 | - | - | - | - | - | - |
813
+ | 9.9765 | 106 | - | 0.8410 | 0.6428 | 0.6623 | 0.6839 | 0.6247 | 0.6810 |
814
+ | 10.3529 | 110 | 0.1555 | - | - | - | - | - | - |
815
+ | 10.9176 | 116 | - | 0.8458 | 0.6493 | 0.6660 | 0.6889 | 0.6271 | 0.6884 |
816
+ | 11.2941 | 120 | 0.1293 | - | - | - | - | - | - |
817
+ | 11.9529 | 127 | - | 0.8563 | 0.6477 | 0.6650 | 0.6850 | 0.6306 | 0.6898 |
818
+ | 12.2353 | 130 | 0.1059 | - | - | - | - | - | - |
819
+ | 12.9882 | 138 | - | 0.8598 | 0.6494 | 0.6703 | 0.6819 | 0.6217 | 0.6901 |
820
+ | 13.1765 | 140 | 0.1071 | - | - | - | - | - | - |
821
+ | 13.9294 | 148 | - | 0.8248 | 0.6519 | 0.6627 | 0.6786 | 0.6278 | 0.6923 |
822
+ | 14.1176 | 150 | 0.0876 | - | - | - | - | - | - |
823
+ | 14.9647 | 159 | - | 0.8213 | 0.6506 | 0.6693 | 0.6877 | 0.6342 | 0.6928 |
824
+ | 15.0588 | 160 | 0.0835 | - | - | - | - | - | - |
825
+ | 16.0 | 170 | 0.0685 | 0.8266 | 0.6515 | 0.6707 | 0.6835 | 0.6301 | 0.6953 |
826
+ | 16.9412 | 180 | 0.057 | 0.8119 | 0.6499 | 0.6714 | 0.6895 | 0.6305 | 0.6976 |
827
+ | 17.8824 | 190 | 0.0544 | - | - | - | - | - | - |
828
+ | 17.9765 | 191 | - | 0.8226 | 0.6538 | 0.6671 | 0.6883 | 0.6347 | 0.7000 |
829
+ | 18.8235 | 200 | 0.0586 | - | - | - | - | - | - |
830
+ | **18.9176** | **201** | **-** | **0.8241** | **0.6575** | **0.6716** | **0.6912** | **0.6324** | **0.6984** |
831
+ | 19.7647 | 210 | 0.0472 | - | - | - | - | - | - |
832
+ | 19.9529 | 212 | - | 0.8270 | 0.6553 | 0.6709 | 0.6913 | 0.6323 | 0.6948 |
833
+ | 20.7059 | 220 | 0.0487 | - | - | - | - | - | - |
834
+ | 20.9882 | 223 | - | 0.8276 | 0.6538 | 0.6727 | 0.6928 | 0.6325 | 0.6949 |
835
+ | 21.6471 | 230 | 0.046 | - | - | - | - | - | - |
836
+ | 21.9294 | 233 | - | 0.8278 | 0.6569 | 0.6705 | 0.6929 | 0.6314 | 0.6949 |
837
+ | 22.5882 | 240 | 0.0427 | - | - | - | - | - | - |
838
+ | 22.9647 | 244 | - | 0.8277 | 0.6569 | 0.6705 | 0.6929 | 0.6331 | 0.6949 |
839
+ | 23.5294 | 250 | 0.0466 | 0.8277 | 0.6570 | 0.6705 | 0.6913 | 0.6331 | 0.6949 |
840
+
841
+ * The bold row denotes the saved checkpoint.
842
+
843
+ ### Framework Versions
844
+ - Python: 3.10.13
845
+ - Sentence Transformers: 3.0.1
846
+ - Transformers: 4.41.2
847
+ - PyTorch: 2.1.2
848
+ - Accelerate: 0.30.1
849
+ - Datasets: 2.19.2
850
+ - Tokenizers: 0.19.1
851
+
852
+ ## Citation
853
+
854
+ ### BibTeX
855
+
856
+ #### Sentence Transformers
857
+ ```bibtex
858
+ @inproceedings{reimers-2019-sentence-bert,
859
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
860
+ author = "Reimers, Nils and Gurevych, Iryna",
861
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
862
+ month = "11",
863
+ year = "2019",
864
+ publisher = "Association for Computational Linguistics",
865
+ url = "https://arxiv.org/abs/1908.10084",
866
+ }
867
+ ```
868
+
869
+ #### MatryoshkaLoss
870
+ ```bibtex
871
+ @misc{kusupati2024matryoshka,
872
+ title={Matryoshka Representation Learning},
873
+ 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},
874
+ year={2024},
875
+ eprint={2205.13147},
876
+ archivePrefix={arXiv},
877
+ primaryClass={cs.LG}
878
+ }
879
+ ```
880
+
881
+ #### MultipleNegativesRankingLoss
882
+ ```bibtex
883
+ @misc{henderson2017efficient,
884
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
885
+ 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},
886
+ year={2017},
887
+ eprint={1705.00652},
888
+ archivePrefix={arXiv},
889
+ primaryClass={cs.CL}
890
+ }
891
+ ```
892
+
893
+ <!--
894
+ ## Glossary
895
+
896
+ *Clearly define terms in order to be accessible across audiences.*
897
+ -->
898
+
899
+ <!--
900
+ ## Model Card Authors
901
+
902
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
903
+ -->
904
+
905
+ <!--
906
+ ## Model Card Contact
907
+
908
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
909
+ -->
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<mask>": 64000
3
+ }
bpe.codes ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "keepitreal/vietnamese-sbert",
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
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 258,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "tokenizer_class": "PhobertTokenizer",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.41.2",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 64001
29
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2"
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:739cd7ec0167ca889677bbbdbafd63911058421b261c189a91fba6584b82aeba
3
+ size 540015464
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": 256,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": "<mask>",
6
+ "pad_token": "<pad>",
7
+ "sep_token": "</s>",
8
+ "unk_token": "<unk>"
9
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "64000": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 256,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "tokenizer_class": "PhobertTokenizer",
53
+ "unk_token": "<unk>"
54
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff