Add new SentenceTransformer model.
Browse files- .gitattributes +2 -0
- 1_Pooling/config.json +10 -0
- README.md +403 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +3 -0
- tokenizer_config.json +64 -0
- unigram.json +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
37 |
+
unigram.json filter=lfs diff=lfs merge=lfs -text
|
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,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
pipeline_tag: sentence-similarity
|
7 |
+
tags:
|
8 |
+
- sentence-transformers
|
9 |
+
- sentence-similarity
|
10 |
+
- feature-extraction
|
11 |
+
- generated_from_trainer
|
12 |
+
- dataset_size:1530
|
13 |
+
- loss:CoSENTLoss
|
14 |
+
widget:
|
15 |
+
- source_sentence: ' Kuldeep Yadav : तो क्या बॉलीवुड एक्ट्रेस से शादी करने जा रहे
|
16 |
+
वर्ल्ड चैंपियन कुलदीप यादव? बोले - जल्द ही खुशखबरी मिलेगी... '
|
17 |
+
sentences:
|
18 |
+
- 'Shagun Apsagun: पूजा में नारियल का खराब निकलना शुभ या अशुभ? जानें मिलने वाले
|
19 |
+
संकेत'
|
20 |
+
- दोस्त की बहन पर आया दिल, प्यार में तोड़ीं धर्म की बेड़ियां, टीम इंडिया के दिग्गज
|
21 |
+
की ऐसी थी लव स्टोरी
|
22 |
+
- WhatsApp पर और भी ज्यादा स्मार्ट होगा Meta AI, एक इशारे पर कर देगा ये काम, चौंका
|
23 |
+
देंगे फायदे
|
24 |
+
- source_sentence: ' Quiz: लिखता हूं पर पेन नहीं, चलता हूं पर गाड़ी नहीं, टिक-टिक
|
25 |
+
करता हूं पर घड़ी नहीं, बताओ मैं कौन हूं? '
|
26 |
+
sentences:
|
27 |
+
- 'Ram Chalisa: बेहद चमत्कारी है श्रीराम चालीसा, रोजाना पढ़ने से खुल जाएंगे धन आगमन
|
28 |
+
के रास्ते, ये दिन है खास'
|
29 |
+
- 'वैज्ञानिकों की नई खोज: बस थोड़ी सी ऑक्सीजन चाहिए थी... और धरती पर फूट पड़ा जीवन
|
30 |
+
का अंकुर'
|
31 |
+
- 'France Election: 28 साल के जॉर्डन बार्डेला बन सकते हैं फ्रांस के पीएम, धाकड़
|
32 |
+
विरोधियों को पस्त करने का है माद्दा'
|
33 |
+
- source_sentence: ' बारिश के मौसम में उत्तराखंड की इन जगहों पर घूमना पड़ सकता है
|
34 |
+
भारी अवॉइड करें ये 5 जगहें '
|
35 |
+
sentences:
|
36 |
+
- 'Vastu Tips: घर के मुख्य दरवाजे पर ये एक चीज लटकाने से दौड़ी आएंगी मां लक्ष्मी,
|
37 |
+
पैसों की तंगी से मिलेगा छुटकारा'
|
38 |
+
- एडवेचंर के हैं शौकीन तो मानसून में घूमें उत्तराखंड की ये 6 रोमांचक ट्रेक
|
39 |
+
- Samsung Galaxy Ring हुई लॉन्च, 9 साइज और 3 कलर ऑप्शन में मिलेगी, जानें फीचर्स
|
40 |
+
- source_sentence: ' रथ में सवार होकर मौसी के घर गए भगवान जगन्नाथ बीमार क्यों हो
|
41 |
+
जाते हैं? '
|
42 |
+
sentences:
|
43 |
+
- 'Airport Jobs: 10वीं पास से लेकर ग्रेजुएट के लिए वैकेंसी, यूपी के हिंडन एयरपोर्ट
|
44 |
+
के लिए होगा चयन, ऐसे भरें फॉर्म'
|
45 |
+
- शादी के बाद जहीर इकबाल ने शेयर की UNSEEN रोमांटिक फोटो, पति की आंखों में खोई दिखीं
|
46 |
+
दुल्हनिया सोनाक्षी सिन्हा
|
47 |
+
- मनी प्लांट भी है इस पौधे के आगे फेल, घर में लगाते ही बरसता धन
|
48 |
+
- source_sentence: ' बैंक ऑफ बड़ौदा ने कस्टमर्स को दिया झटका! इन लोगों की बढ़ेंगी
|
49 |
+
मुश्किलें '
|
50 |
+
sentences:
|
51 |
+
- 'Karnataka: चुनाव जीतने के जश्न में खुलेआम बंटी शराब.. भाजपा ने इस नेता को पार्टी
|
52 |
+
से कर दिया बेदखल'
|
53 |
+
- 'PM Modi''s Russia visit: अमेरिका ने की पीएम मोदी से अपील, राष्ट्रपति पुतिन के
|
54 |
+
सामने उठाएं ये मुद्दा'
|
55 |
+
- 'Hemant Soren: सीएम बनते ही हेमंत सोरेन के सिर पर फिर लटकी तल���ार, जमानत रद्द करवाने
|
56 |
+
के लिए सुप्रीम कोर्ट पहुंची ED'
|
57 |
+
---
|
58 |
+
|
59 |
+
# SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
|
60 |
+
|
61 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). 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.
|
62 |
+
|
63 |
+
## Model Details
|
64 |
+
|
65 |
+
### Model Description
|
66 |
+
- **Model Type:** Sentence Transformer
|
67 |
+
- **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision bf3bf13ab40c3157080a7ab344c831b9ad18b5eb -->
|
68 |
+
- **Maximum Sequence Length:** 128 tokens
|
69 |
+
- **Output Dimensionality:** 384 tokens
|
70 |
+
- **Similarity Function:** Cosine Similarity
|
71 |
+
<!-- - **Training Dataset:** Unknown -->
|
72 |
+
<!-- - **Language:** Unknown -->
|
73 |
+
<!-- - **License:** Unknown -->
|
74 |
+
|
75 |
+
### Model Sources
|
76 |
+
|
77 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
78 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
79 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
80 |
+
|
81 |
+
### Full Model Architecture
|
82 |
+
|
83 |
+
```
|
84 |
+
SentenceTransformer(
|
85 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
|
86 |
+
(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})
|
87 |
+
)
|
88 |
+
```
|
89 |
+
|
90 |
+
## Usage
|
91 |
+
|
92 |
+
### Direct Usage (Sentence Transformers)
|
93 |
+
|
94 |
+
First install the Sentence Transformers library:
|
95 |
+
|
96 |
+
```bash
|
97 |
+
pip install -U sentence-transformers
|
98 |
+
```
|
99 |
+
|
100 |
+
Then you can load this model and run inference.
|
101 |
+
```python
|
102 |
+
from sentence_transformers import SentenceTransformer
|
103 |
+
|
104 |
+
# Download from the 🤗 Hub
|
105 |
+
model = SentenceTransformer("amorfati/custom-hindi-emb-model")
|
106 |
+
# Run inference
|
107 |
+
sentences = [
|
108 |
+
' बैंक ऑफ बड़ौदा ने कस्टमर्स को दिया झटका! इन लोगों की बढ़ेंगी मुश्किलें ',
|
109 |
+
'Hemant Soren: सीएम बनते ही हेमंत सोरेन के सिर पर फिर लटकी तलवार, जमानत रद्द करवाने के लिए सुप्रीम कोर्ट पहुंची ED',
|
110 |
+
'Karnataka: चुनाव जीतने के जश्न में खुलेआम बंटी शराब.. भाजपा ने इस नेता को पार्टी से कर दिया बेदखल',
|
111 |
+
]
|
112 |
+
embeddings = model.encode(sentences)
|
113 |
+
print(embeddings.shape)
|
114 |
+
# [3, 384]
|
115 |
+
|
116 |
+
# Get the similarity scores for the embeddings
|
117 |
+
similarities = model.similarity(embeddings, embeddings)
|
118 |
+
print(similarities.shape)
|
119 |
+
# [3, 3]
|
120 |
+
```
|
121 |
+
|
122 |
+
<!--
|
123 |
+
### Direct Usage (Transformers)
|
124 |
+
|
125 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
126 |
+
|
127 |
+
</details>
|
128 |
+
-->
|
129 |
+
|
130 |
+
<!--
|
131 |
+
### Downstream Usage (Sentence Transformers)
|
132 |
+
|
133 |
+
You can finetune this model on your own dataset.
|
134 |
+
|
135 |
+
<details><summary>Click to expand</summary>
|
136 |
+
|
137 |
+
</details>
|
138 |
+
-->
|
139 |
+
|
140 |
+
<!--
|
141 |
+
### Out-of-Scope Use
|
142 |
+
|
143 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
144 |
+
-->
|
145 |
+
|
146 |
+
<!--
|
147 |
+
## Bias, Risks and Limitations
|
148 |
+
|
149 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
150 |
+
-->
|
151 |
+
|
152 |
+
<!--
|
153 |
+
### Recommendations
|
154 |
+
|
155 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
156 |
+
-->
|
157 |
+
|
158 |
+
## Training Details
|
159 |
+
|
160 |
+
### Training Dataset
|
161 |
+
|
162 |
+
#### Unnamed Dataset
|
163 |
+
|
164 |
+
|
165 |
+
* Size: 1,530 training samples
|
166 |
+
* Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
|
167 |
+
* Approximate statistics based on the first 1000 samples:
|
168 |
+
| | premise | hypothesis | label |
|
169 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------|
|
170 |
+
| type | string | string | int |
|
171 |
+
| details | <ul><li>min: 15 tokens</li><li>mean: 31.85 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 31.93 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>0: ~30.00%</li><li>2: ~70.00%</li></ul> |
|
172 |
+
* Samples:
|
173 |
+
| premise | hypothesis | label |
|
174 |
+
|:-----------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------|:---------------|
|
175 |
+
| <code> UCO Bank: यूको बैंक में होने जा रही बंपर भर्तियों के लिए करें अप्लाई, इस दिन बंद हो रही आवेदन प्रक्रिया </code> | <code> Law टेस्ट की कट-ऑफ कम कराने के लिए डाली याचिका, CJI ने दिया ऐसा जवाब, बोलेंगे-वाह! </code> | <code>2</code> |
|
176 |
+
| <code> इन 5 लक्षणों के साथ आता है डेंगू का बुखार, घर पर इस तरह से पाएं राहत, प्लेटलेट्स भी नहीं होंगे कम </code> | <code> Bengal Video: हाथ-पांव पकड़े, जमकर मारे डंडे, चिल्लाती रही महिला; TMC के गुंडों का फिर दिखा कहर </code> | <code>2</code> |
|
177 |
+
| <code> क्या कल्कि 2898 एडी Robert Downey Jr की इस फिल्म की है कॉपी? डायरेक्टर ने बताया चौंकाने वाला सच </code> | <code> IND vs ZIM : 8 छक्के 7 चौके... अभिषेक शर्मा के आगे बौने पड़ गए जिम्बाब्वे के गेंदबाज, ठोका तीसरा सबसे तेज शतक </code> | <code>2</code> |
|
178 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
179 |
+
```json
|
180 |
+
{
|
181 |
+
"scale": 20.0,
|
182 |
+
"similarity_fct": "pairwise_cos_sim"
|
183 |
+
}
|
184 |
+
```
|
185 |
+
|
186 |
+
### Evaluation Dataset
|
187 |
+
|
188 |
+
#### Unnamed Dataset
|
189 |
+
|
190 |
+
|
191 |
+
* Size: 170 evaluation samples
|
192 |
+
* Columns: <code>premise</code>, <code>hypothesis</code>, and <code>label</code>
|
193 |
+
* Approximate statistics based on the first 1000 samples:
|
194 |
+
| | premise | hypothesis | label |
|
195 |
+
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------|
|
196 |
+
| type | string | string | int |
|
197 |
+
| details | <ul><li>min: 15 tokens</li><li>mean: 31.56 tokens</li><li>max: 51 tokens</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 31.68 tokens</li><li>max: 50 tokens</li></ul> | <ul><li>1: 100.00%</li></ul> |
|
198 |
+
* Samples:
|
199 |
+
| premise | hypothesis | label |
|
200 |
+
|:----------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|:---------------|
|
201 |
+
| <code> अरमान मलिक ने विशाल पांडे को मारा थप्पड़, Video हुआ वायरल; क्या अब यूट्यूबर हो जाएंगे BB हाउस से बाहर? </code> | <code>खुद से आधी उम्र के हीरो संग इस भोजपुरी एक्ट्रेस ने किया कुछ ऐसा, वायरल हो गया गाने का Video; आए करोड़ों व्यूज</code> | <code>1</code> |
|
202 |
+
| <code> अनुष्का शर्मा ने शेयर किया क्रिप्टिक पोस्ट तो इधर दिखे विराट कोहली, क्या सही में शिफ्ट हो गए लंदन? </code> | <code>'ऐसी लड़की मि���ी आपको जो...', विक्की कौशल और कैटरीना कैफ की जोड़ी पर क्या बोल गए अनिल कपूर</code> | <code>1</code> |
|
203 |
+
| <code> क्या Alien ने भेजे हैं सिग्नल? समझने के लिए वैज्ञानिकों ने लगाई ऐसी गणित </code> | <code>एक भाई धरती पर था, जुड़वां अंतरिक्ष में...दोनों की बायोलॉजी में क्या अंतर दिखा?</code> | <code>1</code> |
|
204 |
+
* Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
|
205 |
+
```json
|
206 |
+
{
|
207 |
+
"scale": 20.0,
|
208 |
+
"similarity_fct": "pairwise_cos_sim"
|
209 |
+
}
|
210 |
+
```
|
211 |
+
|
212 |
+
### Training Hyperparameters
|
213 |
+
#### Non-Default Hyperparameters
|
214 |
+
|
215 |
+
- `eval_strategy`: steps
|
216 |
+
- `per_device_train_batch_size`: 16
|
217 |
+
- `per_device_eval_batch_size`: 16
|
218 |
+
- `learning_rate`: 2e-05
|
219 |
+
- `num_train_epochs`: 10
|
220 |
+
- `warmup_ratio`: 0.1
|
221 |
+
|
222 |
+
#### All Hyperparameters
|
223 |
+
<details><summary>Click to expand</summary>
|
224 |
+
|
225 |
+
- `overwrite_output_dir`: False
|
226 |
+
- `do_predict`: False
|
227 |
+
- `eval_strategy`: steps
|
228 |
+
- `prediction_loss_only`: True
|
229 |
+
- `per_device_train_batch_size`: 16
|
230 |
+
- `per_device_eval_batch_size`: 16
|
231 |
+
- `per_gpu_train_batch_size`: None
|
232 |
+
- `per_gpu_eval_batch_size`: None
|
233 |
+
- `gradient_accumulation_steps`: 1
|
234 |
+
- `eval_accumulation_steps`: None
|
235 |
+
- `learning_rate`: 2e-05
|
236 |
+
- `weight_decay`: 0.0
|
237 |
+
- `adam_beta1`: 0.9
|
238 |
+
- `adam_beta2`: 0.999
|
239 |
+
- `adam_epsilon`: 1e-08
|
240 |
+
- `max_grad_norm`: 1.0
|
241 |
+
- `num_train_epochs`: 10
|
242 |
+
- `max_steps`: -1
|
243 |
+
- `lr_scheduler_type`: linear
|
244 |
+
- `lr_scheduler_kwargs`: {}
|
245 |
+
- `warmup_ratio`: 0.1
|
246 |
+
- `warmup_steps`: 0
|
247 |
+
- `log_level`: passive
|
248 |
+
- `log_level_replica`: warning
|
249 |
+
- `log_on_each_node`: True
|
250 |
+
- `logging_nan_inf_filter`: True
|
251 |
+
- `save_safetensors`: True
|
252 |
+
- `save_on_each_node`: False
|
253 |
+
- `save_only_model`: False
|
254 |
+
- `restore_callback_states_from_checkpoint`: False
|
255 |
+
- `no_cuda`: False
|
256 |
+
- `use_cpu`: False
|
257 |
+
- `use_mps_device`: False
|
258 |
+
- `seed`: 42
|
259 |
+
- `data_seed`: None
|
260 |
+
- `jit_mode_eval`: False
|
261 |
+
- `use_ipex`: False
|
262 |
+
- `bf16`: False
|
263 |
+
- `fp16`: False
|
264 |
+
- `fp16_opt_level`: O1
|
265 |
+
- `half_precision_backend`: auto
|
266 |
+
- `bf16_full_eval`: False
|
267 |
+
- `fp16_full_eval`: False
|
268 |
+
- `tf32`: None
|
269 |
+
- `local_rank`: 0
|
270 |
+
- `ddp_backend`: None
|
271 |
+
- `tpu_num_cores`: None
|
272 |
+
- `tpu_metrics_debug`: False
|
273 |
+
- `debug`: []
|
274 |
+
- `dataloader_drop_last`: False
|
275 |
+
- `dataloader_num_workers`: 0
|
276 |
+
- `dataloader_prefetch_factor`: None
|
277 |
+
- `past_index`: -1
|
278 |
+
- `disable_tqdm`: False
|
279 |
+
- `remove_unused_columns`: True
|
280 |
+
- `label_names`: None
|
281 |
+
- `load_best_model_at_end`: False
|
282 |
+
- `ignore_data_skip`: False
|
283 |
+
- `fsdp`: []
|
284 |
+
- `fsdp_min_num_params`: 0
|
285 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
286 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
287 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
288 |
+
- `deepspeed`: None
|
289 |
+
- `label_smoothing_factor`: 0.0
|
290 |
+
- `optim`: adamw_torch
|
291 |
+
- `optim_args`: None
|
292 |
+
- `adafactor`: False
|
293 |
+
- `group_by_length`: False
|
294 |
+
- `length_column_name`: length
|
295 |
+
- `ddp_find_unused_parameters`: None
|
296 |
+
- `ddp_bucket_cap_mb`: None
|
297 |
+
- `ddp_broadcast_buffers`: False
|
298 |
+
- `dataloader_pin_memory`: True
|
299 |
+
- `dataloader_persistent_workers`: False
|
300 |
+
- `skip_memory_metrics`: True
|
301 |
+
- `use_legacy_prediction_loop`: False
|
302 |
+
- `push_to_hub`: False
|
303 |
+
- `resume_from_checkpoint`: None
|
304 |
+
- `hub_model_id`: None
|
305 |
+
- `hub_strategy`: every_save
|
306 |
+
- `hub_private_repo`: False
|
307 |
+
- `hub_always_push`: False
|
308 |
+
- `gradient_checkpointing`: False
|
309 |
+
- `gradient_checkpointing_kwargs`: None
|
310 |
+
- `include_inputs_for_metrics`: False
|
311 |
+
- `eval_do_concat_batches`: True
|
312 |
+
- `fp16_backend`: auto
|
313 |
+
- `push_to_hub_model_id`: None
|
314 |
+
- `push_to_hub_organization`: None
|
315 |
+
- `mp_parameters`:
|
316 |
+
- `auto_find_batch_size`: False
|
317 |
+
- `full_determinism`: False
|
318 |
+
- `torchdynamo`: None
|
319 |
+
- `ray_scope`: last
|
320 |
+
- `ddp_timeout`: 1800
|
321 |
+
- `torch_compile`: False
|
322 |
+
- `torch_compile_backend`: None
|
323 |
+
- `torch_compile_mode`: None
|
324 |
+
- `dispatch_batches`: None
|
325 |
+
- `split_batches`: None
|
326 |
+
- `include_tokens_per_second`: False
|
327 |
+
- `include_num_input_tokens_seen`: False
|
328 |
+
- `neftune_noise_alpha`: None
|
329 |
+
- `optim_target_modules`: None
|
330 |
+
- `batch_eval_metrics`: False
|
331 |
+
- `batch_sampler`: batch_sampler
|
332 |
+
- `multi_dataset_batch_sampler`: proportional
|
333 |
+
|
334 |
+
</details>
|
335 |
+
|
336 |
+
### Training Logs
|
337 |
+
| Epoch | Step | Training Loss | loss |
|
338 |
+
|:------:|:----:|:-------------:|:----:|
|
339 |
+
| 1.0417 | 100 | 11.3102 | 0.0 |
|
340 |
+
| 2.0833 | 200 | 4.3476 | 0.0 |
|
341 |
+
| 3.125 | 300 | 4.2806 | 0.0 |
|
342 |
+
| 4.1667 | 400 | 4.2333 | 0.0 |
|
343 |
+
| 5.2083 | 500 | 4.1671 | 0.0 |
|
344 |
+
| 6.25 | 600 | 4.0698 | 0.0 |
|
345 |
+
| 7.2917 | 700 | 4.0096 | 0.0 |
|
346 |
+
| 8.3333 | 800 | 4.0257 | 0.0 |
|
347 |
+
| 9.375 | 900 | 4.0044 | 0.0 |
|
348 |
+
|
349 |
+
|
350 |
+
### Framework Versions
|
351 |
+
- Python: 3.10.12
|
352 |
+
- Sentence Transformers: 3.0.1
|
353 |
+
- Transformers: 4.41.2
|
354 |
+
- PyTorch: 2.3.0+cu121
|
355 |
+
- Accelerate: 0.32.1
|
356 |
+
- Datasets: 2.20.0
|
357 |
+
- Tokenizers: 0.19.1
|
358 |
+
|
359 |
+
## Citation
|
360 |
+
|
361 |
+
### BibTeX
|
362 |
+
|
363 |
+
#### Sentence Transformers
|
364 |
+
```bibtex
|
365 |
+
@inproceedings{reimers-2019-sentence-bert,
|
366 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
367 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
368 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
369 |
+
month = "11",
|
370 |
+
year = "2019",
|
371 |
+
publisher = "Association for Computational Linguistics",
|
372 |
+
url = "https://arxiv.org/abs/1908.10084",
|
373 |
+
}
|
374 |
+
```
|
375 |
+
|
376 |
+
#### CoSENTLoss
|
377 |
+
```bibtex
|
378 |
+
@online{kexuefm-8847,
|
379 |
+
title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
|
380 |
+
author={Su Jianlin},
|
381 |
+
year={2022},
|
382 |
+
month={Jan},
|
383 |
+
url={https://kexue.fm/archives/8847},
|
384 |
+
}
|
385 |
+
```
|
386 |
+
|
387 |
+
<!--
|
388 |
+
## Glossary
|
389 |
+
|
390 |
+
*Clearly define terms in order to be accessible across audiences.*
|
391 |
+
-->
|
392 |
+
|
393 |
+
<!--
|
394 |
+
## Model Card Authors
|
395 |
+
|
396 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
397 |
+
-->
|
398 |
+
|
399 |
+
<!--
|
400 |
+
## Model Card Contact
|
401 |
+
|
402 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
403 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.41.2",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 250037
|
26 |
+
}
|
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.3.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d0edae3533f396fd60743beb988be4bd672517a32ce391c224b16332d3e147ab
|
3 |
+
size 470637416
|
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": 128,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": false,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
|
3 |
+
size 17082987
|
tokenizer_config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"250001": {
|
36 |
+
"content": "<mask>",
|
37 |
+
"lstrip": true,
|
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 |
+
"do_lower_case": true,
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"mask_token": "<mask>",
|
50 |
+
"max_length": 128,
|
51 |
+
"model_max_length": 128,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "<pad>",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "</s>",
|
57 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "<unk>"
|
64 |
+
}
|
unigram.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
|
3 |
+
size 14763260
|