TimeRobber commited on
Commit
88a280b
1 Parent(s): 739c994

WIP: README.md

Browse files
Files changed (1) hide show
  1. README.md +410 -0
README.md ADDED
@@ -0,0 +1,410 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - multilingual
5
+ - af
6
+ - am
7
+ - ar
8
+ - az
9
+ - be
10
+ - bg
11
+ - bn
12
+ - ca
13
+ - ceb
14
+ - co
15
+ - cs
16
+ - cy
17
+ - da
18
+ - de
19
+ - el
20
+ - en
21
+ - eo
22
+ - es
23
+ - et
24
+ - eu
25
+ - fa
26
+ - fi
27
+ - fil
28
+ - fr
29
+ - fy
30
+ - ga
31
+ - gd
32
+ - gl
33
+ - gu
34
+ - ha
35
+ - haw
36
+ - hi
37
+ - hmn
38
+ - ht
39
+ - hu
40
+ - hy
41
+ - ig
42
+ - is
43
+ - it
44
+ - iw
45
+ - ja
46
+ - jv
47
+ - ka
48
+ - kk
49
+ - km
50
+ - kn
51
+ - ko
52
+ - ku
53
+ - ky
54
+ - la
55
+ - lb
56
+ - lo
57
+ - lt
58
+ - lv
59
+ - mg
60
+ - mi
61
+ - mk
62
+ - ml
63
+ - mn
64
+ - mr
65
+ - ms
66
+ - mt
67
+ - my
68
+ - ne
69
+ - nl
70
+ - no
71
+ - ny
72
+ - pa
73
+ - pl
74
+ - ps
75
+ - pt
76
+ - ro
77
+ - ru
78
+ - sd
79
+ - si
80
+ - sk
81
+ - sl
82
+ - sm
83
+ - sn
84
+ - so
85
+ - sq
86
+ - sr
87
+ - st
88
+ - su
89
+ - sv
90
+ - sw
91
+ - ta
92
+ - te
93
+ - tg
94
+ - th
95
+ - tr
96
+ - uk
97
+ - und
98
+ - ur
99
+ - uz
100
+ - vi
101
+ - xh
102
+ - yi
103
+ - yo
104
+ - zh
105
+ - zu
106
+ datasets:
107
+ - mc4
108
+ - xP3
109
+ ---
110
+
111
+ <img src="https://s3.amazonaws.com/moonup/production/uploads/1657124309515-5f17f0a0925b9863e28ad517.png" alt="BigScience Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
112
+
113
+ Multilingual Text-to-Text Transfer Transformer Zero (mt0)
114
+ Version 1. / 28 Octo 2022
115
+
116
+ // TODO @thomasw21
117
+ Current Checkpoint:
118
+
119
+ // TODO @thomasw21
120
+ Total seen tokens:
121
+
122
+ ---
123
+
124
+ # Model Details
125
+
126
+ mT5 is pretrained on the [mC4](https://www.tensorflow.org/datasets/catalog/c4#c4multilingual) corpus, covering 101 languages:
127
+
128
+ Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bulgarian, Burmese, Catalan, Cebuano, Chichewa, Chinese, Corsican, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish, Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Sotho, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, West Frisian, Xhosa, Yiddish, Yoruba, Zulu.
129
+
130
+ mt5 was then finetuned on xP3 to obtain mt0.
131
+
132
+ ## Basics
133
+ *This section provides information about the model type, version, license, funders, release date, developers, and contact information.*
134
+ *It is useful for anyone who wants to reference the model.*
135
+
136
+ <details>
137
+ <summary>Click to expand</summary>
138
+
139
+ *All collaborators are either volunteers or have an agreement with their employer. (Further breakdown of participants forthcoming.)*
140
+
141
+ **Model Type:** Transformer-based Language Model
142
+
143
+ **Checkpoints format:** `transformers`
144
+
145
+ **Version:** 1.0.0
146
+
147
+ **Languages:** Multiple; see [training data](#training-data)
148
+
149
+ **License:** Apache 2.0
150
+
151
+ **Release Date Estimate:** Friday, 28.October.2022
152
+
153
+ // TODO @thomasw21
154
+ **Send Questions to:**
155
+
156
+ // TODO @thomas21
157
+ **Cite as:**
158
+
159
+ // TODO @thomas21
160
+ **Funded by:**
161
+
162
+ </details>
163
+
164
+
165
+ ## Technical Specifications
166
+ *This section includes details about the model objective and architecture, and the compute infrastructure.*
167
+ *It is useful for people interested in model development.*
168
+
169
+ <details>
170
+ <summary>Click to expand</summary>
171
+
172
+ Please see [the BLOOM training README](https://github.com/bigscience-workshop/bigscience/tree/master/train/tr11-176B-ml#readme) for full details on replicating training.
173
+
174
+ ### Model Architecture and Objective
175
+
176
+ * Same architecture as [mt5-xxl](https://huggingface.co/google/mt5-xxl) (see [paper](https://arxiv.org/abs/2010.11934)):
177
+
178
+ * Encoder-decoder architecture
179
+
180
+ **Objective Function:** Cross Entropy with mean reduction on target tokens (see [API documentation](https://pytorch.org/docs/stable/generated/torch.nn.CrossEntropyLoss.html#torch.nn.CrossEntropyLoss)).
181
+
182
+ ### Compute infrastructure
183
+
184
+ // TODO @adarob: Can you describe where you trained it?
185
+
186
+ #### Hardware
187
+
188
+ // TODO @adarob: Can you describe what was the hardware used?
189
+
190
+ #### Software
191
+
192
+ * T5X([Github link](https://github.com/google-research/t5x), [paper](https://arxiv.org/abs/2203.17189))
193
+
194
+ </details>
195
+
196
+ ---
197
+
198
+ # Training
199
+ *This section provides information about the training data, the speed and size of training elements, and the environmental impact of training.*
200
+ *It is useful for people who want to learn more about the model inputs and training footprint.*
201
+
202
+ <details>
203
+ <summary>Click to expand</summary>
204
+
205
+ ## Training Data
206
+ *This section provides a high-level overview of the training data. It is relevant for anyone who wants to know the basics of what the model is learning.*
207
+
208
+ It was pretrained on mC4 and then finetuned on xP3
209
+
210
+ ### Languages
211
+
212
+ // TODO @thomasw21: Copy list from mt5
213
+
214
+ ### Preprocessing
215
+
216
+ // TODO @thomasw21
217
+
218
+ ## Speeds, Sizes, Times
219
+
220
+ // TODO @adarob: Maybe we can push tensorboard on this repo as well
221
+ Training logs: [Tensorboard link](https://huggingface.co/tensorboard/bigscience/tr11-176B-ml-logs/)
222
+
223
+ - Checkpoint size:
224
+
225
+ - Bf16 weights: 51.7GB
226
+
227
+ - Number of epochs: 1
228
+
229
+ // TODO @adarob: Can you share where the server is?
230
+ - Server training location:
231
+
232
+
233
+ ## Environmental Impact
234
+
235
+ // TODO @adarob: Is it possible for you to share some information about the impact of where you trained it?
236
+
237
+ The evaluation supercomputer, [Jean Zay](http://www.idris.fr/eng/jean-zay/), uses mostly nuclear energy. The heat generated by it is reused for heating campus housing.
238
+
239
+ </details>
240
+
241
+ ---
242
+
243
+ # Uses
244
+
245
+ *This section addresses questions around how the model is intended to be used, discusses the foreseeable users of the model (including those affected by the model), and describes uses that are considered out of scope or misuse of the model.*
246
+ *It is useful for anyone considering using the model or who is affected by the model.*
247
+
248
+ <details>
249
+ <summary>Click to expand</summary>
250
+
251
+ ## How to use
252
+
253
+ This model can be easily used and deployed using HuggingFace's ecosystem. This needs `transformers` and `accelerate` installed. The model can be downloaded as follows:
254
+
255
+ ```python
256
+ from transformers import AutoModel
257
+
258
+ checkpoint = "..." # "checkpoint_1006000" for example
259
+ model = AutoModel.from_pretrained("bigscience/mt0-xxl", revision=checkpoint, torch_dtype="auto", device_map="auto")
260
+ ```
261
+
262
+ ## Intended Use
263
+
264
+ This model is being created in order to enable public research on large language models (LLMs). LLMs are intended to be used for language generation or as a pretrained base model that can be further fine-tuned for specific tasks. Use cases below are not exhaustive.
265
+
266
+ ### Direct Use
267
+
268
+ - Text generation
269
+
270
+ - Exploring characteristics of language generated by a language model
271
+
272
+ - Examples: Cloze tests, counterfactuals, generations with reframings
273
+
274
+ ### Downstream Use
275
+
276
+ - Tasks that leverage language models include: Information Extraction, Question Answering, Summarization
277
+
278
+ </details>
279
+
280
+ ---
281
+
282
+ # Risks and Limitations
283
+ *This section identifies foreseeable harms and misunderstandings.*
284
+
285
+ <details>
286
+ <summary>Click to expand</summary>
287
+
288
+ Model may:
289
+
290
+ - Overrepresent some viewpoints and underrepresent others
291
+
292
+ - Contain stereotypes
293
+
294
+ - Contain [personal information](#personal-data-and-information)
295
+
296
+ - Generate:
297
+
298
+ - Hateful, abusive, or violent language
299
+
300
+ - Discriminatory or prejudicial language
301
+
302
+ - Content that may not be appropriate for all settings, including sexual content
303
+
304
+ - Make errors, including producing incorrect information as if it were factual
305
+
306
+ - Generate irrelevant or repetitive outputs
307
+
308
+ - Induce users into attributing human traits to it, such as sentience or consciousness
309
+
310
+ </details>
311
+
312
+ ---
313
+
314
+ # Evaluation
315
+ *This section describes the evaluation protocols and provides the results.*
316
+
317
+
318
+ <details>
319
+ <summary>Click to expand</summary>
320
+
321
+ ## Metrics
322
+ *This section describes the different ways performance is calculated and why.*
323
+
324
+ # TODO @niklas
325
+
326
+ ## Results
327
+ *Results are based on the [Metrics](#metrics).*
328
+
329
+ **Zero-shot evaluations:**
330
+
331
+ # TODO @niklas
332
+
333
+
334
+ **Train-time Evaluation:**
335
+
336
+ # TODO @adarob: Pending if we can get access to tensorboard
337
+
338
+ </details>
339
+
340
+ ---
341
+
342
+ # Recommendations
343
+
344
+ *This section provides information on warnings and potential mitigations.*
345
+
346
+ <details>
347
+ <summary>Click to expand</summary>
348
+
349
+ - Indirect users should be made aware when the content they're working with is created by the LLM.
350
+
351
+ - Users should be aware of [Risks and Limitations](#risks-and-limitations), and include an appropriate age disclaimer or blocking interface as necessary.
352
+
353
+ - Models trained or finetuned downstream of MT0 should include an updated Model Card.
354
+
355
+ - Users of the model should provide mechanisms for those affected to provide feedback, such as an email address for comments.
356
+
357
+ </details>
358
+
359
+ ---
360
+
361
+ # Glossary and Calculations
362
+
363
+ *This section defines common terms and how metrics are calculated.*
364
+ <details>
365
+ <summary>Click to expand</summary>
366
+
367
+ - <a name="loss">**Loss:**</a> A calculation of the difference between what the model has learned and what the data shows ("groundtruth"). The lower the loss, the better. The training process aims to minimize the loss.
368
+
369
+ - <a name="perplexity">**Perplexity:**</a> This is based on what the model estimates the probability of new data is. The lower the perplexity, the better. If the model is 100% correct at predicting the next token it will see, then the perplexity is 1. Mathematically this is calculated using entropy.
370
+
371
+ - <a name="high-stakes">**High-stakes settings:**</a> Such as those identified as "high-risk AI systems" and "unacceptable risk AI systems" in the European Union's proposed [Artificial Intelligence (AI) Act](https://artificialintelligenceact.eu/annexes/).
372
+
373
+ - <a name="critical-decisions">**Critical decisions:**</a> Such as those defined in [the United States' proposed Algorithmic Accountability Act](https://www.congress.gov/117/bills/s3572/BILLS-117s3572is.pdf).
374
+
375
+ - <a name="human-rights">**Human rights:**</a> Includes those rights defined in the [Universal Declaration of Human Rights](https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf).
376
+
377
+ - <a name="personal-data-and-information">**Personal Data and Personal Information:**</a> Personal data and information is defined in multiple data protection regulations, such as "[personal data](https://gdpr-info.eu/issues/personal-data/)" in the [European Union's General Data Protection Regulation](https://gdpr-info.eu); and "personal information" in the Republic of South Africa's [Protection of Personal Information Act](https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf), The People's Republic of China's [Personal information protection law](http://en.npc.gov.cn.cdurl.cn/2021-12/29/c_694559.htm).
378
+
379
+ - <a name="sensitive-characteristics">**Sensitive characteristics:**</a> This includes specifically protected categories in human rights (see [UHDR, Article 2](https://www.un.org/sites/un2.un.org/files/2021/03/udhr.pdf)) and personal information regulation (see GDPR, [Article 9; Protection of Personal Information Act, Chapter 1](https://www.gov.za/sites/default/files/gcis_document/201409/3706726-11act4of2013popi.pdf))
380
+
381
+ - <a name="deception">**Deception:**</a> Doing something to intentionally mislead individuals to believe something that is false, such as by creating deadbots or chatbots on social media posing as real people, or generating text documents without making consumers aware that the text is machine generated.
382
+
383
+ </details>
384
+
385
+ ---
386
+
387
+ # More Information
388
+ *This section provides links to writing on dataset creation, technical specifications, lessons learned, and initial results.*
389
+
390
+ <details>
391
+ <summary>Click to expand</summary>
392
+
393
+ ## Intermediate checkpoints
394
+
395
+ For academic (or any) usage, we published the intermediate checkpoints, corresponding to the model state at each 1000 steps. There are available as branches in this repository. You can use them using `transformers`:
396
+
397
+ ```python
398
+ from transformers import AutoModel
399
+
400
+ checkpoint = "..." # "checkpoint_1006000" for example
401
+ model = AutoModel.from_pretrained("bigscience/mt0-xxl", revision=checkpoint, torch_dtype="auto", device_map="auto")
402
+ ```
403
+
404
+ ## Dataset Creation
405
+
406
+ // TODO @niklas: Point to the arxiv paper
407
+
408
+ ## Original checkpoints
409
+
410
+ The checkpoints in this repo correspond to the HuggingFace Transformers format. We'll provide T5X checkpoints as well.