model documentation

#1
by nazneen - opened
Files changed (1) hide show
  1. README.md +164 -12
README.md CHANGED
@@ -4,22 +4,140 @@ language:
4
  license: apache-2.0
5
  ---
6
 
7
- # Mengzi-T5 model (Chinese)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  Pretrained model on 300G Chinese corpus.
 
 
 
 
 
 
9
 
10
- [Mengzi: Towards Lightweight yet Ingenious Pre-trained Models for Chinese](https://arxiv.org/abs/2110.06696)
 
 
 
 
 
 
 
 
 
 
11
 
12
- ## Usage
13
- ```python
14
- from transformers import T5Tokenizer, T5ForConditionalGeneration
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- tokenizer = T5Tokenizer.from_pretrained("Langboat/mengzi-t5-base")
17
- model = T5ForConditionalGeneration.from_pretrained("Langboat/mengzi-t5-base")
18
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- ## Citation
21
- If you find the technical report or resource is useful, please cite the following technical report in your paper.
22
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  @misc{zhang2021mengzi,
24
  title={Mengzi: Towards Lightweight yet Ingenious Pre-trained Models for Chinese},
25
  author={Zhuosheng Zhang and Hanqing Zhang and Keming Chen and Yuhang Guo and Jingyun Hua and Yulong Wang and Ming Zhou},
@@ -28,4 +146,38 @@ If you find the technical report or resource is useful, please cite the followin
28
  archivePrefix={arXiv},
29
  primaryClass={cs.CL}
30
  }
31
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  license: apache-2.0
5
  ---
6
 
7
+
8
+ # Model Card for Mengzi-T5 model (Chinese)
9
+
10
+ # Model Details
11
+
12
+ ## Model Description
13
+
14
+ More information needed
15
+
16
+ - **Developed by:** Zhuosheng Zhang, Hanqing Zhang, Keming Chen3, Yuhang Guo, Jingyun Hua, Yulong Wang, Ming Zhou
17
+ - **Shared by [Optional]:** Langboat
18
+ - **Model type:** Text2text Generation
19
+ - **Language(s) (NLP):** Chinese
20
+ - **License:** Apache 2.0
21
+ - **Parent Model:** T5
22
+ - **Resources for more information:**
23
+ - [GitHub Repo](https://github.com/Langboat/Mengzi)
24
+ - [Associated Paper](https://arxiv.org/abs/2110.06696)
25
+
26
+
27
+
28
+ # Uses
29
+
30
+
31
+ ## Direct Use
32
+ This model can be used for the task of text2text generation.
33
+
34
+ ## Downstream Use [Optional]
35
+
36
+ More information needed.
37
+
38
+ ## Out-of-Scope Use
39
+
40
+ The model should not be used to intentionally create hostile or alienating environments for people.
41
+
42
+ # Bias, Risks, and Limitations
43
+
44
+
45
+ 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.
46
+
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 recommendations.
53
+
54
+ # Training Details
55
+
56
+ ## Training Data
57
  Pretrained model on 300G Chinese corpus.
58
+ The model authors also note in the [associated paper](https://arxiv.org/pdf/2110.06696.pdf):
59
+ > The pre-training corpus is derived from Chinese Wikipedia, Chinese News, and Common Crawl, with a 300GB data size in total.
60
+ > Our vocabulary contains 21,128 tokens. We limit the length of sentences in each batch to up to 512 tokens, and the batch size is 128. During pre-training, 15% words are randomly masked in each sequence for MLM prediction.
61
+
62
+
63
+ ## Training Procedure
64
 
65
+
66
+ ### Preprocessing
67
+ The model authors note in the [associated paper](https://arxiv.org/pdf/2110.06696.pdf):
68
+ > We clean the data by using exploratory data analysis techniques, i.e., removing HTML tags, URLs, e-mails, emoji, etc. Since there are simplified and traditional Chinese tokens in the original corpus, we convert traditional tokens into the simplified form using OpenCC. Duplicatearticles are also removed.
69
+
70
+
71
+
72
+ ### Speeds, Sizes, Times
73
+ The model authors note in the [associated paper](https://arxiv.org/pdf/2110.06696.pdf):
74
+ > RoBERTa (Liu et al., 2019) is leveraged as the initial backbone model for Mengzi pre-training. Our Mengzi architecture is based on the base size, where the model consists of 12 transformer layers, with the hidden size of 768, 12 attention heads, and 103M model parameters in total.
75
+
76
 
77
+
78
+ # Evaluation
79
+
80
+
81
+ ## Testing Data, Factors & Metrics
82
+
83
+ ### Testing Data
84
+
85
+ More information needed
86
+
87
+
88
+ ### Factors
89
+ More information needed
90
+
91
+ ### Metrics
92
+
93
+ More information needed
94
+
95
+
96
+ ## Results
97
+
98
+ More information needed
99
 
100
+
101
+ # Model Examination
102
+
103
+ More information needed
104
+
105
+ # Environmental Impact
106
+
107
+ 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).
108
+
109
+ - **Hardware Type:** More information needed
110
+ - **Hours used:** More information needed
111
+ - **Cloud Provider:** More information needed
112
+ - **Compute Region:** More information needed
113
+ - **Carbon Emitted:** More information needed
114
+
115
+ # Technical Specifications [optional]
116
+
117
+ ## Model Architecture and Objective
118
 
119
+ More information needed
120
+
121
+ ## Compute Infrastructure
122
+
123
+ More information needed
124
+
125
+ ### Hardware
126
+
127
+
128
+ More information needed
129
+
130
+ ### Software
131
+
132
+ More information needed.
133
+
134
+ # Citation
135
+
136
+
137
+ **BibTeX:**
138
+ If you find the technical report or resource is useful, please cite the following technical report in your paper.
139
+
140
+ ```bibtex
141
  @misc{zhang2021mengzi,
142
  title={Mengzi: Towards Lightweight yet Ingenious Pre-trained Models for Chinese},
143
  author={Zhuosheng Zhang and Hanqing Zhang and Keming Chen and Yuhang Guo and Jingyun Hua and Yulong Wang and Ming Zhou},
 
146
  archivePrefix={arXiv},
147
  primaryClass={cs.CL}
148
  }
149
+ ```
150
+
151
+
152
+
153
+
154
+ # Glossary [optional]
155
+ More information needed
156
+
157
+ # More Information [optional]
158
+ More information needed
159
+
160
+
161
+ # Model Card Authors [optional]
162
+
163
+ Langboat in collaboration with Ezi Ozoani and the Hugging Face team
164
+
165
+
166
+ # Model Card Contact
167
+
168
+ More information needed
169
+
170
+ # How to Get Started with the Model
171
+
172
+ Use the code below to get started with the model.
173
+
174
+ <details>
175
+ <summary> Click to expand </summary>
176
+
177
+ ```python
178
+ from transformers import T5Tokenizer, T5ForConditionalGeneration
179
+
180
+ tokenizer = T5Tokenizer.from_pretrained("Langboat/mengzi-t5-base")
181
+ model = T5ForConditionalGeneration.from_pretrained("Langboat/mengzi-t5-base")
182
+ ```
183
+ </details>