eladven commited on
Commit
5498acd
1 Parent(s): 104035e

Upload model

Browse files
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - exbert
5
+ license: mit
6
+ ---
7
+
8
+ # ColD Fusion model
9
+
10
+ Finetuned model that aims to be a great base model. It improves over RoBERTa base, trained on 35 datasets.
11
+ Full details at [this paper](https://arxiv.org/abs/2212.01378).
12
+
13
+ ## Paper Abstract:
14
+
15
+ Pretraining has been shown to scale well with compute, data size and data diversity. Multitask learning trains on a
16
+ mixture of supervised datasets and produces improved performance compared to self-supervised pretraining. Until now,
17
+ massively multitask learning required simultaneous access to all datasets in the mixture and heavy compute resources
18
+ that are only available to well-resourced teams.
19
+
20
+ In this paper, we propose ColD Fusion, a method that provides the benefits of multitask learning but leverages distributed
21
+ computation and requires limited communication and no sharing of data. Consequentially, ColD Fusion can create a synergistic
22
+ loop, where finetuned models can be recycled to continually improve the pretrained model they are based on. We show that
23
+ ColD Fusion yields comparable benefits to multitask pretraining by producing a model that (a) attains strong performance on
24
+ all of the datasets it was multitask trained on and (b) is a better starting point for finetuning on unseen datasets. We find
25
+ ColD Fusion outperforms RoBERTa and even previous multitask models. Specifically, when training and testing on 35 diverse datasets,
26
+ ColD Fusion-based model outperforms RoBERTa by 2.45 points in average without any changes to the architecture.
27
+
28
+
29
+ ### How to use
30
+ Best way to use is to finetune on your own task, but you can also extract features directly.
31
+ To get the features of a given text in PyTorch:
32
+
33
+ ```python
34
+ from transformers import RobertaTokenizer, RobertaModel
35
+ tokenizer = RobertaTokenizer.from_pretrained('ibm/ColD-Fusion')
36
+ model = RobertaModel.from_pretrained('ibm/ColD-Fusion')
37
+ text = "Replace me by any text you'd like."
38
+ encoded_input = tokenizer(text, return_tensors='pt')
39
+ output = model(**encoded_input)
40
+ ```
41
+
42
+ and in TensorFlow:
43
+
44
+ ```python
45
+ from transformers import RobertaTokenizer, TFRobertaModel
46
+ tokenizer = RobertaTokenizer.from_pretrained('ibm/ColD-Fusion')
47
+ model = TFRobertaModel.from_pretrained('ibm/ColD-Fusion')
48
+ text = "Replace me by any text you'd like."
49
+ encoded_input = tokenizer(text, return_tensors='tf')
50
+ output = model(encoded_input)
51
+ ```
52
+
53
+ ## Evaluation results
54
+ See full evaluation results of this model and many more [here](https://ibm.github.io/model-recycling/roberta-base_table.html)
55
+ When fine-tuned on downstream tasks, this model achieves the following results:
56
+
57
+
58
+
59
+ ### BibTeX entry and citation info
60
+
61
+ ```bibtex
62
+ @article{ColDFusion,
63
+ author = {Shachar Don-Yehiya, Elad Venezian, Colin Raffel, Noam Slonim, Yoav Katz, Leshem ChoshenYinhan Liu and},
64
+ title = {ColD Fusion: Collaborative Descent for Distributed Multitask Finetuning},
65
+ journal = {CoRR},
66
+ volume = {abs/2212.01378},
67
+ year = {2022},
68
+ url = {https://arxiv.org/abs/2212.01378},
69
+ archivePrefix = {arXiv},
70
+ eprint = {2212.01378},
71
+ }
72
+ ```
73
+
74
+ <a href="https://huggingface.co/exbert/?model=ibm/ColD-Fusion">
75
+ <img width="300px" src="https://cdn-media.huggingface.co/exbert/button.png">
76
+ </a>
config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "roberta-base",
3
+ "architectures": [
4
+ "RobertaForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "LABEL_0",
15
+ "1": "LABEL_1",
16
+ "2": "LABEL_2"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "label2id": {
21
+ "LABEL_0": 0,
22
+ "LABEL_1": 1,
23
+ "LABEL_2": 2
24
+ },
25
+ "layer_norm_eps": 1e-05,
26
+ "max_position_embeddings": 514,
27
+ "model_type": "roberta",
28
+ "num_attention_heads": 12,
29
+ "num_hidden_layers": 12,
30
+ "pad_token_id": 1,
31
+ "position_embedding_type": "absolute",
32
+ "problem_type": "single_label_classification",
33
+ "torch_dtype": "float32",
34
+ "transformers_version": "4.21.0",
35
+ "type_vocab_size": 1,
36
+ "use_cache": true,
37
+ "vocab_size": 50265
38
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d938637da9a9c0689872d8465aad602a888ce2025f5f777e69fb8b25047a0812
3
+ size 498660589
special_tokens_map.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": {
6
+ "content": "<mask>",
7
+ "lstrip": true,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "pad_token": "<pad>",
13
+ "sep_token": "</s>",
14
+ "unk_token": "<unk>"
15
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": "<s>",
4
+ "cls_token": "<s>",
5
+ "eos_token": "</s>",
6
+ "errors": "replace",
7
+ "mask_token": "<mask>",
8
+ "model_max_length": 512,
9
+ "name_or_path": "roberta-base",
10
+ "pad_token": "<pad>",
11
+ "sep_token": "</s>",
12
+ "special_tokens_map_file": null,
13
+ "tokenizer_class": "RobertaTokenizer",
14
+ "trim_offsets": true,
15
+ "unk_token": "<unk>"
16
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff