AbderrahmanSkiredj1
commited on
Commit
•
2a78b02
1
Parent(s):
2eaa300
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +484 -0
- config.json +25 -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 +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +93 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 768,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,484 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: []
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:853827
|
10 |
+
- loss:MatryoshkaLoss
|
11 |
+
- loss:MultipleNegativesRankingLoss
|
12 |
+
datasets: []
|
13 |
+
widget:
|
14 |
+
- source_sentence: كيف يمكنني أن أخسر الوزن من خلال النظام الغذائي وتناول الطعام الصحي؟
|
15 |
+
sentences:
|
16 |
+
- هل يمكن أن نحصل على (آركتشيب) في (بيغ فور) بعد إزالة كلتا المجموعتين بشكل منفصل؟
|
17 |
+
- ما هي سلسلة المطاعم الأمريكية الموجودة في النرويج؟ ما هو رأي النرويجيين عنها؟
|
18 |
+
- كيف لي أن أخسر الوزن من خلال النظام الغذائي فقط؟
|
19 |
+
- source_sentence: هل من المقبول أن تجيب على سؤالك؟
|
20 |
+
sentences:
|
21 |
+
- ما هو أفضل كتاب على الإطلاق؟
|
22 |
+
- أي مسحوق بروتيني بدون آثار جانبية؟
|
23 |
+
- إذا أجبت على سؤالك الخاص على Quora، هل تصنيف إجابتك ينخفض؟
|
24 |
+
- source_sentence: كيف تحدد ما إذا كان البريد الإلكتروني قد تم فتحه من قبل المستلم؟
|
25 |
+
sentences:
|
26 |
+
- لقد حصلت على 160 علامة في الامتحان الرئيسي ما هي فرص CSE في LNMIIT Jaipur؟
|
27 |
+
- امرأة تعزف على آلة موسيقية
|
28 |
+
- كيف يمكن للمرء أن يتتبع ما إذا تم قراءة البريد الإلكتروني المرسل؟
|
29 |
+
- source_sentence: رجل وامرأة يتنزهان مع كلابهما
|
30 |
+
sentences:
|
31 |
+
- الزوجان يتنزهان مع كلابهما.
|
32 |
+
- رجل وامرأة يتنزهون مع خنازيرهم
|
33 |
+
- هل يمكنك الحصول على جسد مثالي بدون جهد؟
|
34 |
+
- source_sentence: يتم إنتاج أمثلة جميلة من المينا، والسيراميك، والفخار في وفرة كبيرة،
|
35 |
+
وغالبا ما تتبع موضوع سلتيكي.
|
36 |
+
sentences:
|
37 |
+
- عملائنا بالكاد يستطيعون تحمل تكاليف مساعدتنا القانونية
|
38 |
+
- يتم إنتاج الفخار الصغير الذي له موضوع سلتيكي.
|
39 |
+
- يتم إنتاج عدد كبير من العناصر ذات المواضيع السلتية.
|
40 |
+
pipeline_tag: sentence-similarity
|
41 |
+
---
|
42 |
+
|
43 |
+
# SentenceTransformer
|
44 |
+
|
45 |
+
This is a [sentence-transformers](https://www.SBERT.net) model trained on the AbderrahmanSkiredj1/arabic_quora_duplicates_stsb_alue_holyquran_aranli_900k_anchor_positive_negative dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
46 |
+
|
47 |
+
## Model Details
|
48 |
+
|
49 |
+
### Model Description
|
50 |
+
- **Model Type:** Sentence Transformer
|
51 |
+
<!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
|
52 |
+
- **Maximum Sequence Length:** 512 tokens
|
53 |
+
- **Output Dimensionality:** 768 tokens
|
54 |
+
- **Similarity Function:** Cosine Similarity
|
55 |
+
- **Training Dataset:**
|
56 |
+
- AbderrahmanSkiredj1/arabic_quora_duplicates_stsb_alue_holyquran_aranli_900k_anchor_positive_negative
|
57 |
+
<!-- - **Language:** Unknown -->
|
58 |
+
<!-- - **License:** Unknown -->
|
59 |
+
|
60 |
+
### Model Sources
|
61 |
+
|
62 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
63 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
64 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
65 |
+
|
66 |
+
### Full Model Architecture
|
67 |
+
|
68 |
+
```
|
69 |
+
SentenceTransformer(
|
70 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
71 |
+
(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})
|
72 |
+
)
|
73 |
+
```
|
74 |
+
|
75 |
+
## Usage
|
76 |
+
|
77 |
+
### Direct Usage (Sentence Transformers)
|
78 |
+
|
79 |
+
First install the Sentence Transformers library:
|
80 |
+
|
81 |
+
```bash
|
82 |
+
pip install -U sentence-transformers
|
83 |
+
```
|
84 |
+
|
85 |
+
Then you can load this model and run inference.
|
86 |
+
```python
|
87 |
+
from sentence_transformers import SentenceTransformer
|
88 |
+
|
89 |
+
# Download from the 🤗 Hub
|
90 |
+
model = SentenceTransformer("AbderrahmanSkiredj1/Arabic_text_embedding_for_sts")
|
91 |
+
# Run inference
|
92 |
+
sentences = [
|
93 |
+
'يتم إنتاج أمثلة جميلة من المينا، والسيراميك، والفخار في وفرة كبيرة، وغالبا ما تتبع موضوع سلتيكي.',
|
94 |
+
'يتم إنتاج عدد كبير من العناصر ذات المواضيع السلتية.',
|
95 |
+
'يتم إنتاج الفخار الصغير الذي له موضوع سلتيكي.',
|
96 |
+
]
|
97 |
+
embeddings = model.encode(sentences)
|
98 |
+
print(embeddings.shape)
|
99 |
+
# [3, 768]
|
100 |
+
|
101 |
+
# Get the similarity scores for the embeddings
|
102 |
+
similarities = model.similarity(embeddings, embeddings)
|
103 |
+
print(similarities.shape)
|
104 |
+
# [3, 3]
|
105 |
+
```
|
106 |
+
|
107 |
+
<!--
|
108 |
+
### Direct Usage (Transformers)
|
109 |
+
|
110 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
111 |
+
|
112 |
+
</details>
|
113 |
+
-->
|
114 |
+
|
115 |
+
<!--
|
116 |
+
### Downstream Usage (Sentence Transformers)
|
117 |
+
|
118 |
+
You can finetune this model on your own dataset.
|
119 |
+
|
120 |
+
<details><summary>Click to expand</summary>
|
121 |
+
|
122 |
+
</details>
|
123 |
+
-->
|
124 |
+
|
125 |
+
<!--
|
126 |
+
### Out-of-Scope Use
|
127 |
+
|
128 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
129 |
+
-->
|
130 |
+
|
131 |
+
<!--
|
132 |
+
## Bias, Risks and Limitations
|
133 |
+
|
134 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
135 |
+
-->
|
136 |
+
|
137 |
+
<!--
|
138 |
+
### Recommendations
|
139 |
+
|
140 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
141 |
+
-->
|
142 |
+
|
143 |
+
## Training Details
|
144 |
+
|
145 |
+
### Training Dataset
|
146 |
+
|
147 |
+
#### AbderrahmanSkiredj1/arabic_quora_duplicates_stsb_alue_holyquran_aranli_900k_anchor_positive_negative
|
148 |
+
|
149 |
+
* Dataset: AbderrahmanSkiredj1/arabic_quora_duplicates_stsb_alue_holyquran_aranli_900k_anchor_positive_negative
|
150 |
+
* Size: 853,827 training samples
|
151 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
152 |
+
* Approximate statistics based on the first 1000 samples:
|
153 |
+
| | anchor | positive | negative |
|
154 |
+
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
155 |
+
| type | string | string | string |
|
156 |
+
| details | <ul><li>min: 4 tokens</li><li>mean: 14.54 tokens</li><li>max: 91 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.62 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.32 tokens</li><li>max: 35 tokens</li></ul> |
|
157 |
+
* Samples:
|
158 |
+
| anchor | positive | negative |
|
159 |
+
|:----------------------------------------------------------------------------------|:-------------------------------------------------------|:-------------------------------------------------------|
|
160 |
+
| <code>هل يمكنك أن تأكل نفس الشيء كل يوم وتحصل على كل التغذية التي تحتاجها؟</code> | <code>هل الأكل نفس الشيء كل يوم صحي؟</code> | <code>ما هي القوة الخارقة التي تتمنى أن تملكها؟</code> |
|
161 |
+
| <code>ثلاثة لاعبي كرة قدم، رقم 16 يرمي الكرة، رقم 71 يمنع الخصم الآخر.</code> | <code>لاعبي كرة القدم يرمون ويمنعون بعضهم البعض</code> | <code>الفريق يأكل البيتزا في مطعم</code> |
|
162 |
+
| <code>كيف تحسن مهاراتك في الكتابة؟</code> | <code>كيف أستمر في تحسين كتابتي؟</code> | <code>كيف يتم تحديد أرقام الضمان الاجتماعي؟</code> |
|
163 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
164 |
+
```json
|
165 |
+
{
|
166 |
+
"loss": "MultipleNegativesRankingLoss",
|
167 |
+
"matryoshka_dims": [
|
168 |
+
768,
|
169 |
+
512,
|
170 |
+
256,
|
171 |
+
128,
|
172 |
+
64
|
173 |
+
],
|
174 |
+
"matryoshka_weights": [
|
175 |
+
1,
|
176 |
+
1,
|
177 |
+
1,
|
178 |
+
1,
|
179 |
+
1
|
180 |
+
],
|
181 |
+
"n_dims_per_step": -1
|
182 |
+
}
|
183 |
+
```
|
184 |
+
|
185 |
+
### Evaluation Dataset
|
186 |
+
|
187 |
+
#### AbderrahmanSkiredj1/arabic_quora_duplicates_stsb_alue_holyquran_aranli_900k_anchor_positive_negative
|
188 |
+
|
189 |
+
* Dataset: AbderrahmanSkiredj1/arabic_quora_duplicates_stsb_alue_holyquran_aranli_900k_anchor_positive_negative
|
190 |
+
* Size: 11,584 evaluation samples
|
191 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
192 |
+
* Approximate statistics based on the first 1000 samples:
|
193 |
+
| | anchor | positive | negative |
|
194 |
+
|:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
195 |
+
| type | string | string | string |
|
196 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 16.03 tokens</li><li>max: 88 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 11.72 tokens</li><li>max: 221 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 10.59 tokens</li><li>max: 42 tokens</li></ul> |
|
197 |
+
* Samples:
|
198 |
+
| anchor | positive | negative |
|
199 |
+
|:--------------------------------------------------------------------------------------|:----------------------------------------------------|:---------------------------------------------------------------------------|
|
200 |
+
| <code>ماذا سيحدث لو توقفت الأرض عن الدوران وتدور في نفس الوقت؟</code> | <code>ماذا سيحدث إذا توقفت الأرض عن الدوران؟</code> | <code>ما هو أفضل هاتف ذكي تحت 15000؟</code> |
|
201 |
+
| <code>ثلاثة متفرجين بالغين وطفل واحد ينظرون إلى السماء بينما يقفون على الرصيف.</code> | <code>أربعة أشخاص ينظرون إلى السماء.</code> | <code>رجل وثلاثة أطفال يشاهدون بالونات الهيليوم تطفو أعلى في الهواء</code> |
|
202 |
+
| <code>ماذا تفعل الدول لمنع الحرب؟</code> | <code>كيف يجب على الدول أن تمنع الحرب؟</code> | <code>كيف يمكنني كسب المال من بدء مدونة؟</code> |
|
203 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
204 |
+
```json
|
205 |
+
{
|
206 |
+
"loss": "MultipleNegativesRankingLoss",
|
207 |
+
"matryoshka_dims": [
|
208 |
+
768,
|
209 |
+
512,
|
210 |
+
256,
|
211 |
+
128,
|
212 |
+
64
|
213 |
+
],
|
214 |
+
"matryoshka_weights": [
|
215 |
+
1,
|
216 |
+
1,
|
217 |
+
1,
|
218 |
+
1,
|
219 |
+
1
|
220 |
+
],
|
221 |
+
"n_dims_per_step": -1
|
222 |
+
}
|
223 |
+
```
|
224 |
+
|
225 |
+
### Training Hyperparameters
|
226 |
+
#### Non-Default Hyperparameters
|
227 |
+
|
228 |
+
- `per_device_train_batch_size`: 64
|
229 |
+
- `per_device_eval_batch_size`: 64
|
230 |
+
- `learning_rate`: 1e-06
|
231 |
+
- `num_train_epochs`: 10
|
232 |
+
- `warmup_ratio`: 0.1
|
233 |
+
- `fp16`: True
|
234 |
+
- `batch_sampler`: no_duplicates
|
235 |
+
|
236 |
+
#### All Hyperparameters
|
237 |
+
<details><summary>Click to expand</summary>
|
238 |
+
|
239 |
+
- `overwrite_output_dir`: False
|
240 |
+
- `do_predict`: False
|
241 |
+
- `prediction_loss_only`: True
|
242 |
+
- `per_device_train_batch_size`: 64
|
243 |
+
- `per_device_eval_batch_size`: 64
|
244 |
+
- `per_gpu_train_batch_size`: None
|
245 |
+
- `per_gpu_eval_batch_size`: None
|
246 |
+
- `gradient_accumulation_steps`: 1
|
247 |
+
- `eval_accumulation_steps`: None
|
248 |
+
- `learning_rate`: 1e-06
|
249 |
+
- `weight_decay`: 0
|
250 |
+
- `adam_beta1`: 0.9
|
251 |
+
- `adam_beta2`: 0.999
|
252 |
+
- `adam_epsilon`: 1e-08
|
253 |
+
- `max_grad_norm`: 1.0
|
254 |
+
- `num_train_epochs`: 10
|
255 |
+
- `max_steps`: -1
|
256 |
+
- `lr_scheduler_type`: linear
|
257 |
+
- `lr_scheduler_kwargs`: {}
|
258 |
+
- `warmup_ratio`: 0.1
|
259 |
+
- `warmup_steps`: 0
|
260 |
+
- `log_level`: passive
|
261 |
+
- `log_level_replica`: warning
|
262 |
+
- `log_on_each_node`: True
|
263 |
+
- `logging_nan_inf_filter`: True
|
264 |
+
- `save_safetensors`: True
|
265 |
+
- `save_on_each_node`: False
|
266 |
+
- `save_only_model`: False
|
267 |
+
- `no_cuda`: False
|
268 |
+
- `use_cpu`: False
|
269 |
+
- `use_mps_device`: False
|
270 |
+
- `seed`: 42
|
271 |
+
- `data_seed`: None
|
272 |
+
- `jit_mode_eval`: False
|
273 |
+
- `use_ipex`: False
|
274 |
+
- `bf16`: False
|
275 |
+
- `fp16`: True
|
276 |
+
- `fp16_opt_level`: O1
|
277 |
+
- `half_precision_backend`: auto
|
278 |
+
- `bf16_full_eval`: False
|
279 |
+
- `fp16_full_eval`: False
|
280 |
+
- `tf32`: None
|
281 |
+
- `local_rank`: 0
|
282 |
+
- `ddp_backend`: None
|
283 |
+
- `tpu_num_cores`: None
|
284 |
+
- `tpu_metrics_debug`: False
|
285 |
+
- `debug`: []
|
286 |
+
- `dataloader_drop_last`: False
|
287 |
+
- `dataloader_num_workers`: 0
|
288 |
+
- `dataloader_prefetch_factor`: None
|
289 |
+
- `past_index`: -1
|
290 |
+
- `disable_tqdm`: False
|
291 |
+
- `remove_unused_columns`: True
|
292 |
+
- `label_names`: None
|
293 |
+
- `load_best_model_at_end`: False
|
294 |
+
- `ignore_data_skip`: False
|
295 |
+
- `fsdp`: []
|
296 |
+
- `fsdp_min_num_params`: 0
|
297 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
298 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
299 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True}
|
300 |
+
- `deepspeed`: None
|
301 |
+
- `label_smoothing_factor`: 0.0
|
302 |
+
- `optim`: adamw_torch
|
303 |
+
- `optim_args`: None
|
304 |
+
- `adafactor`: False
|
305 |
+
- `group_by_length`: False
|
306 |
+
- `length_column_name`: length
|
307 |
+
- `ddp_find_unused_parameters`: None
|
308 |
+
- `ddp_bucket_cap_mb`: None
|
309 |
+
- `ddp_broadcast_buffers`: False
|
310 |
+
- `dataloader_pin_memory`: True
|
311 |
+
- `dataloader_persistent_workers`: False
|
312 |
+
- `skip_memory_metrics`: True
|
313 |
+
- `use_legacy_prediction_loop`: False
|
314 |
+
- `push_to_hub`: False
|
315 |
+
- `resume_from_checkpoint`: None
|
316 |
+
- `hub_model_id`: None
|
317 |
+
- `hub_strategy`: every_save
|
318 |
+
- `hub_private_repo`: False
|
319 |
+
- `hub_always_push`: False
|
320 |
+
- `gradient_checkpointing`: False
|
321 |
+
- `gradient_checkpointing_kwargs`: None
|
322 |
+
- `include_inputs_for_metrics`: False
|
323 |
+
- `fp16_backend`: auto
|
324 |
+
- `push_to_hub_model_id`: None
|
325 |
+
- `push_to_hub_organization`: None
|
326 |
+
- `mp_parameters`:
|
327 |
+
- `auto_find_batch_size`: False
|
328 |
+
- `full_determinism`: False
|
329 |
+
- `torchdynamo`: None
|
330 |
+
- `ray_scope`: last
|
331 |
+
- `ddp_timeout`: 1800
|
332 |
+
- `torch_compile`: False
|
333 |
+
- `torch_compile_backend`: None
|
334 |
+
- `torch_compile_mode`: None
|
335 |
+
- `dispatch_batches`: None
|
336 |
+
- `split_batches`: None
|
337 |
+
- `include_tokens_per_second`: False
|
338 |
+
- `include_num_input_tokens_seen`: False
|
339 |
+
- `neftune_noise_alpha`: None
|
340 |
+
- `optim_target_modules`: None
|
341 |
+
- `batch_sampler`: no_duplicates
|
342 |
+
- `multi_dataset_batch_sampler`: proportional
|
343 |
+
|
344 |
+
</details>
|
345 |
+
|
346 |
+
### Training Logs
|
347 |
+
| Epoch | Step | Training Loss |
|
348 |
+
|:------:|:----:|:-------------:|
|
349 |
+
| 0.0120 | 40 | 3.1459 |
|
350 |
+
| 0.0240 | 80 | 3.2058 |
|
351 |
+
| 0.0360 | 120 | 3.0837 |
|
352 |
+
| 0.0480 | 160 | 3.1024 |
|
353 |
+
| 0.0600 | 200 | 3.015 |
|
354 |
+
| 0.0719 | 240 | 3.1311 |
|
355 |
+
| 0.0839 | 280 | 3.1101 |
|
356 |
+
| 0.0959 | 320 | 3.1288 |
|
357 |
+
| 0.1079 | 360 | 3.045 |
|
358 |
+
| 0.1199 | 400 | 3.0488 |
|
359 |
+
| 0.1319 | 440 | 3.1001 |
|
360 |
+
| 0.1439 | 480 | 3.2334 |
|
361 |
+
| 0.1559 | 520 | 3.0581 |
|
362 |
+
| 0.1679 | 560 | 2.9821 |
|
363 |
+
| 0.1799 | 600 | 3.1733 |
|
364 |
+
| 0.1918 | 640 | 3.0658 |
|
365 |
+
| 0.2038 | 680 | 3.0721 |
|
366 |
+
| 0.2158 | 720 | 3.1647 |
|
367 |
+
| 0.2278 | 760 | 3.0326 |
|
368 |
+
| 0.2398 | 800 | 3.1014 |
|
369 |
+
| 0.2518 | 840 | 2.9365 |
|
370 |
+
| 0.2638 | 880 | 3.0642 |
|
371 |
+
| 0.2758 | 920 | 2.9864 |
|
372 |
+
| 0.2878 | 960 | 3.0939 |
|
373 |
+
| 0.2998 | 1000 | 3.0676 |
|
374 |
+
| 0.3118 | 1040 | 2.9717 |
|
375 |
+
| 0.3237 | 1080 | 2.9908 |
|
376 |
+
| 0.3357 | 1120 | 2.9506 |
|
377 |
+
| 0.3477 | 1160 | 2.907 |
|
378 |
+
| 0.3597 | 1200 | 3.0451 |
|
379 |
+
| 0.3717 | 1240 | 3.0002 |
|
380 |
+
| 0.3837 | 1280 | 2.8842 |
|
381 |
+
| 0.3957 | 1320 | 3.0697 |
|
382 |
+
| 0.4077 | 1360 | 2.8967 |
|
383 |
+
| 0.4197 | 1400 | 3.0008 |
|
384 |
+
| 0.4317 | 1440 | 3.0027 |
|
385 |
+
| 0.4436 | 1480 | 2.9229 |
|
386 |
+
| 0.4556 | 1520 | 2.9539 |
|
387 |
+
| 0.4676 | 1560 | 2.9415 |
|
388 |
+
| 0.4796 | 1600 | 2.9401 |
|
389 |
+
| 0.4916 | 1640 | 2.8498 |
|
390 |
+
| 0.5036 | 1680 | 2.9646 |
|
391 |
+
| 0.5156 | 1720 | 2.9231 |
|
392 |
+
| 0.5276 | 1760 | 2.942 |
|
393 |
+
| 0.5396 | 1800 | 2.8521 |
|
394 |
+
| 0.5516 | 1840 | 2.8362 |
|
395 |
+
| 0.5635 | 1880 | 2.8497 |
|
396 |
+
| 0.5755 | 1920 | 2.8867 |
|
397 |
+
| 0.5875 | 1960 | 2.9148 |
|
398 |
+
| 0.5995 | 2000 | 2.9343 |
|
399 |
+
| 0.6115 | 2040 | 2.8537 |
|
400 |
+
| 0.6235 | 2080 | 2.7989 |
|
401 |
+
| 0.6355 | 2120 | 2.8508 |
|
402 |
+
| 0.6475 | 2160 | 2.916 |
|
403 |
+
| 0.6595 | 2200 | 2.926 |
|
404 |
+
| 0.6715 | 2240 | 2.752 |
|
405 |
+
| 0.6835 | 2280 | 2.7792 |
|
406 |
+
| 0.6954 | 2320 | 2.8381 |
|
407 |
+
| 0.7074 | 2360 | 2.7455 |
|
408 |
+
| 0.7194 | 2400 | 2.8953 |
|
409 |
+
| 0.7314 | 2440 | 2.8179 |
|
410 |
+
| 0.7434 | 2480 | 2.8471 |
|
411 |
+
| 0.7554 | 2520 | 2.7538 |
|
412 |
+
| 0.7674 | 2560 | 2.8271 |
|
413 |
+
| 0.7794 | 2600 | 2.8401 |
|
414 |
+
| 0.7914 | 2640 | 2.7402 |
|
415 |
+
| 0.8034 | 2680 | 2.6439 |
|
416 |
+
|
417 |
+
|
418 |
+
### Framework Versions
|
419 |
+
- Python: 3.10.14
|
420 |
+
- Sentence Transformers: 3.0.1
|
421 |
+
- Transformers: 4.39.3
|
422 |
+
- PyTorch: 2.2.2+cu121
|
423 |
+
- Accelerate: 0.29.1
|
424 |
+
- Datasets: 2.18.0
|
425 |
+
- Tokenizers: 0.15.2
|
426 |
+
|
427 |
+
## Citation
|
428 |
+
|
429 |
+
### BibTeX
|
430 |
+
|
431 |
+
#### Sentence Transformers
|
432 |
+
```bibtex
|
433 |
+
@inproceedings{reimers-2019-sentence-bert,
|
434 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
435 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
436 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
437 |
+
month = "11",
|
438 |
+
year = "2019",
|
439 |
+
publisher = "Association for Computational Linguistics",
|
440 |
+
url = "https://arxiv.org/abs/1908.10084",
|
441 |
+
}
|
442 |
+
```
|
443 |
+
|
444 |
+
#### MatryoshkaLoss
|
445 |
+
```bibtex
|
446 |
+
@misc{kusupati2024matryoshka,
|
447 |
+
title={Matryoshka Representation Learning},
|
448 |
+
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},
|
449 |
+
year={2024},
|
450 |
+
eprint={2205.13147},
|
451 |
+
archivePrefix={arXiv},
|
452 |
+
primaryClass={cs.LG}
|
453 |
+
}
|
454 |
+
```
|
455 |
+
|
456 |
+
#### MultipleNegativesRankingLoss
|
457 |
+
```bibtex
|
458 |
+
@misc{henderson2017efficient,
|
459 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
460 |
+
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},
|
461 |
+
year={2017},
|
462 |
+
eprint={1705.00652},
|
463 |
+
archivePrefix={arXiv},
|
464 |
+
primaryClass={cs.CL}
|
465 |
+
}
|
466 |
+
```
|
467 |
+
|
468 |
+
<!--
|
469 |
+
## Glossary
|
470 |
+
|
471 |
+
*Clearly define terms in order to be accessible across audiences.*
|
472 |
+
-->
|
473 |
+
|
474 |
+
<!--
|
475 |
+
## Model Card Authors
|
476 |
+
|
477 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
478 |
+
-->
|
479 |
+
|
480 |
+
<!--
|
481 |
+
## Model Card Contact
|
482 |
+
|
483 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
484 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "output/matryoshka_nli_v4fromv3_output-matryoshka_nli_v3fromv1_output-matryoshkav1_11000-2024-07-06_22-30-55-checkpoint-1200-2024-07-07_12-56-26/checkpoint-2700",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 768,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 3072,
|
13 |
+
"layer_norm_eps": 1e-12,
|
14 |
+
"max_position_embeddings": 512,
|
15 |
+
"model_type": "bert",
|
16 |
+
"num_attention_heads": 12,
|
17 |
+
"num_hidden_layers": 12,
|
18 |
+
"pad_token_id": 0,
|
19 |
+
"position_embedding_type": "absolute",
|
20 |
+
"torch_dtype": "float32",
|
21 |
+
"transformers_version": "4.39.3",
|
22 |
+
"type_vocab_size": 2,
|
23 |
+
"use_cache": true,
|
24 |
+
"vocab_size": 64000
|
25 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.39.3",
|
5 |
+
"pytorch": "2.2.2+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:af205c762996d872f6edee7c9ac4ea72cac082d6f8f9d1372a5206b807b129a3
|
3 |
+
size 540795752
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,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,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"1": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"4": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
},
|
43 |
+
"5": {
|
44 |
+
"content": "[رابط]",
|
45 |
+
"lstrip": false,
|
46 |
+
"normalized": true,
|
47 |
+
"rstrip": false,
|
48 |
+
"single_word": true,
|
49 |
+
"special": true
|
50 |
+
},
|
51 |
+
"6": {
|
52 |
+
"content": "[بريد]",
|
53 |
+
"lstrip": false,
|
54 |
+
"normalized": true,
|
55 |
+
"rstrip": false,
|
56 |
+
"single_word": true,
|
57 |
+
"special": true
|
58 |
+
},
|
59 |
+
"7": {
|
60 |
+
"content": "[مستخدم]",
|
61 |
+
"lstrip": false,
|
62 |
+
"normalized": true,
|
63 |
+
"rstrip": false,
|
64 |
+
"single_word": true,
|
65 |
+
"special": true
|
66 |
+
}
|
67 |
+
},
|
68 |
+
"clean_up_tokenization_spaces": true,
|
69 |
+
"cls_token": "[CLS]",
|
70 |
+
"do_basic_tokenize": true,
|
71 |
+
"do_lower_case": false,
|
72 |
+
"mask_token": "[MASK]",
|
73 |
+
"max_len": 512,
|
74 |
+
"max_length": 512,
|
75 |
+
"model_max_length": 512,
|
76 |
+
"never_split": [
|
77 |
+
"[بريد]",
|
78 |
+
"[مستخدم]",
|
79 |
+
"[رابط]"
|
80 |
+
],
|
81 |
+
"pad_to_multiple_of": null,
|
82 |
+
"pad_token": "[PAD]",
|
83 |
+
"pad_token_type_id": 0,
|
84 |
+
"padding_side": "right",
|
85 |
+
"sep_token": "[SEP]",
|
86 |
+
"stride": 0,
|
87 |
+
"strip_accents": null,
|
88 |
+
"tokenize_chinese_chars": true,
|
89 |
+
"tokenizer_class": "BertTokenizer",
|
90 |
+
"truncation_side": "right",
|
91 |
+
"truncation_strategy": "longest_first",
|
92 |
+
"unk_token": "[UNK]"
|
93 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|