jackaduma commited on
Commit
2d9b4ef
1 Parent(s): db8d015

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +175 -1
README.md CHANGED
@@ -52,4 +52,178 @@ for response in model.chat(tokenizer, messages, stream=True):
52
  print(response[position:], end='', flush=True)
53
  position = len(response)
54
 
55
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  print(response[position:], end='', flush=True)
53
  position = len(response)
54
 
55
+ ```
56
+
57
+ ## Model Details
58
+
59
+ ### Model Description
60
+
61
+ <!-- Provide a longer summary of what this model is. -->
62
+
63
+ - **Developed by:** 百川智能(Baichuan Intelligent Technology)
64
+ - **Email**: [email protected]
65
+ - **Language(s) (NLP):** Chinese/English
66
+ - **License:** [Baichuan-7B License](https://huggingface.co/baichuan-inc/Baichuan-7B/blob/main/baichuan-7B%20%E6%A8%A1%E5%9E%8B%E8%AE%B8%E5%8F%AF%E5%8D%8F%E8%AE%AE.pdf)
67
+
68
+ ### Model Sources
69
+
70
+ <!-- Provide the basic links for the model. -->
71
+
72
+ 整体模型基于标准的Transformer结构,我们采用了和LLaMA一样的模型设计
73
+ - **Position Embedding**:采用rotary-embedding,是现阶段被大多数模型采用的位置编码方案,具有很好的外推性。
74
+ - **Feedforward Layer**:采用SwiGLU,Feedforward变化为(8/3)倍的隐含层大小,即11008。
75
+ - **Layer Normalization**: 基于[RMSNorm](https://arxiv.org/abs/1910.07467)的Pre-Normalization。
76
+
77
+ 具体参数和见下表
78
+ | Hyperparameter | Value |
79
+ |----------------|-------|
80
+ |n_parameters | 7000559616 |
81
+ |n_layers | 32 |
82
+ | n_heads | 32 |
83
+ | d_model | 4096 |
84
+ | vocab size | 64000 |
85
+ | sequence length | 4096 |
86
+
87
+ The overall model is based on the standard Transformer structure, and we have adopted the same model design as LLaMA:
88
+
89
+ - Position Embedding: We use rotary-embedding, which is the position encoding scheme adopted by most models at this stage, and it has excellent extrapolation capabilities.
90
+ - Feedforward Layer: We use SwiGLU. The feedforward changes to (8/3) times the size of the hidden layer, that is, 11008.
91
+ - Layer Normalization: Pre-Normalization based on [RMSNorm](https://arxiv.org/abs/1910.07467).
92
+
93
+ The specific parameters are as follows:
94
+ | Hyperparameter | Value |
95
+ |----------------|-------|
96
+ |n_parameters | 7000559616 |
97
+ |n_layers | 32 |
98
+ | n_heads | 32 |
99
+ | d_model | 4096 |
100
+ | vocab size | 64000 |
101
+ | sequence length | 4096 |
102
+
103
+ ## Uses
104
+
105
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
106
+
107
+ ### Downstream Use
108
+
109
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
110
+ 我们同时开源出了和本模型配套的训练代码,允许进行高效的Finetune用于下游任务,具体参见[Baichuan-7B](https://github.com/baichuan-inc/Baichuan-7B)。
111
+
112
+ We have also open-sourced the training code that accompanies this model, allowing for efficient finetuning for downstream tasks. For more details, please refer to [Baichuan-7B](https://github.com/baichuan-inc/Baichuan-7B).
113
+
114
+ ### Out-of-Scope Use
115
+
116
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
117
+ 在没有充分评估风险和采取缓解措施的情况下投入生产使用;任何可能被视为不负责任或有害的使用案例。
118
+
119
+ Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.
120
+
121
+ ## Bias, Risks, and Limitations
122
+
123
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
124
+
125
+ Baichuan-7B可能会产生事实上不正确的输出,不应依赖它产生事实上准确的信息。Baichuan-7B是在各种公共数据集上进行训练的。尽管我们已经做出了巨大的努力来清洗预训练数据,但这个模型可能会生成淫秽、偏见或其他冒犯性的输出。
126
+
127
+ Baichuan-7B can produce factually incorrect output, and should not be relied on to produce factually accurate information. Baichuan-7B was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
128
+
129
+ ## Training Details
130
+
131
+ 训练具体设置参见[Baichuan-7B](https://github.com/baichuan-inc/Baichuan-7B)。
132
+
133
+ For specific training settings, please refer to [Baichuan-7B](https://github.com/baichuan-inc/Baichuan-7B).
134
+
135
+ ## Evaluation
136
+
137
+ ### 中文评测
138
+ #### C-Eval
139
+ [CEval数据集](https://cevalbenchmark.com/index.html)是一个全面的中文基础模型评测数据集,涵盖了52个学科和四个难度的级别。我们使用该数据集的dev集作为few-shot的来源,在test集上进行了5-shot测试。
140
+
141
+
142
+ | Model 5-shot | Average | Avg(Hard) | STEM | Social Sciences | Humanities | Others |
143
+ |-----------------------------|---------|-----------|------|-----------------|------------|--------|
144
+ | GPT-4 | 68.7 | 54.9 | 67.1 | 77.6 | 64.5 | 67.8 |
145
+ | ChatGPT | 54.4 | 41.4 | 52.9 | 61.8 | 50.9 | 53.6 |
146
+ | Claude-v1.3 | 54.2 | 39.0 | 51.9 | 61.7 | 52.1 | 53.7 |
147
+ | Claude-instant-v1.0 | 45.9 | 35.5 | 43.1 | 53.8 | 44.2 | 45.4 |
148
+ | moss-moon-003-base (16B) | 27.4 | 24.5 | 27.0 | 29.1 | 27.2 | 26.9 |
149
+ | Ziya-LLaMA-13B-pretrain | 30.2 | 22.7 | 27.7 | 34.4 | 32.0 | 28.9 |
150
+ | LLaMA-7B-hf | 27.1 | 25.9 | 27.1 | 26.8 | 27.9 | 26.3 |
151
+ | ChatGLM-6B | 34.5 | 23.1 | 30.4 | 39.6 | 37.4 | 34.5 |
152
+ | Falcon-7B | 25.8 | 24.3 | 25.8 | 26.0 | 25.8 | 25.6 |
153
+ | Open-LLaMA-v2-pretrain (7B) | 24.0 | 22.5 | 23.1 | 25.3 | 25.2 | 23.2 |
154
+ | TigerBot-7B-base | 25.7 | 27.0 | 27.3 | 24.7 | 23.4 | 26.1 |
155
+ | Aquila-7B<sup>*</sup> | 25.5 | 25.2 | 25.6 | 24.6 | 25.2 | 26.6 |
156
+ | BLOOM-7B | 22.8 | 20.2 | 21.8 | 23.3 | 23.9 | 23.3 |
157
+ | BLOOMZ-7B | 35.7 | 25.8 | 31.3 | 43.5 | 36.6 | 35.6 |
158
+ | **Baichuan-7B** | 42.8 | 31.5 | 38.2 | 52.0 | 46.2 | 39.3 |
159
+
160
+
161
+ #### Gaokao
162
+ [Gaokao](https://github.com/ExpressAI/AI-Gaokao) 是一个以中国高考题作为评测大语言模型能力的数据集,用以评估模型的语言能力和逻辑推理能力。
163
+ 我们只保留了其中的单项选择题,并对所有模型进行统一5-shot测试。
164
+
165
+ 以下是测试的结果。
166
+
167
+ | Model | Average |
168
+ |-------------------------|-----------------|
169
+ | Open-LLaMA-v2-pretrain | 21.41 |
170
+ | Ziya-LLaMA-13B-pretrain | 23.17 |
171
+ | Falcon-7B | 23.98 |
172
+ | TigerBot-7B-base | 25.94 |
173
+ | LLaMA-7B | 27.81 |
174
+ | ChatGLM-6B | 21.41 |
175
+ | BLOOM-7B | 26.96 |
176
+ | BLOOMZ-7B | 28.72 |
177
+ | Aquila-7B<sup>*</sup> | 24.39 |
178
+ | **Baichuan-7B** | **36.24** |
179
+
180
+
181
+ #### AGIEval
182
+ [AGIEval](https://github.com/microsoft/AGIEval) 旨在评估模型的认知和解决问题相关的任务中的一般能力。
183
+ 我们只保留了其中的四选一单项选择题,随机划分后对所有模型进行了统一5-shot测试。
184
+
185
+ | Model | Average |
186
+ |-------------------------|-----------------|
187
+ | Open-LLaMA-v2-pretrain | 23.49 |
188
+ | Ziya-LLaMA-13B-pretrain | 27.64 |
189
+ | Falcon-7B | 27.18 |
190
+ | TigerBot-7B-base | 25.19 |
191
+ | LLaMA-7B | 28.17 |
192
+ | ChatGLM-6B | 23.49 |
193
+ | BLOOM-7B | 26.55 |
194
+ | BLOOMZ-7B | 30.27 |
195
+ | Aquila-7B<sup>*</sup> | 25.58 |
196
+ | **Baichuan-7B** | **34.44** |
197
+
198
+ <sup>*</sup>其中Aquila模型来源于[智源官方网站](https://model.baai.ac.cn/model-detail/100098),仅做参考
199
+
200
+ ### English Leaderboard
201
+ In addition to Chinese, we also tested the model's performance in English.
202
+
203
+ #### MMLU
204
+
205
+ [MMLU](https://arxiv.org/abs/2009.03300) is an English evaluation dataset that includes 57 multiple-choice tasks, covering elementary mathematics, American history, computer science, law, etc. The difficulty ranges from high school level to expert level, making it a mainstream LLM evaluation dataset.
206
+
207
+ We adopted the [open-source]((https://github.com/hendrycks/test)) evaluation scheme, and the final 5-shot results are as follows:
208
+
209
+ | Model | Humanities | Social Sciences | STEM | Other | Average |
210
+ |----------------------------------------|-----------:|:---------------:|:----:|:-----:|:-------:|
211
+ | LLaMA-7B<sup>2</sup> | 34.0 | 38.3 | 30.5 | 38.1 | 35.1 |
212
+ | Falcon-7B<sup>1</sup> | - | - | - | - | 35.0 |
213
+ | mpt-7B<sup>1</sup> | - | - | - | - | 35.6 |
214
+ | ChatGLM-6B<sup>0</sup> | 35.4 | 41.0 | 31.3 | 40.5 | 36.9 |
215
+ | BLOOM 7B<sup>0</sup> | 25.0 | 24.4 | 26.5 | 26.4 | 25.5 |
216
+ | BLOOMZ 7B<sup>0</sup> | 31.3 | 42.1 | 34.4 | 39.0 | 36.1 |
217
+ | moss-moon-003-base (16B)<sup>0</sup> | 24.2 | 22.8 | 22.4 | 24.4 | 23.6 |
218
+ | moss-moon-003-sft (16B)<sup>0</sup> | 30.5 | 33.8 | 29.3 | 34.4 | 31.9 |
219
+ | **Baichuan-7B<sup>0</sup>** | 38.4 | 48.9 | 35.6 | 48.1 | 42.3 |
220
+
221
+ The superscript in the Model column indicates the source of the results.
222
+ ```
223
+ 0:reimplemented
224
+ 1:https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
225
+ 2:https://paperswithcode.com/sota/multi-task-language-understanding-on-mmlu
226
+ ```
227
+
228
+ ## Our Group
229
+ ![WeChat](https://github.com/baichuan-inc/Baichuan-13B/blob/main/media/wechat.jpeg?raw=true)