yeamerci commited on
Commit
4f014a0
1 Parent(s): 2a002cf

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
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,448 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: ai-forever/ru-en-RoSBERTa
3
+ library_name: sentence-transformers
4
+ pipeline_tag: sentence-similarity
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:19988
11
+ - loss:MultipleNegativesRankingLoss
12
+ - loss:BatchHardSoftMarginTripletLoss
13
+ widget:
14
+ - source_sentence: Продам учебники для 1ого класса для русского сектора (по программе
15
+ Евро2000). 100 лари
16
+ sentences:
17
+ - Заказывали картку не подошло по размеру продам за 20 лар размеры длина спины 38.5
18
+ обхват в груди 60
19
+ - Купите малышку🙏🏻🙏🏻🙏🏻
20
+ - 'MacBook air m2 15 Inch 8/512 (фактически два раза быстрее конфигурации 8/256) Макбук
21
+ в состояние нового, ни царапинки 5 циклов заряда Оригинальный комплект Комфортный
22
+ осмотр Проверки приветствуются! Цена: 3790 лари'
23
+ - source_sentence: ⚠️⚠️⚠️⚠️⚠️⚠️⚠️ ОБМЕН НА ЗЕМЕЛЬНЫЙ УЧАСТОК ЯЛТА ИЛИ РЯДОМ⚠️⚠️⚠️⚠️⚠️⚠️ 🔥🔥🔥🔥🔥🔥🔥🔥🔥ЭЛИТНЫЙ
24
+ ПРИГОРОД ГОРОДА РОСТОВ НА ДОНУ🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
25
+ sentences:
26
+ - Куплю да чемодана больших . Размер 75 -50-30
27
+ - Продаю новый перфоратор за 130 лари
28
+ - Набор для обучения чтению. Всё новое, 40 лари
29
+ - source_sentence: Отдам в хорошие руки ненужные игрушки, всей семьей решили очистить
30
+ дом.
31
+ sentences:
32
+ - Кто продает строительные леса в Москве?
33
+ - Ищу работу как разработчик на PHP, можно удаленно, зарплата от 100к.
34
+ - Срочно ищу игрушки для детей, кто что продает?
35
+ - source_sentence: Продам набор столовых приборов из серебра, 12 персон, в идеальном
36
+ состоянии, покупался за 50 тысяч, отдам за 30 тысяч.
37
+ sentences:
38
+ - Ищу набор столовых приборов, желательно из серебра, в хорошем состоянии, по доступной
39
+ цене.
40
+ - Ищу крысу декоративную, Москва.
41
+ - Нужны строители на строительство дома, оплата хорошая, звоните по номеру в профиле.
42
+ - source_sentence: Продаю попугайчика, очень веселый, 5 лет, цена 3000 рублей.
43
+ sentences:
44
+ - Куплю комнатное растение сирень
45
+ - Нужен попугай, люблю этих птичек, вдруг кто-то продает.
46
+ - Ищу недорогой автомобиль для поездок по деревне, бюджет до 200 тысяч.
47
+ ---
48
+
49
+ # SentenceTransformer based on ai-forever/ru-en-RoSBERTa
50
+
51
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [ai-forever/ru-en-RoSBERTa](https://huggingface.co/ai-forever/ru-en-RoSBERTa) on the match-pairs and clusters datasets. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
52
+
53
+ ## Model Details
54
+
55
+ ### Model Description
56
+ - **Model Type:** Sentence Transformer
57
+ - **Base model:** [ai-forever/ru-en-RoSBERTa](https://huggingface.co/ai-forever/ru-en-RoSBERTa) <!-- at revision 89fb1651989adbb1cfcfdedafd7d102951ad0555 -->
58
+ - **Maximum Sequence Length:** 128 tokens
59
+ - **Output Dimensionality:** 1024 tokens
60
+ - **Similarity Function:** Cosine Similarity
61
+ - **Training Datasets:**
62
+ - match-pairs
63
+ - clusters
64
+ <!-- - **Language:** Unknown -->
65
+ <!-- - **License:** Unknown -->
66
+
67
+ ### Model Sources
68
+
69
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
70
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
71
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
72
+
73
+ ### Full Model Architecture
74
+
75
+ ```
76
+ SentenceTransformer(
77
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: RobertaModel
78
+ (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
79
+ (2): Normalize()
80
+ )
81
+ ```
82
+
83
+ ## Usage
84
+
85
+ ### Direct Usage (Sentence Transformers)
86
+
87
+ First install the Sentence Transformers library:
88
+
89
+ ```bash
90
+ pip install -U sentence-transformers
91
+ ```
92
+
93
+ Then you can load this model and run inference.
94
+ ```python
95
+ from sentence_transformers import SentenceTransformer
96
+
97
+ # Download from the 🤗 Hub
98
+ model = SentenceTransformer("poc-embeddings/ru-en-RoSBERTa-trade-magnet")
99
+ # Run inference
100
+ sentences = [
101
+ 'Продаю попугайчика, очень веселый, 5 лет, цена 3000 рублей.',
102
+ 'Нужен попугай, люблю этих птичек, вдруг кто-то продает.',
103
+ 'Ищу недорогой автомобиль для поездок по деревне, бюджет до 200 тысяч.',
104
+ ]
105
+ embeddings = model.encode(sentences)
106
+ print(embeddings.shape)
107
+ # [3, 1024]
108
+
109
+ # Get the similarity scores for the embeddings
110
+ similarities = model.similarity(embeddings, embeddings)
111
+ print(similarities.shape)
112
+ # [3, 3]
113
+ ```
114
+
115
+ <!--
116
+ ### Direct Usage (Transformers)
117
+
118
+ <details><summary>Click to see the direct usage in Transformers</summary>
119
+
120
+ </details>
121
+ -->
122
+
123
+ <!--
124
+ ### Downstream Usage (Sentence Transformers)
125
+
126
+ You can finetune this model on your own dataset.
127
+
128
+ <details><summary>Click to expand</summary>
129
+
130
+ </details>
131
+ -->
132
+
133
+ <!--
134
+ ### Out-of-Scope Use
135
+
136
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
137
+ -->
138
+
139
+ <!--
140
+ ## Bias, Risks and Limitations
141
+
142
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
143
+ -->
144
+
145
+ <!--
146
+ ### Recommendations
147
+
148
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
149
+ -->
150
+
151
+ ## Training Details
152
+
153
+ ### Training Datasets
154
+
155
+ #### match-pairs
156
+
157
+ * Dataset: match-pairs
158
+ * Size: 536 training samples
159
+ * Columns: <code>anchor</code> and <code>positive</code>
160
+ * Approximate statistics based on the first 536 samples:
161
+ | | anchor | positive |
162
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
163
+ | type | string | string |
164
+ | details | <ul><li>min: 9 tokens</li><li>mean: 22.15 tokens</li><li>max: 61 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 18.15 tokens</li><li>max: 40 tokens</li></ul> |
165
+ * Samples:
166
+ | anchor | positive |
167
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------|
168
+ | <code>Ищу работу HR-менеджера, опыт 4 года, знание трудового законодательства.</code> | <code>Требуется HR-менеджер с опытом работы и знанием трудового законодательства.</code> |
169
+ | <code>Акция на косметику, 3 по цене 2, только до конца недели!</code> | <code>Кто видел скидки на косметику в последних рекламках?</code> |
170
+ | <code>Продам ковер ручной работы из шерсти, из Ирана, размер 2х3 метра, состояние отличное, покупался за 150 тысяч, отдам за 100 тысяч.</code> | <code>Ищу ковер из натуральных материалов, размер 2х3 метра, в хорошем состоянии, по адекватной цене.</code> |
171
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
172
+ ```json
173
+ {
174
+ "scale": 20.0,
175
+ "similarity_fct": "cos_sim"
176
+ }
177
+ ```
178
+
179
+ #### clusters
180
+
181
+ * Dataset: clusters
182
+ * Size: 19,452 training samples
183
+ * Columns: <code>sentence</code> and <code>label</code>
184
+ * Approximate statistics based on the first 1000 samples:
185
+ | | sentence | label |
186
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
187
+ | type | string | int |
188
+ | details | <ul><li>min: 5 tokens</li><li>mean: 49.97 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>0: ~2.30%</li><li>1: ~0.70%</li><li>2: ~0.60%</li><li>3: ~1.40%</li><li>4: ~0.20%</li><li>5: ~0.50%</li><li>6: ~1.60%</li><li>7: ~7.30%</li><li>8: ~0.50%</li><li>9: ~0.90%</li><li>10: ~0.40%</li><li>11: ~13.40%</li><li>12: ~0.70%</li><li>13: ~1.10%</li><li>14: ~1.60%</li><li>15: ~3.80%</li><li>16: ~2.70%</li><li>17: ~1.70%</li><li>18: ~3.40%</li><li>19: ~0.70%</li><li>20: ~1.20%</li><li>21: ~1.00%</li><li>22: ~2.70%</li><li>23: ~3.80%</li><li>24: ~4.20%</li><li>25: ~1.10%</li><li>26: ~4.00%</li><li>27: ~0.70%</li><li>28: ~1.90%</li><li>29: ~0.60%</li><li>30: ~0.90%</li><li>31: ~5.70%</li><li>32: ~1.40%</li><li>33: ~1.60%</li><li>34: ~0.80%</li><li>35: ~3.50%</li><li>36: ~0.50%</li><li>37: ~0.10%</li><li>38: ~0.70%</li><li>39: ~0.40%</li><li>40: ~0.40%</li><li>41: ~0.50%</li><li>42: ~0.10%</li><li>43: ~1.00%</li><li>44: ~1.70%</li><li>45: ~0.40%</li><li>46: ~1.10%</li><li>47: ~0.70%</li><li>48: ~0.70%</li><li>49: ~1.10%</li><li>50: ~0.50%</li><li>51: ~0.20%</li><li>52: ~0.50%</li><li>53: ~0.80%</li><li>54: ~0.70%</li><li>55: ~0.80%</li><li>56: ~0.20%</li><li>57: ~0.70%</li><li>58: ~0.20%</li><li>59: ~0.40%</li><li>60: ~0.30%</li><li>61: ~0.40%</li><li>63: ~0.80%</li><li>64: ~0.20%</li><li>65: ~0.90%</li><li>66: ~0.20%</li><li>67: ~0.20%</li><li>68: ~0.20%</li><li>69: ~0.10%</li><li>70: ~0.20%</li><li>71: ~0.20%</li><li>73: ~0.50%</li><li>74: ~0.10%</li><li>75: ~0.20%</li><li>76: ~0.20%</li><li>78: ~0.30%</li></ul> |
189
+ * Samples:
190
+ | sentence | label |
191
+ |:---------------------------------------------------------------------------------------------------------------------------|:----------------|
192
+ | <code>Продам кроссовки New Balance 574 Новые. Размер: 9 US, 42.5 EU Цена: 250 лари Больше моделей в шапке профиля.</code> | <code>31</code> |
193
+ | <code>Куплю Новый MagicQ MQ250M</code> | <code>27</code> |
194
+ | <code>КУПЛЮ iPhone 6s, 7, 8 возможно с дефектом‼️</code> | <code>15</code> |
195
+ * Loss: [<code>BatchHardSoftMarginTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchhardsoftmargintripletloss)
196
+
197
+ ### Evaluation Datasets
198
+
199
+ #### match-pairs
200
+
201
+ * Dataset: match-pairs
202
+ * Size: 536 evaluation samples
203
+ * Columns: <code>anchor</code> and <code>positive</code>
204
+ * Approximate statistics based on the first 536 samples:
205
+ | | anchor | positive |
206
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
207
+ | type | string | string |
208
+ | details | <ul><li>min: 11 tokens</li><li>mean: 21.78 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 16.61 tokens</li><li>max: 39 tokens</li></ul> |
209
+ * Samples:
210
+ | anchor | positive |
211
+ |:------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
212
+ | <code>Отдам бульдозер Komatsu, почти новый, Ростов-на-Дону, 4 млн рублей.</code> | <code>Кто продает бульдозер Komatsu в Ростове-на-Дону?</code> |
213
+ | <code>Нужен PHP-разработчик, удаленка, ЗП до 150к.</code> | <code>Ищу работу как разработчик на PHP, можно удаленно, зарплата от 100к.</code> |
214
+ | <code>Ищу программиста Python, нужен опытный человек, чтобы сделать сайт для компании, пишите в личку, обсудим детали.</code> | <code>Программист python, опыт работы 2 года.</code> |
215
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
216
+ ```json
217
+ {
218
+ "scale": 20.0,
219
+ "similarity_fct": "cos_sim"
220
+ }
221
+ ```
222
+
223
+ #### clusters
224
+
225
+ * Dataset: clusters
226
+ * Size: 19,452 evaluation samples
227
+ * Columns: <code>sentence</code> and <code>label</code>
228
+ * Approximate statistics based on the first 1000 samples:
229
+ | | sentence | label |
230
+ |:--------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
231
+ | type | string | int |
232
+ | details | <ul><li>min: 5 tokens</li><li>mean: 48.11 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>0: ~1.80%</li><li>1: ~0.60%</li><li>2: ~0.50%</li><li>3: ~0.40%</li><li>4: ~0.60%</li><li>5: ~0.60%</li><li>6: ~1.80%</li><li>7: ~5.40%</li><li>8: ~0.30%</li><li>9: ~1.00%</li><li>10: ~0.40%</li><li>11: ~13.70%</li><li>12: ~0.70%</li><li>13: ~1.30%</li><li>14: ~1.60%</li><li>15: ~3.70%</li><li>16: ~2.60%</li><li>17: ~1.90%</li><li>18: ~3.60%</li><li>19: ~0.30%</li><li>20: ~0.80%</li><li>21: ~1.20%</li><li>22: ~2.70%</li><li>23: ~3.20%</li><li>24: ~5.30%</li><li>25: ~0.40%</li><li>26: ~4.10%</li><li>27: ~0.80%</li><li>28: ~2.00%</li><li>29: ~0.80%</li><li>30: ~0.70%</li><li>31: ~7.40%</li><li>32: ~1.20%</li><li>33: ~1.30%</li><li>34: ~0.80%</li><li>35: ~2.80%</li><li>36: ~0.50%</li><li>37: ~0.60%</li><li>38: ~0.30%</li><li>39: ~0.10%</li><li>40: ~0.80%</li><li>41: ~1.20%</li><li>42: ~0.40%</li><li>43: ~0.80%</li><li>44: ~2.10%</li><li>45: ~0.60%</li><li>46: ~0.50%</li><li>47: ~0.70%</li><li>48: ~0.60%</li><li>49: ~0.40%</li><li>50: ~0.90%</li><li>51: ~0.20%</li><li>52: ~0.60%</li><li>53: ~1.00%</li><li>54: ~1.10%</li><li>55: ~0.80%</li><li>56: ~0.30%</li><li>57: ~0.80%</li><li>58: ~0.30%</li><li>59: ~0.50%</li><li>60: ~0.30%</li><li>61: ~0.10%</li><li>62: ~0.30%</li><li>63: ~0.70%</li><li>64: ~0.50%</li><li>65: ~0.30%</li><li>66: ~0.60%</li><li>67: ~0.50%</li><li>68: ~0.10%</li><li>69: ~0.30%</li><li>70: ~0.20%</li><li>71: ~0.40%</li><li>72: ~0.10%</li><li>73: ~0.20%</li><li>74: ~0.10%</li><li>75: ~0.10%</li><li>76: ~0.40%</li><li>77: ~0.10%</li><li>78: ~0.30%</li></ul> |
233
+ * Samples:
234
+ | sentence | label |
235
+ |:----------------------------------------------------------------------------------------------------|:----------------|
236
+ | <code>Куплю клетчатую сумку с замком, либо подобную, пишите в лс</code> | <code>1</code> |
237
+ | <code>asus r 752 l - 1tb HDD, 12gb ddr3, nvidia GeForce 940, intel core i7 5500u - 550 лари.</code> | <code>14</code> |
238
+ | <code>срочно Продам геймпад Defender X7 с держателем для телефона Состояние - новый 1300р.</code> | <code>15</code> |
239
+ * Loss: [<code>BatchHardSoftMarginTripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchhardsoftmargintripletloss)
240
+
241
+ ### Training Hyperparameters
242
+ #### Non-Default Hyperparameters
243
+
244
+ - `eval_strategy`: steps
245
+ - `per_device_train_batch_size`: 128
246
+ - `per_device_eval_batch_size`: 128
247
+ - `learning_rate`: 2e-05
248
+ - `weight_decay`: 0.022
249
+ - `num_train_epochs`: 5
250
+ - `lr_scheduler_type`: cosine
251
+ - `warmup_ratio`: 0.17
252
+ - `fp16`: True
253
+ - `dataloader_num_workers`: 8
254
+
255
+ #### All Hyperparameters
256
+ <details><summary>Click to expand</summary>
257
+
258
+ - `overwrite_output_dir`: False
259
+ - `do_predict`: False
260
+ - `eval_strategy`: steps
261
+ - `prediction_loss_only`: True
262
+ - `per_device_train_batch_size`: 128
263
+ - `per_device_eval_batch_size`: 128
264
+ - `per_gpu_train_batch_size`: None
265
+ - `per_gpu_eval_batch_size`: None
266
+ - `gradient_accumulation_steps`: 1
267
+ - `eval_accumulation_steps`: None
268
+ - `torch_empty_cache_steps`: None
269
+ - `learning_rate`: 2e-05
270
+ - `weight_decay`: 0.022
271
+ - `adam_beta1`: 0.9
272
+ - `adam_beta2`: 0.999
273
+ - `adam_epsilon`: 1e-08
274
+ - `max_grad_norm`: 1.0
275
+ - `num_train_epochs`: 5
276
+ - `max_steps`: -1
277
+ - `lr_scheduler_type`: cosine
278
+ - `lr_scheduler_kwargs`: {}
279
+ - `warmup_ratio`: 0.17
280
+ - `warmup_steps`: 0
281
+ - `log_level`: passive
282
+ - `log_level_replica`: warning
283
+ - `log_on_each_node`: True
284
+ - `logging_nan_inf_filter`: True
285
+ - `save_safetensors`: True
286
+ - `save_on_each_node`: False
287
+ - `save_only_model`: False
288
+ - `restore_callback_states_from_checkpoint`: False
289
+ - `no_cuda`: False
290
+ - `use_cpu`: False
291
+ - `use_mps_device`: False
292
+ - `seed`: 42
293
+ - `data_seed`: None
294
+ - `jit_mode_eval`: False
295
+ - `use_ipex`: False
296
+ - `bf16`: False
297
+ - `fp16`: True
298
+ - `fp16_opt_level`: O1
299
+ - `half_precision_backend`: auto
300
+ - `bf16_full_eval`: False
301
+ - `fp16_full_eval`: False
302
+ - `tf32`: None
303
+ - `local_rank`: 0
304
+ - `ddp_backend`: None
305
+ - `tpu_num_cores`: None
306
+ - `tpu_metrics_debug`: False
307
+ - `debug`: []
308
+ - `dataloader_drop_last`: False
309
+ - `dataloader_num_workers`: 8
310
+ - `dataloader_prefetch_factor`: None
311
+ - `past_index`: -1
312
+ - `disable_tqdm`: False
313
+ - `remove_unused_columns`: True
314
+ - `label_names`: None
315
+ - `load_best_model_at_end`: False
316
+ - `ignore_data_skip`: False
317
+ - `fsdp`: []
318
+ - `fsdp_min_num_params`: 0
319
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
320
+ - `fsdp_transformer_layer_cls_to_wrap`: None
321
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
322
+ - `deepspeed`: None
323
+ - `label_smoothing_factor`: 0.0
324
+ - `optim`: adamw_torch
325
+ - `optim_args`: None
326
+ - `adafactor`: False
327
+ - `group_by_length`: False
328
+ - `length_column_name`: length
329
+ - `ddp_find_unused_parameters`: None
330
+ - `ddp_bucket_cap_mb`: None
331
+ - `ddp_broadcast_buffers`: False
332
+ - `dataloader_pin_memory`: True
333
+ - `dataloader_persistent_workers`: False
334
+ - `skip_memory_metrics`: True
335
+ - `use_legacy_prediction_loop`: False
336
+ - `push_to_hub`: False
337
+ - `resume_from_checkpoint`: None
338
+ - `hub_model_id`: None
339
+ - `hub_strategy`: every_save
340
+ - `hub_private_repo`: False
341
+ - `hub_always_push`: False
342
+ - `gradient_checkpointing`: False
343
+ - `gradient_checkpointing_kwargs`: None
344
+ - `include_inputs_for_metrics`: False
345
+ - `eval_do_concat_batches`: True
346
+ - `fp16_backend`: auto
347
+ - `push_to_hub_model_id`: None
348
+ - `push_to_hub_organization`: None
349
+ - `mp_parameters`:
350
+ - `auto_find_batch_size`: False
351
+ - `full_determinism`: False
352
+ - `torchdynamo`: None
353
+ - `ray_scope`: last
354
+ - `ddp_timeout`: 1800
355
+ - `torch_compile`: False
356
+ - `torch_compile_backend`: None
357
+ - `torch_compile_mode`: None
358
+ - `dispatch_batches`: None
359
+ - `split_batches`: None
360
+ - `include_tokens_per_second`: False
361
+ - `include_num_input_tokens_seen`: False
362
+ - `neftune_noise_alpha`: None
363
+ - `optim_target_modules`: None
364
+ - `batch_eval_metrics`: False
365
+ - `eval_on_start`: False
366
+ - `eval_use_gather_object`: False
367
+ - `batch_sampler`: batch_sampler
368
+ - `multi_dataset_batch_sampler`: proportional
369
+
370
+ </details>
371
+
372
+ ### Training Logs
373
+ | Epoch | Step | Training Loss | match-pairs loss | clusters loss |
374
+ |:------:|:----:|:-------------:|:----------------:|:-------------:|
375
+ | 0.3546 | 50 | 0.6678 | 1.0062 | 0.6543 |
376
+ | 0.7092 | 100 | 0.7114 | 0.7569 | 0.6323 |
377
+ | 1.0638 | 150 | 0.6571 | 0.7267 | 0.6181 |
378
+ | 1.4184 | 200 | 0.6263 | 0.9529 | 0.6057 |
379
+ | 1.7730 | 250 | 0.6396 | 0.9458 | 0.5934 |
380
+
381
+
382
+ ### Framework Versions
383
+ - Python: 3.10.12
384
+ - Sentence Transformers: 3.2.0
385
+ - Transformers: 4.44.2
386
+ - PyTorch: 2.4.1+cu121
387
+ - Accelerate: 0.34.2
388
+ - Datasets: 3.0.1
389
+ - Tokenizers: 0.19.1
390
+
391
+ ## Citation
392
+
393
+ ### BibTeX
394
+
395
+ #### Sentence Transformers
396
+ ```bibtex
397
+ @inproceedings{reimers-2019-sentence-bert,
398
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
399
+ author = "Reimers, Nils and Gurevych, Iryna",
400
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
401
+ month = "11",
402
+ year = "2019",
403
+ publisher = "Association for Computational Linguistics",
404
+ url = "https://arxiv.org/abs/1908.10084",
405
+ }
406
+ ```
407
+
408
+ #### MultipleNegativesRankingLoss
409
+ ```bibtex
410
+ @misc{henderson2017efficient,
411
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
412
+ 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},
413
+ year={2017},
414
+ eprint={1705.00652},
415
+ archivePrefix={arXiv},
416
+ primaryClass={cs.CL}
417
+ }
418
+ ```
419
+
420
+ #### BatchHardSoftMarginTripletLoss
421
+ ```bibtex
422
+ @misc{hermans2017defense,
423
+ title={In Defense of the Triplet Loss for Person Re-Identification},
424
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
425
+ year={2017},
426
+ eprint={1703.07737},
427
+ archivePrefix={arXiv},
428
+ primaryClass={cs.CV}
429
+ }
430
+ ```
431
+
432
+ <!--
433
+ ## Glossary
434
+
435
+ *Clearly define terms in order to be accessible across audiences.*
436
+ -->
437
+
438
+ <!--
439
+ ## Model Card Authors
440
+
441
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
442
+ -->
443
+
444
+ <!--
445
+ ## Model Card Contact
446
+
447
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
448
+ -->
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/content/drive/MyDrive/Colab Notebooks/trade-magnet/ai-forever/ru-en-RoSBERTa/checkpoint-282",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 1,
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": 1024,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 4096,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 16,
20
+ "num_hidden_layers": 24,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.44.2",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 98505
28
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "prompts": {
3
+ "classification": "classification: ",
4
+ "search_query": "search_query: ",
5
+ "search_document": "search_document: ",
6
+ "clustering": "clustering: "
7
+ },
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null,
10
+ "__version__": {
11
+ "sentence_transformers": "3.2.0",
12
+ "transformers": "4.44.2",
13
+ "pytorch": "2.4.1+cu121"
14
+ }
15
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ddf5658c9df608ea468071c9bf4b11cd4b7e3c2dff63be3fc154d4467cd39fe
3
+ size 1619075072
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": 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": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": true,
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": true,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": true,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<pad>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<s>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "bos_token": "<s>",
46
+ "clean_up_tokenization_spaces": true,
47
+ "cls_token": "<s>",
48
+ "eos_token": "</s>",
49
+ "errors": "replace",
50
+ "mask_token": "<mask>",
51
+ "max_length": 512,
52
+ "model_max_length": 128,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "<pad>",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "</s>",
58
+ "stride": 0,
59
+ "tokenizer_class": "RobertaTokenizer",
60
+ "trim_offsets": true,
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "<unk>"
64
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff