ashishkumarsahani commited on
Commit
089c407
·
verified ·
1 Parent(s): 9e6365f

Add new SentenceTransformer model

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ 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
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
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,461 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:557850
10
+ - loss:MultipleNegativesRankingLoss
11
+ base_model: dangvantuan/french-document-embedding
12
+ widget:
13
+ - source_sentence: A man is jumping unto his filthy bed.
14
+ sentences:
15
+ - A young male is looking at a newspaper while 2 females walks past him.
16
+ - The bed is dirty.
17
+ - The man is on the moon.
18
+ - source_sentence: A carefully balanced male stands on one foot near a clean ocean
19
+ beach area.
20
+ sentences:
21
+ - A man is ouside near the beach.
22
+ - Three policemen patrol the streets on bikes
23
+ - A man is sitting on his couch.
24
+ - source_sentence: The man is wearing a blue shirt.
25
+ sentences:
26
+ - Near the trashcan the man stood and smoked
27
+ - A man in a blue shirt leans on a wall beside a road with a blue van and red car
28
+ with water in the background.
29
+ - A man in a black shirt is playing a guitar.
30
+ - source_sentence: The girls are outdoors.
31
+ sentences:
32
+ - Two girls riding on an amusement part ride.
33
+ - a guy laughs while doing laundry
34
+ - Three girls are standing together in a room, one is listening, one is writing
35
+ on a wall and the third is talking to them.
36
+ - source_sentence: A construction worker peeking out of a manhole while his coworker
37
+ sits on the sidewalk smiling.
38
+ sentences:
39
+ - A worker is looking out of a manhole.
40
+ - A man is giving a presentation.
41
+ - The workers are both inside the manhole.
42
+ datasets:
43
+ - sentence-transformers/all-nli
44
+ pipeline_tag: sentence-similarity
45
+ library_name: sentence-transformers
46
+ metrics:
47
+ - cosine_accuracy
48
+ model-index:
49
+ - name: SentenceTransformer based on dangvantuan/french-document-embedding
50
+ results:
51
+ - task:
52
+ type: triplet
53
+ name: Triplet
54
+ dataset:
55
+ name: all nli test fine tuned model
56
+ type: all-nli-test-fine-tuned-model
57
+ metrics:
58
+ - type: cosine_accuracy
59
+ value: 0.9273717657739446
60
+ name: Cosine Accuracy
61
+ - type: cosine_accuracy
62
+ value: 0.9167801482826449
63
+ name: Cosine Accuracy
64
+ ---
65
+
66
+ # SentenceTransformer based on dangvantuan/french-document-embedding
67
+
68
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [dangvantuan/french-document-embedding](https://huggingface.co/dangvantuan/french-document-embedding) on the [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) 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.
69
+
70
+ ## Model Details
71
+
72
+ ### Model Description
73
+ - **Model Type:** Sentence Transformer
74
+ - **Base model:** [dangvantuan/french-document-embedding](https://huggingface.co/dangvantuan/french-document-embedding) <!-- at revision 4f99da7d847d33af7a89107de805f1af881c5018 -->
75
+ - **Maximum Sequence Length:** 8192 tokens
76
+ - **Output Dimensionality:** 768 dimensions
77
+ - **Similarity Function:** Cosine Similarity
78
+ - **Training Dataset:**
79
+ - [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
80
+ - **Language:** en
81
+ <!-- - **License:** Unknown -->
82
+
83
+ ### Model Sources
84
+
85
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
86
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
87
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
88
+
89
+ ### Full Model Architecture
90
+
91
+ ```
92
+ SentenceTransformer(
93
+ (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: BilingualModel
94
+ (1): Pooling({'word_embedding_dimension': 768, '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})
95
+ (2): Normalize()
96
+ )
97
+ ```
98
+
99
+ ## Usage
100
+
101
+ ### Direct Usage (Sentence Transformers)
102
+
103
+ First install the Sentence Transformers library:
104
+
105
+ ```bash
106
+ pip install -U sentence-transformers
107
+ ```
108
+
109
+ Then you can load this model and run inference.
110
+ ```python
111
+ from sentence_transformers import SentenceTransformer
112
+
113
+ # Download from the 🤗 Hub
114
+ model = SentenceTransformer("ashishkumarsahani/mpnet-base-all-nli-triplet")
115
+ # Run inference
116
+ sentences = [
117
+ 'A construction worker peeking out of a manhole while his coworker sits on the sidewalk smiling.',
118
+ 'A worker is looking out of a manhole.',
119
+ 'The workers are both inside the manhole.',
120
+ ]
121
+ embeddings = model.encode(sentences)
122
+ print(embeddings.shape)
123
+ # [3, 768]
124
+
125
+ # Get the similarity scores for the embeddings
126
+ similarities = model.similarity(embeddings, embeddings)
127
+ print(similarities.shape)
128
+ # [3, 3]
129
+ ```
130
+
131
+ <!--
132
+ ### Direct Usage (Transformers)
133
+
134
+ <details><summary>Click to see the direct usage in Transformers</summary>
135
+
136
+ </details>
137
+ -->
138
+
139
+ <!--
140
+ ### Downstream Usage (Sentence Transformers)
141
+
142
+ You can finetune this model on your own dataset.
143
+
144
+ <details><summary>Click to expand</summary>
145
+
146
+ </details>
147
+ -->
148
+
149
+ <!--
150
+ ### Out-of-Scope Use
151
+
152
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
153
+ -->
154
+
155
+ ## Evaluation
156
+
157
+ ### Metrics
158
+
159
+ #### Triplet
160
+
161
+ * Dataset: `all-nli-test-fine-tuned-model`
162
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
163
+
164
+ | Metric | Value |
165
+ |:--------------------|:-----------|
166
+ | **cosine_accuracy** | **0.9274** |
167
+
168
+ #### Triplet
169
+
170
+ * Dataset: `all-nli-test-fine-tuned-model`
171
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
172
+
173
+ | Metric | Value |
174
+ |:--------------------|:-----------|
175
+ | **cosine_accuracy** | **0.9168** |
176
+
177
+ <!--
178
+ ## Bias, Risks and Limitations
179
+
180
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
181
+ -->
182
+
183
+ <!--
184
+ ### Recommendations
185
+
186
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
187
+ -->
188
+
189
+ ## Training Details
190
+
191
+ ### Training Dataset
192
+
193
+ #### all-nli
194
+
195
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
196
+ * Size: 557,850 training samples
197
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
198
+ * Approximate statistics based on the first 1000 samples:
199
+ | | anchor | positive | negative |
200
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
201
+ | type | string | string | string |
202
+ | details | <ul><li>min: 7 tokens</li><li>mean: 10.9 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 13.62 tokens</li><li>max: 42 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.76 tokens</li><li>max: 55 tokens</li></ul> |
203
+ * Samples:
204
+ | anchor | positive | negative |
205
+ |:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
206
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
207
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
208
+ | <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
209
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
210
+ ```json
211
+ {
212
+ "scale": 20.0,
213
+ "similarity_fct": "cos_sim"
214
+ }
215
+ ```
216
+
217
+ ### Evaluation Dataset
218
+
219
+ #### all-nli
220
+
221
+ * Dataset: [all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) at [d482672](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab)
222
+ * Size: 6,584 evaluation samples
223
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
224
+ * Approximate statistics based on the first 1000 samples:
225
+ | | anchor | positive | negative |
226
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
227
+ | type | string | string | string |
228
+ | details | <ul><li>min: 6 tokens</li><li>mean: 20.31 tokens</li><li>max: 83 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.71 tokens</li><li>max: 35 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 11.39 tokens</li><li>max: 32 tokens</li></ul> |
229
+ * Samples:
230
+ | anchor | positive | negative |
231
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
232
+ | <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
233
+ | <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
234
+ | <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
235
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
236
+ ```json
237
+ {
238
+ "scale": 20.0,
239
+ "similarity_fct": "cos_sim"
240
+ }
241
+ ```
242
+
243
+ ### Training Hyperparameters
244
+ #### Non-Default Hyperparameters
245
+
246
+ - `eval_strategy`: steps
247
+ - `per_device_train_batch_size`: 64
248
+ - `per_device_eval_batch_size`: 64
249
+ - `num_train_epochs`: 30
250
+ - `warmup_ratio`: 0.1
251
+ - `fp16`: True
252
+ - `batch_sampler`: no_duplicates
253
+
254
+ #### All Hyperparameters
255
+ <details><summary>Click to expand</summary>
256
+
257
+ - `overwrite_output_dir`: False
258
+ - `do_predict`: False
259
+ - `eval_strategy`: steps
260
+ - `prediction_loss_only`: True
261
+ - `per_device_train_batch_size`: 64
262
+ - `per_device_eval_batch_size`: 64
263
+ - `per_gpu_train_batch_size`: None
264
+ - `per_gpu_eval_batch_size`: None
265
+ - `gradient_accumulation_steps`: 1
266
+ - `eval_accumulation_steps`: None
267
+ - `torch_empty_cache_steps`: None
268
+ - `learning_rate`: 5e-05
269
+ - `weight_decay`: 0.0
270
+ - `adam_beta1`: 0.9
271
+ - `adam_beta2`: 0.999
272
+ - `adam_epsilon`: 1e-08
273
+ - `max_grad_norm`: 1.0
274
+ - `num_train_epochs`: 30
275
+ - `max_steps`: -1
276
+ - `lr_scheduler_type`: linear
277
+ - `lr_scheduler_kwargs`: {}
278
+ - `warmup_ratio`: 0.1
279
+ - `warmup_steps`: 0
280
+ - `log_level`: passive
281
+ - `log_level_replica`: warning
282
+ - `log_on_each_node`: True
283
+ - `logging_nan_inf_filter`: True
284
+ - `save_safetensors`: True
285
+ - `save_on_each_node`: False
286
+ - `save_only_model`: False
287
+ - `restore_callback_states_from_checkpoint`: False
288
+ - `no_cuda`: False
289
+ - `use_cpu`: False
290
+ - `use_mps_device`: False
291
+ - `seed`: 42
292
+ - `data_seed`: None
293
+ - `jit_mode_eval`: False
294
+ - `use_ipex`: False
295
+ - `bf16`: False
296
+ - `fp16`: True
297
+ - `fp16_opt_level`: O1
298
+ - `half_precision_backend`: auto
299
+ - `bf16_full_eval`: False
300
+ - `fp16_full_eval`: False
301
+ - `tf32`: None
302
+ - `local_rank`: 0
303
+ - `ddp_backend`: None
304
+ - `tpu_num_cores`: None
305
+ - `tpu_metrics_debug`: False
306
+ - `debug`: []
307
+ - `dataloader_drop_last`: False
308
+ - `dataloader_num_workers`: 0
309
+ - `dataloader_prefetch_factor`: None
310
+ - `past_index`: -1
311
+ - `disable_tqdm`: False
312
+ - `remove_unused_columns`: True
313
+ - `label_names`: None
314
+ - `load_best_model_at_end`: False
315
+ - `ignore_data_skip`: False
316
+ - `fsdp`: []
317
+ - `fsdp_min_num_params`: 0
318
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
319
+ - `fsdp_transformer_layer_cls_to_wrap`: None
320
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
321
+ - `deepspeed`: None
322
+ - `label_smoothing_factor`: 0.0
323
+ - `optim`: adamw_torch
324
+ - `optim_args`: None
325
+ - `adafactor`: False
326
+ - `group_by_length`: False
327
+ - `length_column_name`: length
328
+ - `ddp_find_unused_parameters`: None
329
+ - `ddp_bucket_cap_mb`: None
330
+ - `ddp_broadcast_buffers`: False
331
+ - `dataloader_pin_memory`: True
332
+ - `dataloader_persistent_workers`: False
333
+ - `skip_memory_metrics`: True
334
+ - `use_legacy_prediction_loop`: False
335
+ - `push_to_hub`: False
336
+ - `resume_from_checkpoint`: None
337
+ - `hub_model_id`: None
338
+ - `hub_strategy`: every_save
339
+ - `hub_private_repo`: None
340
+ - `hub_always_push`: False
341
+ - `gradient_checkpointing`: False
342
+ - `gradient_checkpointing_kwargs`: None
343
+ - `include_inputs_for_metrics`: False
344
+ - `include_for_metrics`: []
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
+ - `use_liger_kernel`: False
367
+ - `eval_use_gather_object`: False
368
+ - `average_tokens_across_devices`: False
369
+ - `prompts`: None
370
+ - `batch_sampler`: no_duplicates
371
+ - `multi_dataset_batch_sampler`: proportional
372
+
373
+ </details>
374
+
375
+ ### Training Logs
376
+ | Epoch | Step | Training Loss | Validation Loss | all-nli-test-fine-tuned-model_cosine_accuracy |
377
+ |:-------:|:----:|:-------------:|:---------------:|:---------------------------------------------:|
378
+ | 1.2532 | 100 | 0.6752 | 0.4999 | - |
379
+ | 2.5063 | 200 | 0.1636 | 0.5127 | - |
380
+ | 2.9747 | 237 | - | - | 0.9274 |
381
+ | 1.2532 | 100 | 0.0877 | 0.5512 | - |
382
+ | 2.5063 | 200 | 0.0441 | 0.6048 | - |
383
+ | 3.7595 | 300 | 0.0247 | 0.6856 | - |
384
+ | 5.0127 | 400 | 0.0235 | 0.7584 | - |
385
+ | 6.2532 | 500 | 0.0312 | 0.8255 | - |
386
+ | 7.5063 | 600 | 0.0062 | 0.7279 | - |
387
+ | 8.7595 | 700 | 0.0024 | 0.7277 | - |
388
+ | 10.0127 | 800 | 0.0025 | 0.7233 | - |
389
+ | 11.2532 | 900 | 0.0017 | 0.7410 | - |
390
+ | 12.5063 | 1000 | 0.0008 | 0.7611 | - |
391
+ | 13.7595 | 1100 | 0.0005 | 0.7738 | - |
392
+ | 15.0127 | 1200 | 0.0004 | 0.7848 | - |
393
+ | 16.2532 | 1300 | 0.0007 | 0.7759 | - |
394
+ | 17.5063 | 1400 | 0.0004 | 0.7858 | - |
395
+ | 18.7595 | 1500 | 0.0003 | 0.8030 | - |
396
+ | 20.0127 | 1600 | 0.0003 | 0.8065 | - |
397
+ | 21.2532 | 1700 | 0.0004 | 0.8210 | - |
398
+ | 22.5063 | 1800 | 0.0003 | 0.8260 | - |
399
+ | 23.7595 | 1900 | 0.0003 | 0.8305 | - |
400
+ | 25.0127 | 2000 | 0.0002 | 0.8341 | - |
401
+ | 26.2532 | 2100 | 0.0004 | 0.8317 | - |
402
+ | 27.5063 | 2200 | 0.0003 | 0.8354 | - |
403
+ | 28.7595 | 2300 | 0.0002 | 0.8383 | - |
404
+ | 29.6329 | 2370 | - | - | 0.9168 |
405
+
406
+
407
+ ### Framework Versions
408
+ - Python: 3.10.12
409
+ - Sentence Transformers: 3.3.1
410
+ - Transformers: 4.47.1
411
+ - PyTorch: 2.5.1+cu121
412
+ - Accelerate: 1.2.1
413
+ - Datasets: 3.2.0
414
+ - Tokenizers: 0.21.0
415
+
416
+ ## Citation
417
+
418
+ ### BibTeX
419
+
420
+ #### Sentence Transformers
421
+ ```bibtex
422
+ @inproceedings{reimers-2019-sentence-bert,
423
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
424
+ author = "Reimers, Nils and Gurevych, Iryna",
425
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
426
+ month = "11",
427
+ year = "2019",
428
+ publisher = "Association for Computational Linguistics",
429
+ url = "https://arxiv.org/abs/1908.10084",
430
+ }
431
+ ```
432
+
433
+ #### MultipleNegativesRankingLoss
434
+ ```bibtex
435
+ @misc{henderson2017efficient,
436
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
437
+ 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},
438
+ year={2017},
439
+ eprint={1705.00652},
440
+ archivePrefix={arXiv},
441
+ primaryClass={cs.CL}
442
+ }
443
+ ```
444
+
445
+ <!--
446
+ ## Glossary
447
+
448
+ *Clearly define terms in order to be accessible across audiences.*
449
+ -->
450
+
451
+ <!--
452
+ ## Model Card Authors
453
+
454
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
455
+ -->
456
+
457
+ <!--
458
+ ## Model Card Contact
459
+
460
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
461
+ -->
config.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "dangvantuan/french-document-embedding",
3
+ "architectures": [
4
+ "BilingualModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "dangvantuan/bilingual_impl--configuration.BilingualConfig",
9
+ "AutoModel": "dangvantuan/bilingual_impl--modelling.BilingualModel",
10
+ "AutoModelForMaskedLM": "dangvantuan/bilingual_impl--modelling.BilingualForMaskedLM",
11
+ "AutoModelForMultipleChoice": "dangvantuan/bilingual_impl--modelling.BilingualForMultipleChoice",
12
+ "AutoModelForQuestionAnswering": "dangvantuan/bilingual_impl--modelling.BilingualForQuestionAnswering",
13
+ "AutoModelForSequenceClassification": "dangvantuan/bilingual_impl--modelling.BilingualForSequenceClassification",
14
+ "AutoModelForTokenClassification": "dangvantuan/bilingual_impl--modelling.BilingualForTokenClassification"
15
+ },
16
+ "classifier_dropout": 0.0,
17
+ "hidden_act": "gelu",
18
+ "hidden_dropout_prob": 0.1,
19
+ "hidden_size": 768,
20
+ "id2label": {
21
+ "0": "LABEL_0"
22
+ },
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 3072,
25
+ "label2id": {
26
+ "LABEL_0": 0
27
+ },
28
+ "layer_norm_eps": 1e-12,
29
+ "layer_norm_type": "layer_norm",
30
+ "logn_attention_clip1": false,
31
+ "logn_attention_scale": false,
32
+ "max_position_embeddings": 8192,
33
+ "model_type": "Bilingual",
34
+ "num_attention_heads": 12,
35
+ "num_hidden_layers": 12,
36
+ "pack_qkv": true,
37
+ "pad_token_id": 1,
38
+ "position_embedding_type": "rope",
39
+ "rope_scaling": {
40
+ "factor": 8.0,
41
+ "type": "ntk"
42
+ },
43
+ "rope_theta": 20000,
44
+ "torch_dtype": "float32",
45
+ "transformers_version": "4.47.1",
46
+ "type_vocab_size": 1,
47
+ "unpad_inputs": false,
48
+ "use_memory_efficient_attention": false,
49
+ "vocab_size": 250048
50
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.47.1",
5
+ "pytorch": "2.5.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da78f0381fab744ce0d711ebfbbfed7ae360a90d47d65b7638876f3fa133c159
3
+ size 1221487872
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": 8192,
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:aa7a6ad87a7ce8fe196787355f6af7d03aee94d19c54a5eb1392ed18c8ef451a
3
+ size 17082988
tokenizer_config.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "eos_token": "</s>",
48
+ "extra_special_tokens": {},
49
+ "mask_token": "<mask>",
50
+ "max_length": 8192,
51
+ "model_max_length": 8192,
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
+ "tokenizer_class": "XLMRobertaTokenizer",
59
+ "truncation_side": "right",
60
+ "truncation_strategy": "longest_first",
61
+ "unk_token": "<unk>"
62
+ }