Files changed (1) hide show
  1. README.md +218 -213
README.md CHANGED
@@ -1,213 +1,218 @@
1
-
2
- # Model Card for COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
3
-
4
-
5
- # Model Details
6
-
7
- ## Model Description
8
-
9
- This model card contains the COCO-LM model (**base++** version) pretrained models on GLUE and SQuAD 2.0 benchmarks.
10
-
11
- - **Developed by:** Microsoft
12
- - **Shared by [Optional]:** HuggingFace
13
- - **Model type:** Language model
14
- - **Language(s) (NLP):** en
15
- - **License:** MIT
16
- - **Related Models:** More information needed
17
- - **Parent Model:** More information needed
18
- - **Resources for more information:**
19
- - [GitHub Repo](https://github.com/microsoft/COCO-LM)
20
- - [Associated Paper](https://arxiv.org/abs/2102.08473)
21
-
22
- # Uses
23
-
24
-
25
- ## Direct Use
26
-
27
- Correcting and Contrasting Text Sequences for Language Model Pretraining
28
-
29
- ## Downstream Use [Optional]
30
-
31
- More information needed.
32
-
33
- ## Out-of-Scope Use
34
-
35
-
36
- The model should not be used to intentionally create hostile or alienating environments for people.
37
-
38
- # Bias, Risks, and Limitations
39
-
40
-
41
- Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
42
-
43
-
44
- ## Recommendations
45
-
46
-
47
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recomendations.
48
-
49
-
50
- # Training Details
51
-
52
- ## Training Data
53
-
54
-
55
- See the associated [dataset card]({0}) for further details
56
-
57
- ## Training Procedure
58
-
59
- ### Preprocessing
60
-
61
- The model devloeprs note in the [associated paper](https://arxiv.org/abs/2102.08473):
62
-
63
- >We employ three standard settings, base, base++, and large++. Base is the BERTBase training configuration: Pretraining on Wikipedia and BookCorpus (16 GB of texts) for 256 million samples on 512 token sequences (125K batches with 2048 batch size). We use the same corpus and 32, 768 uncased BPE vocabulary as with TUPE. Base++ trains the base size model with larger corpora and/or more training steps. Following recent research, we add in OpenWebText, CC-News , and STORIES, to a total of 160 GB texts, and train for 4 billion (with 2048 batch size) samples. We follow the prepossessing of UniLMV2 and use 64, 000 cased BPE vocabulary. Large++ uses the same training corpora as base++ and pretrains for 4 billion samples (2048 batch size). Its Transformer configuration is the same with BERTLarge.
64
-
65
- ### Speeds, Sizes, Times
66
-
67
- More information needed
68
-
69
- # Evaluation
70
-
71
-
72
-
73
- ## Testing Data, Factors & Metrics
74
-
75
- ### Testing Data
76
-
77
- GLUE
78
- SQuAD 2.0
79
-
80
- ### Factors
81
-
82
- All results are single-task, single-model fine-tuning.
83
-
84
- ### Metrics
85
-
86
- More information needed
87
-
88
- ## Results
89
-
90
- ### GLUE Fine-Tuning Results
91
-
92
- The [General Language Understanding Evaluation (GLUE)](https://gluebenchmark.com/) benchmark is a collection of sentence- or sentence-pair language understanding tasks for evaluating and analyzing natural language understanding systems.
93
-
94
- GLUE dev set results of COCO-LM base++ and large++ models are as follows (median of 5 different random seeds):
95
-
96
- | Model | MNLI-m/mm | QQP | QNLI | SST-2 | CoLA | RTE | MRPC | STS-B | AVG |
97
- | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
98
- | COCO-LM base++ | 90.2/90.0 | 92.2 | 94.2 | 94.6 | 67.3 | 87.4 | 91.2 | 91.8 | 88.6 |
99
- | COCO-LM large++ | 91.4/91.6 | 92.8 | 95.7 | 96.9 | 73.9 | 91.0 | 92.2 | 92.7 | 90.8 |
100
-
101
- GLUE test set results of COCO-LM base++ and large++ models are as follows (no ensemble, task-specific tricks, etc.):
102
-
103
- | Model | MNLI-m/mm | QQP | QNLI | SST-2 | CoLA | RTE | MRPC | STS-B | AVG |
104
- | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
105
- | COCO-LM base++ | 89.8/89.3 | 89.8 | 94.2 | 95.6 | 68.6 | 82.3 | 88.5 | 90.3 | 87.4 |
106
- | COCO-LM large++ | 91.6/91.1 | 90.5 | 95.8 | 96.7 | 70.5 | 89.2 | 88.4 | 91.8 | 89.3 |
107
-
108
- ### SQuAD 2.0 Fine-Tuning Results
109
-
110
- [Stanford Question Answering Dataset (SQuAD)](https://rajpurkar.github.io/SQuAD-explorer/) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable.
111
-
112
- SQuAD 2.0 dev set results of COCO-LM base++ and large++ models are as follows (median of 5 different random seeds):
113
-
114
- | Model | EM | F1 |
115
- | ------ | ------ | ------ |
116
- | COCO-LM base++ | 85.4 | 88.1 |
117
- | COCO-LM large++ | 88.2 | 91.0 |
118
-
119
-
120
-
121
-
122
- # Model Examination
123
-
124
- The model delevopers note in the [associated paper](https://arxiv.org/abs/2102.08473):
125
-
126
- >Architecture. Removing relative position encoding (Rel-Pos) leads to better numbers on some tasks but significantly hurts MNLI. Using a shallow auxiliary network and keeping the same hidden dimension (768) is more effective than ELECTRA’s 12-layer but 256-hidden dimension generator.
127
-
128
- >One limitation of this work is that the contrastive pairs are constructed by simple cropping and MLM replacements. Recent studies have shown the effectiveness of advanced data augmentation techniques in fine-tuning language models [16, 38, 51]. A future research direction is to explore better ways to construct contrastive pairs in language model pretraining.
129
-
130
-
131
-
132
-
133
- # Environmental Impact
134
-
135
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
136
-
137
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
138
-
139
- - **Hardware Type:** More information needed
140
- - **Hours used:** More information needed
141
- - **Cloud Provider:** More information needed
142
- - **Compute Region:** More information needed
143
- - **Carbon Emitted:** More information needed}
144
-
145
- # Technical Specifications [optional]
146
-
147
- ## Model Architecture and Objective
148
- The model delevopers note in the [associated paper](https://arxiv.org/abs/2102.08473):
149
-
150
- >Model Architecture. Our base/base++ model uses the BERTBase architecture: 12 layer Transformer, 768 hidden size, plus T5 relative position encoding. Our large++ model is the same with BERTLarge, 24 layer and 1024 hidden size, plus T5 relative position encoding. Our auxiliary network uses the same hidden size but a shallow 4-layer Transformer in base/base++ and a 6-layer one in large++. When generating XMLM we disable dropout in the auxiliary model
151
-
152
- ## Compute Infrastructure
153
-
154
- More information needed
155
-
156
- ### Hardware
157
-
158
- More information needed
159
-
160
- ### Software
161
-
162
- More information needed
163
-
164
- # Citation
165
-
166
-
167
- **BibTeX:**
168
-
169
- If you find the code and models useful for your research, please cite the following paper:
170
- ```
171
- @inproceedings{meng2021cocolm,
172
- title={{COCO-LM}: Correcting and contrasting text sequences for language model pretraining},
173
- author={Meng, Yu and Xiong, Chenyan and Bajaj, Payal and Tiwary, Saurabh and Bennett, Paul and Han, Jiawei and Song, Xia},
174
- booktitle={Conference on Neural Information Processing Systems},
175
- year={2021}
176
- }
177
- ```
178
-
179
-
180
- # Glossary [optional]
181
-
182
- More information needed
183
-
184
- # More Information [optional]
185
- More information needed
186
-
187
- # Model Card Authors [optional]
188
-
189
- Microsoft in collaboration with Ezi Ozoani and the HuggingFace team
190
-
191
- # Model Card Contact
192
-
193
- More information needed
194
-
195
- # How to Get Started with the Model
196
-
197
- Use the code below to get started with the model.
198
-
199
- <details>
200
- <summary> Click to expand </summary>
201
-
202
- ```python
203
-
204
- from transformers import AutoModel
205
-
206
- model = AutoModel.from_pretrained("microsoft/cocolm-base")
207
-
208
-
209
- ```
210
-
211
-
212
-
213
- </details>
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ ---
6
+
7
+ # Model Card for COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
8
+
9
+
10
+ # Model Details
11
+
12
+ ## Model Description
13
+
14
+ This model card contains the COCO-LM model (**base++** version) pretrained models on GLUE and SQuAD 2.0 benchmarks.
15
+
16
+ - **Developed by:** Microsoft
17
+ - **Shared by [Optional]:** HuggingFace
18
+ - **Model type:** Language model
19
+ - **Language(s) (NLP):** en
20
+ - **License:** MIT
21
+ - **Related Models:** More information needed
22
+ - **Parent Model:** More information needed
23
+ - **Resources for more information:**
24
+ - [GitHub Repo](https://github.com/microsoft/COCO-LM)
25
+ - [Associated Paper](https://arxiv.org/abs/2102.08473)
26
+
27
+ # Uses
28
+
29
+
30
+ ## Direct Use
31
+
32
+ Correcting and Contrasting Text Sequences for Language Model Pretraining
33
+
34
+ ## Downstream Use [Optional]
35
+
36
+ More information needed.
37
+
38
+ ## Out-of-Scope Use
39
+
40
+
41
+ The model should not be used to intentionally create hostile or alienating environments for people.
42
+
43
+ # Bias, Risks, and Limitations
44
+
45
+
46
+ Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
47
+
48
+
49
+ ## Recommendations
50
+
51
+
52
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recomendations.
53
+
54
+
55
+ # Training Details
56
+
57
+ ## Training Data
58
+
59
+
60
+ See the associated [dataset card]({0}) for further details
61
+
62
+ ## Training Procedure
63
+
64
+ ### Preprocessing
65
+
66
+ The model devloeprs note in the [associated paper](https://arxiv.org/abs/2102.08473):
67
+
68
+ >We employ three standard settings, base, base++, and large++. Base is the BERTBase training configuration: Pretraining on Wikipedia and BookCorpus (16 GB of texts) for 256 million samples on 512 token sequences (125K batches with 2048 batch size). We use the same corpus and 32, 768 uncased BPE vocabulary as with TUPE. Base++ trains the base size model with larger corpora and/or more training steps. Following recent research, we add in OpenWebText, CC-News , and STORIES, to a total of 160 GB texts, and train for 4 billion (with 2048 batch size) samples. We follow the prepossessing of UniLMV2 and use 64, 000 cased BPE vocabulary. Large++ uses the same training corpora as base++ and pretrains for 4 billion samples (2048 batch size). Its Transformer configuration is the same with BERTLarge.
69
+
70
+ ### Speeds, Sizes, Times
71
+
72
+ More information needed
73
+
74
+ # Evaluation
75
+
76
+
77
+
78
+ ## Testing Data, Factors & Metrics
79
+
80
+ ### Testing Data
81
+
82
+ GLUE
83
+ SQuAD 2.0
84
+
85
+ ### Factors
86
+
87
+ All results are single-task, single-model fine-tuning.
88
+
89
+ ### Metrics
90
+
91
+ More information needed
92
+
93
+ ## Results
94
+
95
+ ### GLUE Fine-Tuning Results
96
+
97
+ The [General Language Understanding Evaluation (GLUE)](https://gluebenchmark.com/) benchmark is a collection of sentence- or sentence-pair language understanding tasks for evaluating and analyzing natural language understanding systems.
98
+
99
+ GLUE dev set results of COCO-LM base++ and large++ models are as follows (median of 5 different random seeds):
100
+
101
+ | Model | MNLI-m/mm | QQP | QNLI | SST-2 | CoLA | RTE | MRPC | STS-B | AVG |
102
+ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
103
+ | COCO-LM base++ | 90.2/90.0 | 92.2 | 94.2 | 94.6 | 67.3 | 87.4 | 91.2 | 91.8 | 88.6 |
104
+ | COCO-LM large++ | 91.4/91.6 | 92.8 | 95.7 | 96.9 | 73.9 | 91.0 | 92.2 | 92.7 | 90.8 |
105
+
106
+ GLUE test set results of COCO-LM base++ and large++ models are as follows (no ensemble, task-specific tricks, etc.):
107
+
108
+ | Model | MNLI-m/mm | QQP | QNLI | SST-2 | CoLA | RTE | MRPC | STS-B | AVG |
109
+ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
110
+ | COCO-LM base++ | 89.8/89.3 | 89.8 | 94.2 | 95.6 | 68.6 | 82.3 | 88.5 | 90.3 | 87.4 |
111
+ | COCO-LM large++ | 91.6/91.1 | 90.5 | 95.8 | 96.7 | 70.5 | 89.2 | 88.4 | 91.8 | 89.3 |
112
+
113
+ ### SQuAD 2.0 Fine-Tuning Results
114
+
115
+ [Stanford Question Answering Dataset (SQuAD)](https://rajpurkar.github.io/SQuAD-explorer/) is a reading comprehension dataset, consisting of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text, or span, from the corresponding reading passage, or the question might be unanswerable.
116
+
117
+ SQuAD 2.0 dev set results of COCO-LM base++ and large++ models are as follows (median of 5 different random seeds):
118
+
119
+ | Model | EM | F1 |
120
+ | ------ | ------ | ------ |
121
+ | COCO-LM base++ | 85.4 | 88.1 |
122
+ | COCO-LM large++ | 88.2 | 91.0 |
123
+
124
+
125
+
126
+
127
+ # Model Examination
128
+
129
+ The model delevopers note in the [associated paper](https://arxiv.org/abs/2102.08473):
130
+
131
+ >Architecture. Removing relative position encoding (Rel-Pos) leads to better numbers on some tasks but significantly hurts MNLI. Using a shallow auxiliary network and keeping the same hidden dimension (768) is more effective than ELECTRA’s 12-layer but 256-hidden dimension generator.
132
+
133
+ >One limitation of this work is that the contrastive pairs are constructed by simple cropping and MLM replacements. Recent studies have shown the effectiveness of advanced data augmentation techniques in fine-tuning language models [16, 38, 51]. A future research direction is to explore better ways to construct contrastive pairs in language model pretraining.
134
+
135
+
136
+
137
+
138
+ # Environmental Impact
139
+
140
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
141
+
142
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
143
+
144
+ - **Hardware Type:** More information needed
145
+ - **Hours used:** More information needed
146
+ - **Cloud Provider:** More information needed
147
+ - **Compute Region:** More information needed
148
+ - **Carbon Emitted:** More information needed}
149
+
150
+ # Technical Specifications [optional]
151
+
152
+ ## Model Architecture and Objective
153
+ The model delevopers note in the [associated paper](https://arxiv.org/abs/2102.08473):
154
+
155
+ >Model Architecture. Our base/base++ model uses the BERTBase architecture: 12 layer Transformer, 768 hidden size, plus T5 relative position encoding. Our large++ model is the same with BERTLarge, 24 layer and 1024 hidden size, plus T5 relative position encoding. Our auxiliary network uses the same hidden size but a shallow 4-layer Transformer in base/base++ and a 6-layer one in large++. When generating XMLM we disable dropout in the auxiliary model
156
+
157
+ ## Compute Infrastructure
158
+
159
+ More information needed
160
+
161
+ ### Hardware
162
+
163
+ More information needed
164
+
165
+ ### Software
166
+
167
+ More information needed
168
+
169
+ # Citation
170
+
171
+
172
+ **BibTeX:**
173
+
174
+ If you find the code and models useful for your research, please cite the following paper:
175
+ ```
176
+ @inproceedings{meng2021cocolm,
177
+ title={{COCO-LM}: Correcting and contrasting text sequences for language model pretraining},
178
+ author={Meng, Yu and Xiong, Chenyan and Bajaj, Payal and Tiwary, Saurabh and Bennett, Paul and Han, Jiawei and Song, Xia},
179
+ booktitle={Conference on Neural Information Processing Systems},
180
+ year={2021}
181
+ }
182
+ ```
183
+
184
+
185
+ # Glossary [optional]
186
+
187
+ More information needed
188
+
189
+ # More Information [optional]
190
+ More information needed
191
+
192
+ # Model Card Authors [optional]
193
+
194
+ Microsoft in collaboration with Ezi Ozoani and the HuggingFace team
195
+
196
+ # Model Card Contact
197
+
198
+ More information needed
199
+
200
+ # How to Get Started with the Model
201
+
202
+ Use the code below to get started with the model.
203
+
204
+ <details>
205
+ <summary> Click to expand </summary>
206
+
207
+ ```python
208
+
209
+ from transformers import AutoModel
210
+
211
+ model = AutoModel.from_pretrained("microsoft/cocolm-base")
212
+
213
+
214
+ ```
215
+
216
+
217
+
218
+ </details>