andyP commited on
Commit
f7d4088
·
verified ·
1 Parent(s): f164b3a

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ro
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - dense
10
+ - generated_from_trainer
11
+ - dataset_size:1014696
12
+ - loss:TripletLoss
13
+ base_model: readerbench/RoBERT-base
14
+ widget:
15
+ - source_sentence: Și i-a trimis să predice împărăția lui Dumnezeu și să vindece bolnavii.
16
+ sentences:
17
+ - Nici nu le-ai auzit, nici nu le-ai cunoscutși nici atunci, demult, urechea nu
18
+ ți-a fost deschisă să le auzi.Căci am știut că sigur te vei purta cu necredincioșieși
19
+ că, încă din pântec, ai fost numit răzvrătit.
20
+ - Apoi, i-a trimis să propovăduiască Împărăția lui Dumnezeu și să tămăduiască pe
21
+ cei bolnavi.
22
+ - 'Ei s‑au adunat împotriva lui Moise și a lui Aaron și le‑au zis: „Până aici! Ajunge!
23
+ Toată adunarea, toți sunt sfinți și DOMNUL este în mijlocul lor! De ce vă înălțați
24
+ voi mai presus de adunarea DOMNULUI?”'
25
+ - source_sentence: Dar din adâncimile gropii am chemat numele Tău, Doamne.
26
+ sentences:
27
+ - Dar am chemat Numele Tău, Doamne, din fundul gropii.
28
+ - O, prelungește bunătatea ta iubitoare celor ce te cunosc și dreptatea ta celor
29
+ integri în inimă.
30
+ - 'Apoi, Isus i-a zis: „Vezi să nu spui la nimeni, ci du-te de te arată preotului
31
+ și adu darul pe care l-a rânduit Moise, ca mărturie pentru ei.”'
32
+ - source_sentence: Și fă drugii din lemn de salcâm și îmbracă-i cu aur.
33
+ sentences:
34
+ - Meșobab; Iamlec; Ioșa, fiul lui Amația;
35
+ - Și să faci pârghiile din lemn de salcâm și să le îmbraci cu aur.
36
+ - Coț, pe Anub, l-a dobândit, Pe Hațobebe și-n sfârșit, Pe cei cari țin de Aharhel
37
+ – Al lui Harum fiu, este el.
38
+ - source_sentence: Da, pentru tine, Sioane, pentru sângele legământului făcut cu tine,i-am
39
+ eliberat pe prizonierii tăidin groapa fără apă.
40
+ sentences:
41
+ - cunoscut fiind într‐adevăr mai înainte de întemeierea lumii, dar arătat la sfârșitul
42
+ vremurilor pentru voi,
43
+ - „La paisprezece ani, apoi, Luat-am drumul înapoi, Către Ierusalim, urmat Și de
44
+ Barnaba. L-am chemat, Atuncea, și pe Tit, cu mine.
45
+ - Cât despre tine, datorită sângelui legământului Meu cu tine,îți voi elibera captivii
46
+ din groapa fără apă.
47
+ - source_sentence: 'Atunci veți începe să spuneți: «Noi am mâncat și am băut în fața
48
+ Ta și pe străzile noastre ai dat învățături!»'
49
+ sentences:
50
+ - 'Atunci veți începe să ziceți: Noi am mâncat și am băut înaintea ta și ne‐ai învățat
51
+ în ulițele noastre.'
52
+ - 'Au pus martori mincinoși, care ziceau: „Omul acesta nu încetează să vorbească
53
+ împotriva acestui loc sfânt și împotriva Legii.'
54
+ - Iar mulţimile se mirau văzând că muţii vorbesc, ciungii se vindecă, şchiopii umblă
55
+ şi orbii văd. Şi slăveau pe Dumnezeul lui Israel.
56
+ pipeline_tag: sentence-similarity
57
+ library_name: sentence-transformers
58
+ metrics:
59
+ - cosine_accuracy
60
+ model-index:
61
+ - name: Romanian Sentence Transformers, trained on the Romanian Paraphrase Bible dataset
62
+ results:
63
+ - task:
64
+ type: triplet
65
+ name: Triplet
66
+ dataset:
67
+ name: ro similarity dev
68
+ type: ro_similarity-dev
69
+ metrics:
70
+ - type: cosine_accuracy
71
+ value: 0.2702050805091858
72
+ name: Cosine Accuracy
73
+ - task:
74
+ type: triplet
75
+ name: Triplet
76
+ dataset:
77
+ name: ro similarity test
78
+ type: ro_similarity-test
79
+ metrics:
80
+ - type: cosine_accuracy
81
+ value: 0.2652735412120819
82
+ name: Cosine Accuracy
83
+ ---
84
+
85
+ # Romanian Sentence Transformers, trained on the Romanian Paraphrase Bible dataset
86
+
87
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [readerbench/RoBERT-base](https://huggingface.co/readerbench/RoBERT-base). 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.
88
+
89
+ ## Model Details
90
+
91
+ ### Model Description
92
+ - **Model Type:** Sentence Transformer
93
+ - **Base model:** [readerbench/RoBERT-base](https://huggingface.co/readerbench/RoBERT-base) <!-- at revision 5cd118697a6dee9e8ffe03cea5aa3931555c001a -->
94
+ - **Maximum Sequence Length:** 512 tokens
95
+ - **Output Dimensionality:** 768 dimensions
96
+ - **Similarity Function:** Cosine Similarity
97
+ <!-- - **Training Dataset:** Unknown -->
98
+ - **Language:** ro
99
+ - **License:** apache-2.0
100
+
101
+ ### Model Sources
102
+
103
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
104
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
105
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
106
+
107
+ ### Full Model Architecture
108
+
109
+ ```
110
+ SentenceTransformer(
111
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'BertModel'})
112
+ (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})
113
+ )
114
+ ```
115
+
116
+ ## Usage
117
+
118
+ ### Direct Usage (Sentence Transformers)
119
+
120
+ First install the Sentence Transformers library:
121
+
122
+ ```bash
123
+ pip install -U sentence-transformers
124
+ ```
125
+
126
+ Then you can load this model and run inference.
127
+ ```python
128
+ from sentence_transformers import SentenceTransformer
129
+
130
+ # Download from the 🤗 Hub
131
+ model = SentenceTransformer("andyP/ro-sentence-transformers-v1")
132
+ # Run inference
133
+ sentences = [
134
+ 'Atunci veți începe să spuneți: «Noi am mâncat și am băut în fața Ta și pe străzile noastre ai dat învățături!»',
135
+ 'Atunci veți începe să ziceți: Noi am mâncat și am băut înaintea ta și ne‐ai învățat în ulițele noastre.',
136
+ 'Iar mulţimile se mirau văzând că muţii vorbesc, ciungii se vindecă, şchiopii umblă şi orbii văd. Şi slăveau pe Dumnezeul lui Israel.',
137
+ ]
138
+ embeddings = model.encode(sentences)
139
+ print(embeddings.shape)
140
+ # [3, 768]
141
+
142
+ # Get the similarity scores for the embeddings
143
+ similarities = model.similarity(embeddings, embeddings)
144
+ print(similarities)
145
+ # tensor([[ 1.0000, -0.0844, 0.2598],
146
+ # [-0.0844, 1.0000, 0.0068],
147
+ # [ 0.2598, 0.0068, 1.0000]])
148
+ ```
149
+
150
+ <!--
151
+ ### Direct Usage (Transformers)
152
+
153
+ <details><summary>Click to see the direct usage in Transformers</summary>
154
+
155
+ </details>
156
+ -->
157
+
158
+ <!--
159
+ ### Downstream Usage (Sentence Transformers)
160
+
161
+ You can finetune this model on your own dataset.
162
+
163
+ <details><summary>Click to expand</summary>
164
+
165
+ </details>
166
+ -->
167
+
168
+ <!--
169
+ ### Out-of-Scope Use
170
+
171
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
172
+ -->
173
+
174
+ ## Evaluation
175
+
176
+ ### Metrics
177
+
178
+ #### Triplet
179
+
180
+ * Datasets: `ro_similarity-dev` and `ro_similarity-test`
181
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
182
+
183
+ | Metric | ro_similarity-dev | ro_similarity-test |
184
+ |:--------------------|:------------------|:-------------------|
185
+ | **cosine_accuracy** | **0.2702** | **0.2653** |
186
+
187
+ <!--
188
+ ## Bias, Risks and Limitations
189
+
190
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
191
+ -->
192
+
193
+ <!--
194
+ ### Recommendations
195
+
196
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
197
+ -->
198
+
199
+ ## Training Details
200
+
201
+ ### Training Dataset
202
+
203
+ #### Unnamed Dataset
204
+
205
+ * Size: 1,014,696 training samples
206
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
207
+ * Approximate statistics based on the first 1000 samples:
208
+ | | anchor | positive | negative |
209
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
210
+ | type | string | string | string |
211
+ | details | <ul><li>min: 9 tokens</li><li>mean: 39.92 tokens</li><li>max: 153 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 36.11 tokens</li><li>max: 123 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 39.04 tokens</li><li>max: 151 tokens</li></ul> |
212
+ * Samples:
213
+ | anchor | positive | negative |
214
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|
215
+ | <code>Căci viața – daru-acesta sfânt – Acuma, fost-a arătată, Iar noi, care-am văzut-o, iată Că despre ea, mărturisim Și, tuturora, vă vestim De viața veșnică, aflată, La Tatăl – nouă – arătată;</code> | <code>– căci viața a fost arătată, iar noi am văzut și mărturisim și vă vestim viața veșnică, viață care era cu Tatăl și care ne-a fost arătată –</code> | <code>Au făcut și doi heruvimi, din aur bătut, la cele două capete ale Capacului ispășirii,</code> |
216
+ | <code>Dar dintre cele care doar rumegă sau care au doar copita despicată, să nu mâncați. Acestea sunt: cămila, iepurele sălbatic și viezurele; pentru că ele, deși rumegă, nu au copita despicată. Să le considerați necurate.</code> | <code>Dar dintre cele care doar rumegă sau au doar copita despicată, să nu mâncați următoarele: cămila, iepurele sălbatic și viezurele, pentru că, deși rumegă, acestea nu au copita despicată. Să fie pentru voi necurate.</code> | <code>Nimeni să nu‑ți disprețuiască tinerețea, ci fii o pildă pentru credincioși: în vorbire, în purtare, în dragoste, în credință, în curăție!</code> |
217
+ | <code>Din tribul lui Zabulon: Gadiel, fiul lui Sodi.</code> | <code>Eu m-am întors și am coborât de pe acel munte care ardea ca un foc. Țineam în mâini cele două table ale Legământului.</code> | <code>Dar nelegiuitul alunecă ușor pe fața apelor,pe pământ n-are decât o parte blestematăși niciodată n-apucă pe drumul celor vii!</code> |
218
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
219
+ ```json
220
+ {
221
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
222
+ "triplet_margin": 5
223
+ }
224
+ ```
225
+
226
+ ### Evaluation Dataset
227
+
228
+ #### Unnamed Dataset
229
+
230
+ * Size: 56,372 evaluation samples
231
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
232
+ * Approximate statistics based on the first 1000 samples:
233
+ | | anchor | positive | negative |
234
+ |:--------|:------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
235
+ | type | string | string | string |
236
+ | details | <ul><li>min: 11 tokens</li><li>mean: 38.83 tokens</li><li>max: 142 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 35.87 tokens</li><li>max: 141 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 39.9 tokens</li><li>max: 142 tokens</li></ul> |
237
+ * Samples:
238
+ | anchor | positive | negative |
239
+ |:----------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
240
+ | <code>Ridicându-se, marele preot și toți cei care erau împreună cu el, adică gruparea saducheilor, s-au umplut de mânie,</code> | <code>Ridicându-se marele preot și toți cei care erau cu el, adică gruparea saduceilor, s-au umplut de mânie,</code> | <code>Căci Domnul mângâie Siónul,mângâie toate ruinele sale,transformă pustiul într-un Édenși ținutul uscatîntr-o grădină a Domnului.În ea va fi bucurie și veselie,mulțumire și sunet de cântare.</code> |
241
+ | <code>Ce va rămâne din darul de mâncare, să fie dat lui Aaron și fiilor lui, ca parte foarte sfântă a sacrificiilor consumate de foc pentru Iahve.</code> | <code>Partea care va rămâne din ofrandă să fie a lui Aaron și a fiilor lui: este un lucru preasfânt din jertfele mistuite de foc aduse DOMNULUI.</code> | <code>Ție îți voi aduce sacrificiul de mulțumire și voi chema numele DOMNULUI.</code> |
242
+ | <code>Și în trei caturi se găseau. Ferestrele ce le aveau – Și cari în ziduri sunt tăiate – Față în față-au fost aflate.</code> | <code>Erau trei caturi și fiecare din ele avea ferestrele față în față.</code> | <code>Noi am plecat înainte și am călătorit cu corabia până la Asos. În acea localitate urma să ne întâlnim cu Pavel, pentru că el trebuia să ajungă acolo pe jos.</code> |
243
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
244
+ ```json
245
+ {
246
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
247
+ "triplet_margin": 5
248
+ }
249
+ ```
250
+
251
+ ### Training Hyperparameters
252
+ #### Non-Default Hyperparameters
253
+
254
+ - `eval_strategy`: steps
255
+ - `per_device_train_batch_size`: 156
256
+ - `per_device_eval_batch_size`: 256
257
+ - `learning_rate`: 2e-05
258
+ - `num_train_epochs`: 10
259
+ - `warmup_ratio`: 0.1
260
+ - `bf16`: True
261
+ - `load_best_model_at_end`: True
262
+ - `batch_sampler`: no_duplicates
263
+
264
+ #### All Hyperparameters
265
+ <details><summary>Click to expand</summary>
266
+
267
+ - `overwrite_output_dir`: False
268
+ - `do_predict`: False
269
+ - `eval_strategy`: steps
270
+ - `prediction_loss_only`: True
271
+ - `per_device_train_batch_size`: 156
272
+ - `per_device_eval_batch_size`: 256
273
+ - `per_gpu_train_batch_size`: None
274
+ - `per_gpu_eval_batch_size`: None
275
+ - `gradient_accumulation_steps`: 1
276
+ - `eval_accumulation_steps`: None
277
+ - `torch_empty_cache_steps`: None
278
+ - `learning_rate`: 2e-05
279
+ - `weight_decay`: 0.0
280
+ - `adam_beta1`: 0.9
281
+ - `adam_beta2`: 0.999
282
+ - `adam_epsilon`: 1e-08
283
+ - `max_grad_norm`: 1.0
284
+ - `num_train_epochs`: 10
285
+ - `max_steps`: -1
286
+ - `lr_scheduler_type`: linear
287
+ - `lr_scheduler_kwargs`: {}
288
+ - `warmup_ratio`: 0.1
289
+ - `warmup_steps`: 0
290
+ - `log_level`: passive
291
+ - `log_level_replica`: warning
292
+ - `log_on_each_node`: True
293
+ - `logging_nan_inf_filter`: True
294
+ - `save_safetensors`: True
295
+ - `save_on_each_node`: False
296
+ - `save_only_model`: False
297
+ - `restore_callback_states_from_checkpoint`: False
298
+ - `no_cuda`: False
299
+ - `use_cpu`: False
300
+ - `use_mps_device`: False
301
+ - `seed`: 42
302
+ - `data_seed`: None
303
+ - `jit_mode_eval`: False
304
+ - `use_ipex`: False
305
+ - `bf16`: True
306
+ - `fp16`: False
307
+ - `fp16_opt_level`: O1
308
+ - `half_precision_backend`: auto
309
+ - `bf16_full_eval`: False
310
+ - `fp16_full_eval`: False
311
+ - `tf32`: None
312
+ - `local_rank`: 1
313
+ - `ddp_backend`: None
314
+ - `tpu_num_cores`: None
315
+ - `tpu_metrics_debug`: False
316
+ - `debug`: []
317
+ - `dataloader_drop_last`: True
318
+ - `dataloader_num_workers`: 0
319
+ - `dataloader_prefetch_factor`: None
320
+ - `past_index`: -1
321
+ - `disable_tqdm`: False
322
+ - `remove_unused_columns`: True
323
+ - `label_names`: None
324
+ - `load_best_model_at_end`: True
325
+ - `ignore_data_skip`: False
326
+ - `fsdp`: []
327
+ - `fsdp_min_num_params`: 0
328
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
329
+ - `fsdp_transformer_layer_cls_to_wrap`: None
330
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
331
+ - `deepspeed`: None
332
+ - `label_smoothing_factor`: 0.0
333
+ - `optim`: adamw_torch
334
+ - `optim_args`: None
335
+ - `adafactor`: False
336
+ - `group_by_length`: False
337
+ - `length_column_name`: length
338
+ - `ddp_find_unused_parameters`: None
339
+ - `ddp_bucket_cap_mb`: None
340
+ - `ddp_broadcast_buffers`: False
341
+ - `dataloader_pin_memory`: True
342
+ - `dataloader_persistent_workers`: False
343
+ - `skip_memory_metrics`: True
344
+ - `use_legacy_prediction_loop`: False
345
+ - `push_to_hub`: False
346
+ - `resume_from_checkpoint`: None
347
+ - `hub_model_id`: None
348
+ - `hub_strategy`: every_save
349
+ - `hub_private_repo`: None
350
+ - `hub_always_push`: False
351
+ - `hub_revision`: None
352
+ - `gradient_checkpointing`: False
353
+ - `gradient_checkpointing_kwargs`: None
354
+ - `include_inputs_for_metrics`: False
355
+ - `include_for_metrics`: []
356
+ - `eval_do_concat_batches`: True
357
+ - `fp16_backend`: auto
358
+ - `push_to_hub_model_id`: None
359
+ - `push_to_hub_organization`: None
360
+ - `mp_parameters`:
361
+ - `auto_find_batch_size`: False
362
+ - `full_determinism`: False
363
+ - `torchdynamo`: None
364
+ - `ray_scope`: last
365
+ - `ddp_timeout`: 1800
366
+ - `torch_compile`: False
367
+ - `torch_compile_backend`: None
368
+ - `torch_compile_mode`: None
369
+ - `include_tokens_per_second`: False
370
+ - `include_num_input_tokens_seen`: False
371
+ - `neftune_noise_alpha`: None
372
+ - `optim_target_modules`: None
373
+ - `batch_eval_metrics`: False
374
+ - `eval_on_start`: False
375
+ - `use_liger_kernel`: False
376
+ - `liger_kernel_config`: None
377
+ - `eval_use_gather_object`: False
378
+ - `average_tokens_across_devices`: False
379
+ - `prompts`: None
380
+ - `batch_sampler`: no_duplicates
381
+ - `multi_dataset_batch_sampler`: proportional
382
+ - `router_mapping`: {}
383
+ - `learning_rate_mapping`: {}
384
+
385
+ </details>
386
+
387
+ ### Training Logs
388
+ | Epoch | Step | Training Loss | Validation Loss | ro_similarity-dev_cosine_accuracy | ro_similarity-test_cosine_accuracy |
389
+ |:----------:|:---------:|:-------------:|:---------------:|:---------------------------------:|:----------------------------------:|
390
+ | 0.3075 | 1000 | 4.635 | 4.7713 | 0.4223 | - |
391
+ | 0.6150 | 2000 | 3.1348 | 4.4889 | 0.3678 | - |
392
+ | 0.9225 | 3000 | 2.8894 | 4.2360 | 0.3451 | - |
393
+ | 1.2300 | 4000 | 2.7448 | 3.9488 | 0.3259 | - |
394
+ | 1.5375 | 5000 | 2.6447 | 4.0398 | 0.3256 | - |
395
+ | 1.8450 | 6000 | 2.5843 | 3.8490 | 0.3127 | - |
396
+ | 2.1525 | 7000 | 2.5125 | 3.6485 | 0.3061 | - |
397
+ | 2.4600 | 8000 | 2.4558 | 3.6591 | 0.3012 | - |
398
+ | 2.7675 | 9000 | 2.4151 | 3.6976 | 0.3199 | - |
399
+ | 3.0750 | 10000 | 2.3673 | 3.8166 | 0.3213 | - |
400
+ | 3.3825 | 11000 | 2.33 | 3.8099 | 0.3081 | - |
401
+ | 3.6900 | 12000 | 2.3025 | 3.7273 | 0.3079 | - |
402
+ | 3.9975 | 13000 | 2.2748 | 3.6883 | 0.2974 | - |
403
+ | 4.3050 | 14000 | 2.2312 | 3.7944 | 0.3081 | - |
404
+ | 4.6125 | 15000 | 2.2177 | 3.6095 | 0.2992 | - |
405
+ | 4.9200 | 16000 | 2.1936 | 3.6556 | 0.2941 | - |
406
+ | 5.2276 | 17000 | 2.1657 | 3.6203 | 0.2977 | - |
407
+ | 5.5351 | 18000 | 2.1387 | 3.5715 | 0.2904 | - |
408
+ | 5.8426 | 19000 | 2.1285 | 3.5195 | 0.2870 | - |
409
+ | 6.1501 | 20000 | 2.0988 | 3.3412 | 0.2776 | - |
410
+ | 6.4576 | 21000 | 2.084 | 3.4944 | 0.2782 | - |
411
+ | 6.7651 | 22000 | 2.0676 | 3.3771 | 0.2770 | - |
412
+ | 7.0726 | 23000 | 2.0543 | 3.4210 | 0.2823 | - |
413
+ | 7.3801 | 24000 | 2.0357 | 3.4060 | 0.2765 | - |
414
+ | 7.6876 | 25000 | 2.0251 | 3.4027 | 0.2794 | - |
415
+ | 7.9951 | 26000 | 2.0134 | 3.2960 | 0.2741 | - |
416
+ | 8.3026 | 27000 | 1.9881 | 3.3512 | 0.2726 | - |
417
+ | 8.6101 | 28000 | 1.9898 | 3.2822 | 0.2731 | - |
418
+ | 8.9176 | 29000 | 1.9788 | 3.2444 | 0.2711 | - |
419
+ | **9.2251** | **30000** | **1.9548** | **3.2346** | **0.2682** | **-** |
420
+ | 9.5326 | 31000 | 1.9525 | 3.2601 | 0.2713 | - |
421
+ | 9.8401 | 32000 | 1.9535 | 3.2555 | 0.2702 | - |
422
+ | -1 | -1 | - | - | - | 0.2653 |
423
+
424
+ * The bold row denotes the saved checkpoint.
425
+
426
+ ### Framework Versions
427
+ - Python: 3.12.3
428
+ - Sentence Transformers: 5.0.0
429
+ - Transformers: 4.53.3
430
+ - PyTorch: 2.7.1+cu126
431
+ - Accelerate: 1.9.0
432
+ - Datasets: 4.0.0
433
+ - Tokenizers: 0.21.2
434
+
435
+ ## Citation
436
+
437
+ ### BibTeX
438
+
439
+ #### Sentence Transformers
440
+ ```bibtex
441
+ @inproceedings{reimers-2019-sentence-bert,
442
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
443
+ author = "Reimers, Nils and Gurevych, Iryna",
444
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
445
+ month = "11",
446
+ year = "2019",
447
+ publisher = "Association for Computational Linguistics",
448
+ url = "https://arxiv.org/abs/1908.10084",
449
+ }
450
+ ```
451
+
452
+ #### TripletLoss
453
+ ```bibtex
454
+ @misc{hermans2017defense,
455
+ title={In Defense of the Triplet Loss for Person Re-Identification},
456
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
457
+ year={2017},
458
+ eprint={1703.07737},
459
+ archivePrefix={arXiv},
460
+ primaryClass={cs.CV}
461
+ }
462
+ ```
463
+
464
+ <!--
465
+ ## Glossary
466
+
467
+ *Clearly define terms in order to be accessible across audiences.*
468
+ -->
469
+
470
+ <!--
471
+ ## Model Card Authors
472
+
473
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
474
+ -->
475
+
476
+ <!--
477
+ ## Model Card Contact
478
+
479
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
480
+ -->
config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "do_lower_case": 1,
8
+ "do_remove_accents": 0,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-12,
16
+ "max_position_embeddings": 512,
17
+ "model_type": "bert",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "pad_token_id": 0,
21
+ "position_embedding_type": "absolute",
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.53.3",
24
+ "type_vocab_size": 2,
25
+ "use_cache": true,
26
+ "vocab_size": 37788
27
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SentenceTransformer",
3
+ "__version__": {
4
+ "sentence_transformers": "5.0.0",
5
+ "transformers": "4.53.3",
6
+ "pytorch": "2.7.1+cu126"
7
+ },
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e7cff10ba21bbdf44c1d3dacc66a81fa23f52d82eeab3480e0c0aa82894c942
3
+ size 460272488
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,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
+ "2": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "3": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "4": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "5": {
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": 512,
51
+ "model_max_length": 512,
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": false,
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