jonny9f commited on
Commit
5a7b4bb
·
verified ·
1 Parent(s): f2a6e92

Upload fine-tuned food embeddings with improved score distribution

Browse files
Files changed (2) hide show
  1. README.md +145 -353
  2. model.safetensors +1 -1
README.md CHANGED
@@ -1,385 +1,177 @@
1
  ---
 
 
 
2
  tags:
3
  - sentence-transformers
4
- - sentence-similarity
5
  - feature-extraction
6
- - generated_from_trainer
7
- - dataset_size:210328
8
- - loss:ScaledCosineSimilarityLoss
9
- base_model: sentence-transformers/all-MiniLM-L6-v2
10
- widget:
11
- - source_sentence: Whale, bowhead oil
12
- sentences:
13
- - Cheese, American processed with vitamin D
14
- - Cashews, dry roasted with salt
15
- - Salmon, dried chum
16
- - source_sentence: acipenser naccarii bonaparte 1836
17
- sentences:
18
- - acipenser naccarii bonaparte, 1836
19
- - butter clam
20
- - Wild Rice, raw
21
- - source_sentence: Granola Bar, Nature Valley Chewy Trail Mix
22
- sentences:
23
- - Sea lion meat, cooked (Alaska Native)
24
- - Trail Mix, regular unsalted
25
- - Soup, chunky vegetable, reduced sodium
26
- - source_sentence: Bear Meat, polar raw
27
- sentences:
28
- - Tea, tundra herb and Labrador blend
29
- - Beef rib, small end, choice, cooked roasted
30
- - sudan teak
31
- - source_sentence: Beef, tenderloin, raw
32
- sentences:
33
- - Pork tenderloin, raw
34
- - Fruit salad, tropical canned in heavy syrup
35
- - Lamb leg, whole, raw
36
  pipeline_tag: sentence-similarity
37
- library_name: sentence-transformers
38
- metrics:
39
- - pearson_cosine
40
- - spearman_cosine
41
- model-index:
42
- - name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
43
- results:
44
- - task:
45
- type: semantic-similarity
46
- name: Semantic Similarity
47
- dataset:
48
- name: validation
49
- type: validation
50
- metrics:
51
- - type: pearson_cosine
52
- value: 0.8074689102281711
53
- name: Pearson Cosine
54
- - type: spearman_cosine
55
- value: 0.7665455013117164
56
- name: Spearman Cosine
57
  ---
58
 
59
- # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
60
 
61
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
 
62
 
63
- ## Model Details
 
64
 
65
- ### Model Description
66
- - **Model Type:** Sentence Transformer
67
- - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision fa97f6e7cb1a59073dff9e6b13e2715cf7475ac9 -->
68
- - **Maximum Sequence Length:** 256 tokens
69
- - **Output Dimensionality:** 384 dimensions
70
- - **Similarity Function:** Cosine Similarity
71
- <!-- - **Training Dataset:** Unknown -->
72
- <!-- - **Language:** Unknown -->
73
- <!-- - **License:** Unknown -->
74
 
75
- ### Model Sources
 
 
 
76
 
77
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
78
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
79
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
 
80
 
81
- ### Full Model Architecture
 
82
 
83
- ```
84
- SentenceTransformer(
85
- (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
86
- (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
87
- (2): Normalize()
88
- )
89
- ```
90
 
91
- ## Usage
 
 
 
 
92
 
93
- ### Direct Usage (Sentence Transformers)
94
 
95
- First install the Sentence Transformers library:
 
96
 
97
- ```bash
98
- pip install -U sentence-transformers
99
- ```
100
 
101
- Then you can load this model and run inference.
102
- ```python
103
- from sentence_transformers import SentenceTransformer
104
 
105
- # Download from the 🤗 Hub
106
- model = SentenceTransformer("jonny9f/food_embeddings4")
107
- # Run inference
108
- sentences = [
109
- 'Beef, tenderloin, raw',
110
- 'Pork tenderloin, raw',
111
- 'Lamb leg, whole, raw',
112
- ]
113
- embeddings = model.encode(sentences)
114
- print(embeddings.shape)
115
- # [3, 384]
116
 
117
- # Get the similarity scores for the embeddings
118
- similarities = model.similarity(embeddings, embeddings)
119
- print(similarities.shape)
120
- # [3, 3]
121
  ```
122
 
123
- <!--
124
- ### Direct Usage (Transformers)
125
 
126
- <details><summary>Click to see the direct usage in Transformers</summary>
127
 
128
- </details>
129
- -->
130
 
131
- <!--
132
- ### Downstream Usage (Sentence Transformers)
133
-
134
- You can finetune this model on your own dataset.
135
-
136
- <details><summary>Click to expand</summary>
137
-
138
- </details>
139
- -->
140
-
141
- <!--
142
- ### Out-of-Scope Use
143
-
144
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
145
- -->
146
-
147
- ## Evaluation
148
-
149
- ### Metrics
150
-
151
- #### Semantic Similarity
152
-
153
- * Dataset: `validation`
154
- * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
155
-
156
- | Metric | Value |
157
- |:--------------------|:-----------|
158
- | pearson_cosine | 0.8075 |
159
- | **spearman_cosine** | **0.7665** |
160
-
161
- <!--
162
- ## Bias, Risks and Limitations
163
-
164
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
165
- -->
166
-
167
- <!--
168
- ### Recommendations
169
-
170
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
171
- -->
172
-
173
- ## Training Details
174
-
175
- ### Training Dataset
176
-
177
- #### Unnamed Dataset
178
-
179
-
180
- * Size: 210,328 training samples
181
- * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
182
- * Approximate statistics based on the first 1000 samples:
183
- | | sentence_0 | sentence_1 | label |
184
- |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------|
185
- | type | string | string | float |
186
- | details | <ul><li>min: 3 tokens</li><li>mean: 9.04 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 9.19 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 0.38</li><li>mean: 0.72</li><li>max: 1.0</li></ul> |
187
- * Samples:
188
- | sentence_0 | sentence_1 | label |
189
- |:------------------------------------------------|:--------------------------------------------------|:---------------------------------|
190
- | <code>Tortilla, plain or mutton sandwich</code> | <code>Roast beef sandwich, plain</code> | <code>0.42789756059646605</code> |
191
- | <code>Lamb rib, cooked roasted</code> | <code>Lamb, leg shank half, cooked roasted</code> | <code>0.7156221181154251</code> |
192
- | <code>red raspberry plant</code> | <code>rubus idaeus var. idaeus l.</code> | <code>0.8826086956521739</code> |
193
- * Loss: <code>__main__.ScaledCosineSimilarityLoss</code>
194
-
195
- ### Training Hyperparameters
196
- #### Non-Default Hyperparameters
197
-
198
- - `per_device_train_batch_size`: 32
199
- - `per_device_eval_batch_size`: 32
200
- - `num_train_epochs`: 1
201
- - `multi_dataset_batch_sampler`: round_robin
202
-
203
- #### All Hyperparameters
204
- <details><summary>Click to expand</summary>
205
-
206
- - `overwrite_output_dir`: False
207
- - `do_predict`: False
208
- - `eval_strategy`: no
209
- - `prediction_loss_only`: True
210
- - `per_device_train_batch_size`: 32
211
- - `per_device_eval_batch_size`: 32
212
- - `per_gpu_train_batch_size`: None
213
- - `per_gpu_eval_batch_size`: None
214
- - `gradient_accumulation_steps`: 1
215
- - `eval_accumulation_steps`: None
216
- - `torch_empty_cache_steps`: None
217
- - `learning_rate`: 5e-05
218
- - `weight_decay`: 0.0
219
- - `adam_beta1`: 0.9
220
- - `adam_beta2`: 0.999
221
- - `adam_epsilon`: 1e-08
222
- - `max_grad_norm`: 1
223
- - `num_train_epochs`: 1
224
- - `max_steps`: -1
225
- - `lr_scheduler_type`: linear
226
- - `lr_scheduler_kwargs`: {}
227
- - `warmup_ratio`: 0.0
228
- - `warmup_steps`: 0
229
- - `log_level`: passive
230
- - `log_level_replica`: warning
231
- - `log_on_each_node`: True
232
- - `logging_nan_inf_filter`: True
233
- - `save_safetensors`: True
234
- - `save_on_each_node`: False
235
- - `save_only_model`: False
236
- - `restore_callback_states_from_checkpoint`: False
237
- - `no_cuda`: False
238
- - `use_cpu`: False
239
- - `use_mps_device`: False
240
- - `seed`: 42
241
- - `data_seed`: None
242
- - `jit_mode_eval`: False
243
- - `use_ipex`: False
244
- - `bf16`: False
245
- - `fp16`: False
246
- - `fp16_opt_level`: O1
247
- - `half_precision_backend`: auto
248
- - `bf16_full_eval`: False
249
- - `fp16_full_eval`: False
250
- - `tf32`: None
251
- - `local_rank`: 0
252
- - `ddp_backend`: None
253
- - `tpu_num_cores`: None
254
- - `tpu_metrics_debug`: False
255
- - `debug`: []
256
- - `dataloader_drop_last`: False
257
- - `dataloader_num_workers`: 0
258
- - `dataloader_prefetch_factor`: None
259
- - `past_index`: -1
260
- - `disable_tqdm`: False
261
- - `remove_unused_columns`: True
262
- - `label_names`: None
263
- - `load_best_model_at_end`: False
264
- - `ignore_data_skip`: False
265
- - `fsdp`: []
266
- - `fsdp_min_num_params`: 0
267
- - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
268
- - `fsdp_transformer_layer_cls_to_wrap`: None
269
- - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
270
- - `deepspeed`: None
271
- - `label_smoothing_factor`: 0.0
272
- - `optim`: adamw_torch
273
- - `optim_args`: None
274
- - `adafactor`: False
275
- - `group_by_length`: False
276
- - `length_column_name`: length
277
- - `ddp_find_unused_parameters`: None
278
- - `ddp_bucket_cap_mb`: None
279
- - `ddp_broadcast_buffers`: False
280
- - `dataloader_pin_memory`: True
281
- - `dataloader_persistent_workers`: False
282
- - `skip_memory_metrics`: True
283
- - `use_legacy_prediction_loop`: False
284
- - `push_to_hub`: False
285
- - `resume_from_checkpoint`: None
286
- - `hub_model_id`: None
287
- - `hub_strategy`: every_save
288
- - `hub_private_repo`: None
289
- - `hub_always_push`: False
290
- - `gradient_checkpointing`: False
291
- - `gradient_checkpointing_kwargs`: None
292
- - `include_inputs_for_metrics`: False
293
- - `include_for_metrics`: []
294
- - `eval_do_concat_batches`: True
295
- - `fp16_backend`: auto
296
- - `push_to_hub_model_id`: None
297
- - `push_to_hub_organization`: None
298
- - `mp_parameters`:
299
- - `auto_find_batch_size`: False
300
- - `full_determinism`: False
301
- - `torchdynamo`: None
302
- - `ray_scope`: last
303
- - `ddp_timeout`: 1800
304
- - `torch_compile`: False
305
- - `torch_compile_backend`: None
306
- - `torch_compile_mode`: None
307
- - `dispatch_batches`: None
308
- - `split_batches`: None
309
- - `include_tokens_per_second`: False
310
- - `include_num_input_tokens_seen`: False
311
- - `neftune_noise_alpha`: None
312
- - `optim_target_modules`: None
313
- - `batch_eval_metrics`: False
314
- - `eval_on_start`: False
315
- - `use_liger_kernel`: False
316
- - `eval_use_gather_object`: False
317
- - `average_tokens_across_devices`: False
318
- - `prompts`: None
319
- - `batch_sampler`: batch_sampler
320
- - `multi_dataset_batch_sampler`: round_robin
321
-
322
- </details>
323
-
324
- ### Training Logs
325
- | Epoch | Step | Training Loss | validation_spearman_cosine |
326
- |:------:|:----:|:-------------:|:--------------------------:|
327
- | 0.0761 | 500 | 0.0179 | - |
328
- | 0.1521 | 1000 | 0.0067 | - |
329
- | 0.2282 | 1500 | 0.0059 | - |
330
- | 0.3043 | 2000 | 0.0051 | - |
331
- | 0.3803 | 2500 | 0.0048 | - |
332
- | 0.4564 | 3000 | 0.0046 | - |
333
- | 0.5325 | 3500 | 0.0043 | - |
334
- | 0.6086 | 4000 | 0.004 | - |
335
- | 0.6846 | 4500 | 0.0038 | - |
336
- | 0.7607 | 5000 | 0.0037 | - |
337
- | 0.8368 | 5500 | 0.0037 | - |
338
- | 0.9128 | 6000 | 0.0034 | - |
339
- | 0.9889 | 6500 | 0.0033 | - |
340
- | 1.0 | 6573 | - | 0.7665 |
341
-
342
-
343
- ### Framework Versions
344
- - Python: 3.11.3
345
- - Sentence Transformers: 3.3.1
346
- - Transformers: 4.48.0
347
- - PyTorch: 2.5.1+cu124
348
- - Accelerate: 1.2.1
349
- - Datasets: 3.2.0
350
- - Tokenizers: 0.21.0
351
-
352
- ## Citation
353
-
354
- ### BibTeX
355
-
356
- #### Sentence Transformers
357
- ```bibtex
358
- @inproceedings{reimers-2019-sentence-bert,
359
- title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
360
- author = "Reimers, Nils and Gurevych, Iryna",
361
- booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
362
- month = "11",
363
- year = "2019",
364
- publisher = "Association for Computational Linguistics",
365
- url = "https://arxiv.org/abs/1908.10084",
366
- }
367
- ```
368
 
369
- <!--
370
- ## Glossary
371
 
372
- *Clearly define terms in order to be accessible across audiences.*
373
- -->
 
374
 
375
- <!--
376
- ## Model Card Authors
377
 
378
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
379
- -->
380
 
381
- <!--
382
- ## Model Card Contact
383
 
384
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
385
- -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: en
3
+ license: apache-2.0
4
+ library_name: sentence-transformers
5
  tags:
6
  - sentence-transformers
 
7
  - feature-extraction
8
+ - sentence-similarity
9
+ - transformers
10
+ datasets:
11
+ - s2orc
12
+ - flax-sentence-embeddings/stackexchange_xml
13
+ - ms_marco
14
+ - gooaq
15
+ - yahoo_answers_topics
16
+ - code_search_net
17
+ - search_qa
18
+ - eli5
19
+ - snli
20
+ - multi_nli
21
+ - wikihow
22
+ - natural_questions
23
+ - trivia_qa
24
+ - embedding-data/sentence-compression
25
+ - embedding-data/flickr30k-captions
26
+ - embedding-data/altlex
27
+ - embedding-data/simple-wiki
28
+ - embedding-data/QQP
29
+ - embedding-data/SPECTER
30
+ - embedding-data/PAQ_pairs
31
+ - embedding-data/WikiAnswers
 
 
 
 
 
 
32
  pipeline_tag: sentence-similarity
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  ---
34
 
 
35
 
36
+ # all-MiniLM-L6-v2
37
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.
38
 
39
+ ## Usage (Sentence-Transformers)
40
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
41
 
42
+ ```
43
+ pip install -U sentence-transformers
44
+ ```
 
 
 
 
 
 
45
 
46
+ Then you can use the model like this:
47
+ ```python
48
+ from sentence_transformers import SentenceTransformer
49
+ sentences = ["This is an example sentence", "Each sentence is converted"]
50
 
51
+ model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
52
+ embeddings = model.encode(sentences)
53
+ print(embeddings)
54
+ ```
55
 
56
+ ## Usage (HuggingFace Transformers)
57
+ Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
58
 
59
+ ```python
60
+ from transformers import AutoTokenizer, AutoModel
61
+ import torch
62
+ import torch.nn.functional as F
 
 
 
63
 
64
+ #Mean Pooling - Take attention mask into account for correct averaging
65
+ def mean_pooling(model_output, attention_mask):
66
+ token_embeddings = model_output[0] #First element of model_output contains all token embeddings
67
+ input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
68
+ return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
69
 
 
70
 
71
+ # Sentences we want sentence embeddings for
72
+ sentences = ['This is an example sentence', 'Each sentence is converted']
73
 
74
+ # Load model from HuggingFace Hub
75
+ tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')
76
+ model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')
77
 
78
+ # Tokenize sentences
79
+ encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
80
 
81
+ # Compute token embeddings
82
+ with torch.no_grad():
83
+ model_output = model(**encoded_input)
84
+
85
+ # Perform pooling
86
+ sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
87
+
88
+ # Normalize embeddings
89
+ sentence_embeddings = F.normalize(sentence_embeddings, p=2, dim=1)
 
 
90
 
91
+ print("Sentence embeddings:")
92
+ print(sentence_embeddings)
 
 
93
  ```
94
 
95
+ ## Evaluation Results
 
96
 
97
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=sentence-transformers/all-MiniLM-L6-v2)
98
 
99
+ ------
 
100
 
101
+ ## Background
102
+
103
+ The project aims to train sentence embedding models on very large sentence level datasets using a self-supervised
104
+ contrastive learning objective. We used the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model and fine-tuned in on a
105
+ 1B sentence pairs dataset. We use a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset.
106
+
107
+ We developed this model during the
108
+ [Community week using JAX/Flax for NLP & CV](https://discuss.huggingface.co/t/open-to-the-community-community-week-using-jax-flax-for-nlp-cv/7104),
109
+ organized by Hugging Face. We developed this model as part of the project:
110
+ [Train the Best Sentence Embedding Model Ever with 1B Training Pairs](https://discuss.huggingface.co/t/train-the-best-sentence-embedding-model-ever-with-1b-training-pairs/7354). We benefited from efficient hardware infrastructure to run the project: 7 TPUs v3-8, as well as intervention from Googles Flax, JAX, and Cloud team member about efficient deep learning frameworks.
111
+
112
+ ## Intended uses
113
+
114
+ Our model is intended to be used as a sentence and short paragraph encoder. Given an input text, it outputs a vector which captures
115
+ the semantic information. The sentence vector may be used for information retrieval, clustering or sentence similarity tasks.
116
+
117
+ By default, input text longer than 256 word pieces is truncated.
118
+
119
+
120
+ ## Training procedure
121
+
122
+ ### Pre-training
123
+
124
+ We use the pretrained [`nreimers/MiniLM-L6-H384-uncased`](https://huggingface.co/nreimers/MiniLM-L6-H384-uncased) model. Please refer to the model card for more detailed information about the pre-training procedure.
125
+
126
+ ### Fine-tuning
127
+
128
+ We fine-tune the model using a contrastive objective. Formally, we compute the cosine similarity from each possible sentence pairs from the batch.
129
+ We then apply the cross entropy loss by comparing with true pairs.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
 
131
+ #### Hyper parameters
 
132
 
133
+ We trained our model on a TPU v3-8. We train the model during 100k steps using a batch size of 1024 (128 per TPU core).
134
+ We use a learning rate warm up of 500. The sequence length was limited to 128 tokens. We used the AdamW optimizer with
135
+ a 2e-5 learning rate. The full training script is accessible in this current repository: `train_script.py`.
136
 
137
+ #### Training data
 
138
 
139
+ We use the concatenation from multiple datasets to fine-tune our model. The total number of sentence pairs is above 1 billion sentences.
140
+ We sampled each dataset given a weighted probability which configuration is detailed in the `data_config.json` file.
141
 
 
 
142
 
143
+ | Dataset | Paper | Number of training tuples |
144
+ |--------------------------------------------------------|:----------------------------------------:|:--------------------------:|
145
+ | [Reddit comments (2015-2018)](https://github.com/PolyAI-LDN/conversational-datasets/tree/master/reddit) | [paper](https://arxiv.org/abs/1904.06472) | 726,484,430 |
146
+ | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Abstracts) | [paper](https://aclanthology.org/2020.acl-main.447/) | 116,288,806 |
147
+ | [WikiAnswers](https://github.com/afader/oqa#wikianswers-corpus) Duplicate question pairs | [paper](https://doi.org/10.1145/2623330.2623677) | 77,427,422 |
148
+ | [PAQ](https://github.com/facebookresearch/PAQ) (Question, Answer) pairs | [paper](https://arxiv.org/abs/2102.07033) | 64,371,441 |
149
+ | [S2ORC](https://github.com/allenai/s2orc) Citation pairs (Titles) | [paper](https://aclanthology.org/2020.acl-main.447/) | 52,603,982 |
150
+ | [S2ORC](https://github.com/allenai/s2orc) (Title, Abstract) | [paper](https://aclanthology.org/2020.acl-main.447/) | 41,769,185 |
151
+ | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Body) pairs | - | 25,316,456 |
152
+ | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title+Body, Answer) pairs | - | 21,396,559 |
153
+ | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) (Title, Answer) pairs | - | 21,396,559 |
154
+ | [MS MARCO](https://microsoft.github.io/msmarco/) triplets | [paper](https://doi.org/10.1145/3404835.3462804) | 9,144,553 |
155
+ | [GOOAQ: Open Question Answering with Diverse Answer Types](https://github.com/allenai/gooaq) | [paper](https://arxiv.org/pdf/2104.08727.pdf) | 3,012,496 |
156
+ | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 1,198,260 |
157
+ | [Code Search](https://huggingface.co/datasets/code_search_net) | - | 1,151,414 |
158
+ | [COCO](https://cocodataset.org/#home) Image captions | [paper](https://link.springer.com/chapter/10.1007%2F978-3-319-10602-1_48) | 828,395|
159
+ | [SPECTER](https://github.com/allenai/specter) citation triplets | [paper](https://doi.org/10.18653/v1/2020.acl-main.207) | 684,100 |
160
+ | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Question, Answer) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 681,164 |
161
+ | [Yahoo Answers](https://www.kaggle.com/soumikrakshit/yahoo-answers-dataset) (Title, Question) | [paper](https://proceedings.neurips.cc/paper/2015/hash/250cf8b51c773f3f8dc8b4be867a9a02-Abstract.html) | 659,896 |
162
+ | [SearchQA](https://huggingface.co/datasets/search_qa) | [paper](https://arxiv.org/abs/1704.05179) | 582,261 |
163
+ | [Eli5](https://huggingface.co/datasets/eli5) | [paper](https://doi.org/10.18653/v1/p19-1346) | 325,475 |
164
+ | [Flickr 30k](https://shannon.cs.illinois.edu/DenotationGraph/) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/229/33) | 317,695 |
165
+ | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles) | | 304,525 |
166
+ | AllNLI ([SNLI](https://nlp.stanford.edu/projects/snli/) and [MultiNLI](https://cims.nyu.edu/~sbowman/multinli/) | [paper SNLI](https://doi.org/10.18653/v1/d15-1075), [paper MultiNLI](https://doi.org/10.18653/v1/n18-1101) | 277,230 |
167
+ | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (bodies) | | 250,519 |
168
+ | [Stack Exchange](https://huggingface.co/datasets/flax-sentence-embeddings/stackexchange_xml) Duplicate questions (titles+bodies) | | 250,460 |
169
+ | [Sentence Compression](https://github.com/google-research-datasets/sentence-compression) | [paper](https://www.aclweb.org/anthology/D13-1155/) | 180,000 |
170
+ | [Wikihow](https://github.com/pvl/wikihow_pairs_dataset) | [paper](https://arxiv.org/abs/1810.09305) | 128,542 |
171
+ | [Altlex](https://github.com/chridey/altlex/) | [paper](https://aclanthology.org/P16-1135.pdf) | 112,696 |
172
+ | [Quora Question Triplets](https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs) | - | 103,663 |
173
+ | [Simple Wikipedia](https://cs.pomona.edu/~dkauchak/simplification/) | [paper](https://www.aclweb.org/anthology/P11-2117/) | 102,225 |
174
+ | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 |
175
+ | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 |
176
+ | [TriviaQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 |
177
+ | **Total** | | **1,170,060,424** |
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:31e5917015fa832c3eb1819a92e73c59337a0d7a52b6c19765354e2fbbde837d
3
  size 90864192
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99ce933404ca8c5560c82d11bb60ba94e2b81ef6fc3dcbc879144a35ccb384aa
3
  size 90864192