ritesh-07 commited on
Commit
4e482af
·
verified ·
1 Parent(s): 4a6ae49

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,752 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - nep
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:1046
11
+ - loss:MatryoshkaLoss
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: jangedoo/all-MiniLM-L6-v2-nepali
14
+ widget:
15
+ - source_sentence: राहदानीको लागि कागजात सत्यापनमा कस्तो मनोनयनपत्र चाहिन्छ?
16
+ sentences:
17
+ - सिम्यान्स अभिलेख किताबको लागि निवेदन फाराम अनुसूची-२क बमोजिमको ढाँचामा आधारित
18
+ हुन्छ।
19
+ - कुटनीतिक वा विशेष राहदानीको लागि कागजात सत्यापनमा सम्बन्धित पदमा नियुक्तिको मनोनयनपत्रको
20
+ प्रमाणित प्रतिलिपि चाहिन्छ।
21
+ - राहदानी रद्द गर्न महानिर्देशकले स्वीकृति दिन्छ।
22
+ - source_sentence: राहदानी वितरणमा त्रुटि सच्याउन कति समय लाग्छ?
23
+ sentences:
24
+ - राहदानी नियमावली, २०७७ मा अभिलेखको गोपनीयताको उल्लङ्घनको जाँचको नतिजाको अपीलको
25
+ नतिजाको कार्यान्वयनको अभिलेख बाह्र वर्षसम्म राखिन्छ।
26
+ - राहदानी वितरणमा त्रुटि सच्याउन सामान्यतः सात कार्यदिन लाग्छ, तर प्रक्रिया जटिल
27
+ भएमा बढी समय लाग्न सक्छ।
28
+ - राहदानीको लागि निवेदनमा जाँच गर्ने अधिकारीको नाम, सही, पद, र मिति उल्लेख गर्नुपर्छ।
29
+ - source_sentence: राहदानीको लागि निवेदनमा कस्तो आवेदन स्रोत उल्लेख गर्नुपर्छ?
30
+ sentences:
31
+ - राहदानीको लागि निवेदनमा आवेदन स्रोत (विभाग, जिल्ला, वा नियोग) उल्लेख गर्नुपर्छ।
32
+ - राहदानी बुझाउने प्रक्रियामा त्रुटि सच्याउन सामान्यतः सात कार्यदिन लाग्छ, तर प्रक्रिया
33
+ जटिल भएमा बढी समय लाग्न सक्छ।
34
+ - राहदानीको लिए अनलाइन निवेदनमा निकटतम व्यक्तिसँगको सम्बन्ध (Relationship) उल्लेख
35
+ गर्नुपर्छ।
36
+ - source_sentence: विशेष राहदानी कसलाई जारी गरिन्छ?
37
+ sentences:
38
+ - राहदानी रद्द गर्न बाहक वा सम्बन्धित निकायको लिखित निवेदन चाहिन्छ।
39
+ - राहदानी नियमावली, २०७७ मा अभिलेखको गोपनीयताको उल्लङ्घनको जाँचको नतिजाको अपीलको
40
+ लागि जाँच गर्ने अधिकारीको नाम, सही, पद, र मिति उल्लेख गर्नुपर्छ।
41
+ - विशेष राहदानी नगरपालिकाका प्रमुख, सहसचिव, जिल्ला न्यायाधीश, प्रदेश लोकसेवा आयोगका
42
+ सदस्य, लगायतका पदाधिकारीलाई जारी गरिन्छ।
43
+ - source_sentence: कुटनीतिक राहदानीको लागि निवेदनमा कस्तो ठेगाना विवरण चाहिन्छ?
44
+ sentences:
45
+ - कुटनीतिक राहदानीको लागि निवेदनमा जिल्ला, गाउँ/नगरपालिका, वडा नम्बर, गाउँ/सडक,
46
+ र घर नम्बरको ठेगाना विवरण चाहिन्छ।
47
+ - राहदानीको लागि कागजात धुल्याउने प्रक्रिया महानिर्देशकको स्वीकृतिमा हुन्छ।
48
+ - राहदानीको विद्युतीय अभिलेख अनुसूची-७ बमोजिमको ढाँचामा आधारित हुन्छ।
49
+ pipeline_tag: sentence-similarity
50
+ library_name: sentence-transformers
51
+ metrics:
52
+ - cosine_accuracy@1
53
+ - cosine_accuracy@3
54
+ - cosine_accuracy@5
55
+ - cosine_accuracy@10
56
+ - cosine_precision@1
57
+ - cosine_precision@3
58
+ - cosine_precision@5
59
+ - cosine_precision@10
60
+ - cosine_recall@1
61
+ - cosine_recall@3
62
+ - cosine_recall@5
63
+ - cosine_recall@10
64
+ - cosine_ndcg@10
65
+ - cosine_mrr@10
66
+ - cosine_map@100
67
+ model-index:
68
+ - name: sentenceTransformer_nepali_embedding
69
+ results:
70
+ - task:
71
+ type: information-retrieval
72
+ name: Information Retrieval
73
+ dataset:
74
+ name: dim 384
75
+ type: dim_384
76
+ metrics:
77
+ - type: cosine_accuracy@1
78
+ value: 0.41025641025641024
79
+ name: Cosine Accuracy@1
80
+ - type: cosine_accuracy@3
81
+ value: 0.6581196581196581
82
+ name: Cosine Accuracy@3
83
+ - type: cosine_accuracy@5
84
+ value: 0.7350427350427351
85
+ name: Cosine Accuracy@5
86
+ - type: cosine_accuracy@10
87
+ value: 0.8461538461538461
88
+ name: Cosine Accuracy@10
89
+ - type: cosine_precision@1
90
+ value: 0.41025641025641024
91
+ name: Cosine Precision@1
92
+ - type: cosine_precision@3
93
+ value: 0.21937321937321935
94
+ name: Cosine Precision@3
95
+ - type: cosine_precision@5
96
+ value: 0.14700854700854699
97
+ name: Cosine Precision@5
98
+ - type: cosine_precision@10
99
+ value: 0.0846153846153846
100
+ name: Cosine Precision@10
101
+ - type: cosine_recall@1
102
+ value: 0.41025641025641024
103
+ name: Cosine Recall@1
104
+ - type: cosine_recall@3
105
+ value: 0.6581196581196581
106
+ name: Cosine Recall@3
107
+ - type: cosine_recall@5
108
+ value: 0.7350427350427351
109
+ name: Cosine Recall@5
110
+ - type: cosine_recall@10
111
+ value: 0.8461538461538461
112
+ name: Cosine Recall@10
113
+ - type: cosine_ndcg@10
114
+ value: 0.6218282635615644
115
+ name: Cosine Ndcg@10
116
+ - type: cosine_mrr@10
117
+ value: 0.5504409171075837
118
+ name: Cosine Mrr@10
119
+ - type: cosine_map@100
120
+ value: 0.5571750406212126
121
+ name: Cosine Map@100
122
+ - task:
123
+ type: information-retrieval
124
+ name: Information Retrieval
125
+ dataset:
126
+ name: dim 256
127
+ type: dim_256
128
+ metrics:
129
+ - type: cosine_accuracy@1
130
+ value: 0.42735042735042733
131
+ name: Cosine Accuracy@1
132
+ - type: cosine_accuracy@3
133
+ value: 0.6410256410256411
134
+ name: Cosine Accuracy@3
135
+ - type: cosine_accuracy@5
136
+ value: 0.717948717948718
137
+ name: Cosine Accuracy@5
138
+ - type: cosine_accuracy@10
139
+ value: 0.8290598290598291
140
+ name: Cosine Accuracy@10
141
+ - type: cosine_precision@1
142
+ value: 0.42735042735042733
143
+ name: Cosine Precision@1
144
+ - type: cosine_precision@3
145
+ value: 0.21367521367521364
146
+ name: Cosine Precision@3
147
+ - type: cosine_precision@5
148
+ value: 0.14358974358974358
149
+ name: Cosine Precision@5
150
+ - type: cosine_precision@10
151
+ value: 0.08290598290598289
152
+ name: Cosine Precision@10
153
+ - type: cosine_recall@1
154
+ value: 0.42735042735042733
155
+ name: Cosine Recall@1
156
+ - type: cosine_recall@3
157
+ value: 0.6410256410256411
158
+ name: Cosine Recall@3
159
+ - type: cosine_recall@5
160
+ value: 0.717948717948718
161
+ name: Cosine Recall@5
162
+ - type: cosine_recall@10
163
+ value: 0.8290598290598291
164
+ name: Cosine Recall@10
165
+ - type: cosine_ndcg@10
166
+ value: 0.6159996592171239
167
+ name: Cosine Ndcg@10
168
+ - type: cosine_mrr@10
169
+ value: 0.5487959571292905
170
+ name: Cosine Mrr@10
171
+ - type: cosine_map@100
172
+ value: 0.5563599760664051
173
+ name: Cosine Map@100
174
+ - task:
175
+ type: information-retrieval
176
+ name: Information Retrieval
177
+ dataset:
178
+ name: dim 128
179
+ type: dim_128
180
+ metrics:
181
+ - type: cosine_accuracy@1
182
+ value: 0.39316239316239315
183
+ name: Cosine Accuracy@1
184
+ - type: cosine_accuracy@3
185
+ value: 0.5811965811965812
186
+ name: Cosine Accuracy@3
187
+ - type: cosine_accuracy@5
188
+ value: 0.6752136752136753
189
+ name: Cosine Accuracy@5
190
+ - type: cosine_accuracy@10
191
+ value: 0.8034188034188035
192
+ name: Cosine Accuracy@10
193
+ - type: cosine_precision@1
194
+ value: 0.39316239316239315
195
+ name: Cosine Precision@1
196
+ - type: cosine_precision@3
197
+ value: 0.19373219373219372
198
+ name: Cosine Precision@3
199
+ - type: cosine_precision@5
200
+ value: 0.135042735042735
201
+ name: Cosine Precision@5
202
+ - type: cosine_precision@10
203
+ value: 0.08034188034188033
204
+ name: Cosine Precision@10
205
+ - type: cosine_recall@1
206
+ value: 0.39316239316239315
207
+ name: Cosine Recall@1
208
+ - type: cosine_recall@3
209
+ value: 0.5811965811965812
210
+ name: Cosine Recall@3
211
+ - type: cosine_recall@5
212
+ value: 0.6752136752136753
213
+ name: Cosine Recall@5
214
+ - type: cosine_recall@10
215
+ value: 0.8034188034188035
216
+ name: Cosine Recall@10
217
+ - type: cosine_ndcg@10
218
+ value: 0.5799237272193319
219
+ name: Cosine Ndcg@10
220
+ - type: cosine_mrr@10
221
+ value: 0.5100054266720935
222
+ name: Cosine Mrr@10
223
+ - type: cosine_map@100
224
+ value: 0.5176470843483384
225
+ name: Cosine Map@100
226
+ - task:
227
+ type: information-retrieval
228
+ name: Information Retrieval
229
+ dataset:
230
+ name: dim 64
231
+ type: dim_64
232
+ metrics:
233
+ - type: cosine_accuracy@1
234
+ value: 0.38461538461538464
235
+ name: Cosine Accuracy@1
236
+ - type: cosine_accuracy@3
237
+ value: 0.5811965811965812
238
+ name: Cosine Accuracy@3
239
+ - type: cosine_accuracy@5
240
+ value: 0.6410256410256411
241
+ name: Cosine Accuracy@5
242
+ - type: cosine_accuracy@10
243
+ value: 0.7606837606837606
244
+ name: Cosine Accuracy@10
245
+ - type: cosine_precision@1
246
+ value: 0.38461538461538464
247
+ name: Cosine Precision@1
248
+ - type: cosine_precision@3
249
+ value: 0.1937321937321937
250
+ name: Cosine Precision@3
251
+ - type: cosine_precision@5
252
+ value: 0.12820512820512817
253
+ name: Cosine Precision@5
254
+ - type: cosine_precision@10
255
+ value: 0.07606837606837605
256
+ name: Cosine Precision@10
257
+ - type: cosine_recall@1
258
+ value: 0.38461538461538464
259
+ name: Cosine Recall@1
260
+ - type: cosine_recall@3
261
+ value: 0.5811965811965812
262
+ name: Cosine Recall@3
263
+ - type: cosine_recall@5
264
+ value: 0.6410256410256411
265
+ name: Cosine Recall@5
266
+ - type: cosine_recall@10
267
+ value: 0.7606837606837606
268
+ name: Cosine Recall@10
269
+ - type: cosine_ndcg@10
270
+ value: 0.565217766093051
271
+ name: Cosine Ndcg@10
272
+ - type: cosine_mrr@10
273
+ value: 0.5036663953330621
274
+ name: Cosine Mrr@10
275
+ - type: cosine_map@100
276
+ value: 0.5140223584530523
277
+ name: Cosine Map@100
278
+ ---
279
+
280
+ # sentenceTransformer_nepali_embedding
281
+
282
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [jangedoo/all-MiniLM-L6-v2-nepali](https://huggingface.co/jangedoo/all-MiniLM-L6-v2-nepali) on the json dataset. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
283
+
284
+ ## Model Details
285
+
286
+ ### Model Description
287
+ - **Model Type:** Sentence Transformer
288
+ - **Base model:** [jangedoo/all-MiniLM-L6-v2-nepali](https://huggingface.co/jangedoo/all-MiniLM-L6-v2-nepali) <!-- at revision 418f7cf08ecbbc2ff0e8460bb6eb6457291102df -->
289
+ - **Maximum Sequence Length:** 256 tokens
290
+ - **Output Dimensionality:** 384 dimensions
291
+ - **Similarity Function:** Cosine Similarity
292
+ - **Training Dataset:**
293
+ - json
294
+ - **Language:** nep
295
+ - **License:** apache-2.0
296
+
297
+ ### Model Sources
298
+
299
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
300
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
301
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
302
+
303
+ ### Full Model Architecture
304
+
305
+ ```
306
+ SentenceTransformer(
307
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
308
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
309
+ (2): Normalize()
310
+ )
311
+ ```
312
+
313
+ ## Usage
314
+
315
+ ### Direct Usage (Sentence Transformers)
316
+
317
+ First install the Sentence Transformers library:
318
+
319
+ ```bash
320
+ pip install -U sentence-transformers
321
+ ```
322
+
323
+ Then you can load this model and run inference.
324
+ ```python
325
+ from sentence_transformers import SentenceTransformer
326
+
327
+ # Download from the 🤗 Hub
328
+ model = SentenceTransformer("ritesh-07/fine_tuned_model_02")
329
+ # Run inference
330
+ sentences = [
331
+ 'कुटनीतिक राहदानीको लागि निवेदनमा कस्तो ठेगाना विवरण चाहिन्छ?',
332
+ 'कुटनीतिक राहदानीको लागि निवेदनमा जिल्ला, गाउँ/नगरपालिका, वडा नम्बर, गाउँ/सडक, र घर नम्बरको ठेगाना विवरण चाहिन्छ।',
333
+ 'राहदानीको लागि कागजात धुल्याउने प्रक्रिया महानिर्देशकको स्वीकृतिमा हुन्छ।',
334
+ ]
335
+ embeddings = model.encode(sentences)
336
+ print(embeddings.shape)
337
+ # [3, 384]
338
+
339
+ # Get the similarity scores for the embeddings
340
+ similarities = model.similarity(embeddings, embeddings)
341
+ print(similarities.shape)
342
+ # [3, 3]
343
+ ```
344
+
345
+ <!--
346
+ ### Direct Usage (Transformers)
347
+
348
+ <details><summary>Click to see the direct usage in Transformers</summary>
349
+
350
+ </details>
351
+ -->
352
+
353
+ <!--
354
+ ### Downstream Usage (Sentence Transformers)
355
+
356
+ You can finetune this model on your own dataset.
357
+
358
+ <details><summary>Click to expand</summary>
359
+
360
+ </details>
361
+ -->
362
+
363
+ <!--
364
+ ### Out-of-Scope Use
365
+
366
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
367
+ -->
368
+
369
+ ## Evaluation
370
+
371
+ ### Metrics
372
+
373
+ #### Information Retrieval
374
+
375
+ * Dataset: `dim_384`
376
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
377
+ ```json
378
+ {
379
+ "truncate_dim": 384
380
+ }
381
+ ```
382
+
383
+ | Metric | Value |
384
+ |:--------------------|:-----------|
385
+ | cosine_accuracy@1 | 0.4103 |
386
+ | cosine_accuracy@3 | 0.6581 |
387
+ | cosine_accuracy@5 | 0.735 |
388
+ | cosine_accuracy@10 | 0.8462 |
389
+ | cosine_precision@1 | 0.4103 |
390
+ | cosine_precision@3 | 0.2194 |
391
+ | cosine_precision@5 | 0.147 |
392
+ | cosine_precision@10 | 0.0846 |
393
+ | cosine_recall@1 | 0.4103 |
394
+ | cosine_recall@3 | 0.6581 |
395
+ | cosine_recall@5 | 0.735 |
396
+ | cosine_recall@10 | 0.8462 |
397
+ | **cosine_ndcg@10** | **0.6218** |
398
+ | cosine_mrr@10 | 0.5504 |
399
+ | cosine_map@100 | 0.5572 |
400
+
401
+ #### Information Retrieval
402
+
403
+ * Dataset: `dim_256`
404
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
405
+ ```json
406
+ {
407
+ "truncate_dim": 256
408
+ }
409
+ ```
410
+
411
+ | Metric | Value |
412
+ |:--------------------|:----------|
413
+ | cosine_accuracy@1 | 0.4274 |
414
+ | cosine_accuracy@3 | 0.641 |
415
+ | cosine_accuracy@5 | 0.7179 |
416
+ | cosine_accuracy@10 | 0.8291 |
417
+ | cosine_precision@1 | 0.4274 |
418
+ | cosine_precision@3 | 0.2137 |
419
+ | cosine_precision@5 | 0.1436 |
420
+ | cosine_precision@10 | 0.0829 |
421
+ | cosine_recall@1 | 0.4274 |
422
+ | cosine_recall@3 | 0.641 |
423
+ | cosine_recall@5 | 0.7179 |
424
+ | cosine_recall@10 | 0.8291 |
425
+ | **cosine_ndcg@10** | **0.616** |
426
+ | cosine_mrr@10 | 0.5488 |
427
+ | cosine_map@100 | 0.5564 |
428
+
429
+ #### Information Retrieval
430
+
431
+ * Dataset: `dim_128`
432
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
433
+ ```json
434
+ {
435
+ "truncate_dim": 128
436
+ }
437
+ ```
438
+
439
+ | Metric | Value |
440
+ |:--------------------|:-----------|
441
+ | cosine_accuracy@1 | 0.3932 |
442
+ | cosine_accuracy@3 | 0.5812 |
443
+ | cosine_accuracy@5 | 0.6752 |
444
+ | cosine_accuracy@10 | 0.8034 |
445
+ | cosine_precision@1 | 0.3932 |
446
+ | cosine_precision@3 | 0.1937 |
447
+ | cosine_precision@5 | 0.135 |
448
+ | cosine_precision@10 | 0.0803 |
449
+ | cosine_recall@1 | 0.3932 |
450
+ | cosine_recall@3 | 0.5812 |
451
+ | cosine_recall@5 | 0.6752 |
452
+ | cosine_recall@10 | 0.8034 |
453
+ | **cosine_ndcg@10** | **0.5799** |
454
+ | cosine_mrr@10 | 0.51 |
455
+ | cosine_map@100 | 0.5176 |
456
+
457
+ #### Information Retrieval
458
+
459
+ * Dataset: `dim_64`
460
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
461
+ ```json
462
+ {
463
+ "truncate_dim": 64
464
+ }
465
+ ```
466
+
467
+ | Metric | Value |
468
+ |:--------------------|:-----------|
469
+ | cosine_accuracy@1 | 0.3846 |
470
+ | cosine_accuracy@3 | 0.5812 |
471
+ | cosine_accuracy@5 | 0.641 |
472
+ | cosine_accuracy@10 | 0.7607 |
473
+ | cosine_precision@1 | 0.3846 |
474
+ | cosine_precision@3 | 0.1937 |
475
+ | cosine_precision@5 | 0.1282 |
476
+ | cosine_precision@10 | 0.0761 |
477
+ | cosine_recall@1 | 0.3846 |
478
+ | cosine_recall@3 | 0.5812 |
479
+ | cosine_recall@5 | 0.641 |
480
+ | cosine_recall@10 | 0.7607 |
481
+ | **cosine_ndcg@10** | **0.5652** |
482
+ | cosine_mrr@10 | 0.5037 |
483
+ | cosine_map@100 | 0.514 |
484
+
485
+ <!--
486
+ ## Bias, Risks and Limitations
487
+
488
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
489
+ -->
490
+
491
+ <!--
492
+ ### Recommendations
493
+
494
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
495
+ -->
496
+
497
+ ## Training Details
498
+
499
+ ### Training Dataset
500
+
501
+ #### json
502
+
503
+ * Dataset: json
504
+ * Size: 1,046 training samples
505
+ * Columns: <code>anchor</code> and <code>positive</code>
506
+ * Approximate statistics based on the first 1000 samples:
507
+ | | anchor | positive |
508
+ |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
509
+ | type | string | string |
510
+ | details | <ul><li>min: 18 tokens</li><li>mean: 40.9 tokens</li><li>max: 103 tokens</li></ul> | <ul><li>min: 23 tokens</li><li>mean: 65.74 tokens</li><li>max: 235 tokens</li></ul> |
511
+ * Samples:
512
+ | anchor | positive |
513
+ |:----------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------|
514
+ | <code>राहदानी नियमावली, २०७७ मा अभिलेखको गोपनीयताको उल्लङ्घनको जाँचको नतिजाको अपील कसले जाँच गर्छ?</code> | <code>राहदानी नियमावली, २०७७ मा अभिलेखको गोपनीयताको उल्लङ्घनको जाँचको नतिजाको अपील मन्त्रालयले तोकेको समितिले जाँच गर्छ।</code> |
515
+ | <code>राहदानी नियमावली, २०७७ मा सत्यापनको लागि कस्तो सही चाहिन्छ?</code> | <code>राहदानी नियमावली, २०७७ मा सत्यापनको लागि निवेदकको सही, र नाबालकको हकमा बाबु, आमा, वा संरक्षकको सही चाहिन्छ।</code> |
516
+ | <code>राहदानी नियमावली, २०७७ मा कस्तो निकायले राहदानी जारी गर्छ?</code> | <code>राहदानी नियमावली, २०७७ मा विभाग, नियोग, वा जिल्ला प्रशासन कार्यालयले राहदानी जारी गर्छ।</code> |
517
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
518
+ ```json
519
+ {
520
+ "loss": "MultipleNegativesRankingLoss",
521
+ "matryoshka_dims": [
522
+ 384,
523
+ 256,
524
+ 128,
525
+ 64
526
+ ],
527
+ "matryoshka_weights": [
528
+ 1,
529
+ 1,
530
+ 1,
531
+ 1
532
+ ],
533
+ "n_dims_per_step": -1
534
+ }
535
+ ```
536
+
537
+ ### Training Hyperparameters
538
+ #### Non-Default Hyperparameters
539
+
540
+ - `eval_strategy`: epoch
541
+ - `per_device_train_batch_size`: 32
542
+ - `per_device_eval_batch_size`: 16
543
+ - `gradient_accumulation_steps`: 16
544
+ - `learning_rate`: 2e-05
545
+ - `num_train_epochs`: 4
546
+ - `lr_scheduler_type`: cosine
547
+ - `warmup_ratio`: 0.1
548
+ - `bf16`: True
549
+ - `tf32`: False
550
+ - `load_best_model_at_end`: True
551
+ - `optim`: adamw_torch_fused
552
+ - `batch_sampler`: no_duplicates
553
+
554
+ #### All Hyperparameters
555
+ <details><summary>Click to expand</summary>
556
+
557
+ - `overwrite_output_dir`: False
558
+ - `do_predict`: False
559
+ - `eval_strategy`: epoch
560
+ - `prediction_loss_only`: True
561
+ - `per_device_train_batch_size`: 32
562
+ - `per_device_eval_batch_size`: 16
563
+ - `per_gpu_train_batch_size`: None
564
+ - `per_gpu_eval_batch_size`: None
565
+ - `gradient_accumulation_steps`: 16
566
+ - `eval_accumulation_steps`: None
567
+ - `torch_empty_cache_steps`: None
568
+ - `learning_rate`: 2e-05
569
+ - `weight_decay`: 0.0
570
+ - `adam_beta1`: 0.9
571
+ - `adam_beta2`: 0.999
572
+ - `adam_epsilon`: 1e-08
573
+ - `max_grad_norm`: 1.0
574
+ - `num_train_epochs`: 4
575
+ - `max_steps`: -1
576
+ - `lr_scheduler_type`: cosine
577
+ - `lr_scheduler_kwargs`: {}
578
+ - `warmup_ratio`: 0.1
579
+ - `warmup_steps`: 0
580
+ - `log_level`: passive
581
+ - `log_level_replica`: warning
582
+ - `log_on_each_node`: True
583
+ - `logging_nan_inf_filter`: True
584
+ - `save_safetensors`: True
585
+ - `save_on_each_node`: False
586
+ - `save_only_model`: False
587
+ - `restore_callback_states_from_checkpoint`: False
588
+ - `no_cuda`: False
589
+ - `use_cpu`: False
590
+ - `use_mps_device`: False
591
+ - `seed`: 42
592
+ - `data_seed`: None
593
+ - `jit_mode_eval`: False
594
+ - `use_ipex`: False
595
+ - `bf16`: True
596
+ - `fp16`: False
597
+ - `fp16_opt_level`: O1
598
+ - `half_precision_backend`: auto
599
+ - `bf16_full_eval`: False
600
+ - `fp16_full_eval`: False
601
+ - `tf32`: False
602
+ - `local_rank`: 0
603
+ - `ddp_backend`: None
604
+ - `tpu_num_cores`: None
605
+ - `tpu_metrics_debug`: False
606
+ - `debug`: []
607
+ - `dataloader_drop_last`: False
608
+ - `dataloader_num_workers`: 0
609
+ - `dataloader_prefetch_factor`: None
610
+ - `past_index`: -1
611
+ - `disable_tqdm`: False
612
+ - `remove_unused_columns`: True
613
+ - `label_names`: None
614
+ - `load_best_model_at_end`: True
615
+ - `ignore_data_skip`: False
616
+ - `fsdp`: []
617
+ - `fsdp_min_num_params`: 0
618
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
619
+ - `fsdp_transformer_layer_cls_to_wrap`: None
620
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
621
+ - `deepspeed`: None
622
+ - `label_smoothing_factor`: 0.0
623
+ - `optim`: adamw_torch_fused
624
+ - `optim_args`: None
625
+ - `adafactor`: False
626
+ - `group_by_length`: False
627
+ - `length_column_name`: length
628
+ - `ddp_find_unused_parameters`: None
629
+ - `ddp_bucket_cap_mb`: None
630
+ - `ddp_broadcast_buffers`: False
631
+ - `dataloader_pin_memory`: True
632
+ - `dataloader_persistent_workers`: False
633
+ - `skip_memory_metrics`: True
634
+ - `use_legacy_prediction_loop`: False
635
+ - `push_to_hub`: False
636
+ - `resume_from_checkpoint`: None
637
+ - `hub_model_id`: None
638
+ - `hub_strategy`: every_save
639
+ - `hub_private_repo`: None
640
+ - `hub_always_push`: False
641
+ - `hub_revision`: None
642
+ - `gradient_checkpointing`: False
643
+ - `gradient_checkpointing_kwargs`: None
644
+ - `include_inputs_for_metrics`: False
645
+ - `include_for_metrics`: []
646
+ - `eval_do_concat_batches`: True
647
+ - `fp16_backend`: auto
648
+ - `push_to_hub_model_id`: None
649
+ - `push_to_hub_organization`: None
650
+ - `mp_parameters`:
651
+ - `auto_find_batch_size`: False
652
+ - `full_determinism`: False
653
+ - `torchdynamo`: None
654
+ - `ray_scope`: last
655
+ - `ddp_timeout`: 1800
656
+ - `torch_compile`: False
657
+ - `torch_compile_backend`: None
658
+ - `torch_compile_mode`: None
659
+ - `include_tokens_per_second`: False
660
+ - `include_num_input_tokens_seen`: False
661
+ - `neftune_noise_alpha`: None
662
+ - `optim_target_modules`: None
663
+ - `batch_eval_metrics`: False
664
+ - `eval_on_start`: False
665
+ - `use_liger_kernel`: False
666
+ - `liger_kernel_config`: None
667
+ - `eval_use_gather_object`: False
668
+ - `average_tokens_across_devices`: False
669
+ - `prompts`: None
670
+ - `batch_sampler`: no_duplicates
671
+ - `multi_dataset_batch_sampler`: proportional
672
+
673
+ </details>
674
+
675
+ ### Training Logs
676
+ | Epoch | Step | Training Loss | dim_384_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
677
+ |:-------:|:-----:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
678
+ | 1.0 | 3 | - | 0.5232 | 0.5074 | 0.4679 | 0.4451 |
679
+ | 2.0 | 6 | - | 0.5891 | 0.5703 | 0.5555 | 0.5275 |
680
+ | **3.0** | **9** | **-** | **0.6108** | **0.6052** | **0.5815** | **0.5594** |
681
+ | 3.4848 | 10 | 2.5112 | - | - | - | - |
682
+ | 4.0 | 12 | - | 0.6218 | 0.6160 | 0.5799 | 0.5652 |
683
+
684
+ * The bold row denotes the saved checkpoint.
685
+
686
+ ### Framework Versions
687
+ - Python: 3.11.13
688
+ - Sentence Transformers: 4.1.0
689
+ - Transformers: 4.53.2
690
+ - PyTorch: 2.6.0+cu124
691
+ - Accelerate: 1.9.0
692
+ - Datasets: 4.0.0
693
+ - Tokenizers: 0.21.2
694
+
695
+ ## Citation
696
+
697
+ ### BibTeX
698
+
699
+ #### Sentence Transformers
700
+ ```bibtex
701
+ @inproceedings{reimers-2019-sentence-bert,
702
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
703
+ author = "Reimers, Nils and Gurevych, Iryna",
704
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
705
+ month = "11",
706
+ year = "2019",
707
+ publisher = "Association for Computational Linguistics",
708
+ url = "https://arxiv.org/abs/1908.10084",
709
+ }
710
+ ```
711
+
712
+ #### MatryoshkaLoss
713
+ ```bibtex
714
+ @misc{kusupati2024matryoshka,
715
+ title={Matryoshka Representation Learning},
716
+ 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},
717
+ year={2024},
718
+ eprint={2205.13147},
719
+ archivePrefix={arXiv},
720
+ primaryClass={cs.LG}
721
+ }
722
+ ```
723
+
724
+ #### MultipleNegativesRankingLoss
725
+ ```bibtex
726
+ @misc{henderson2017efficient,
727
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
728
+ 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},
729
+ year={2017},
730
+ eprint={1705.00652},
731
+ archivePrefix={arXiv},
732
+ primaryClass={cs.CL}
733
+ }
734
+ ```
735
+
736
+ <!--
737
+ ## Glossary
738
+
739
+ *Clearly define terms in order to be accessible across audiences.*
740
+ -->
741
+
742
+ <!--
743
+ ## Model Card Authors
744
+
745
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
746
+ -->
747
+
748
+ <!--
749
+ ## Model Card Contact
750
+
751
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
752
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "gradient_checkpointing": false,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 1536,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 6,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.53.2",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.1.0",
4
+ "transformers": "4.53.2",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c521f7144fadf221f3347519bff63b47643e3720cf83a54c0a69a7ea0c7a8045
3
+ size 90864192
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 256,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "max_length": 128,
51
+ "model_max_length": 256,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff