Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,370 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
inference: false
|
3 |
+
license: other
|
4 |
+
---
|
5 |
+
|
6 |
+
<!-- header start -->
|
7 |
+
<div style="width: 100%;">
|
8 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
9 |
+
</div>
|
10 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
11 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
12 |
+
<p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
|
13 |
+
</div>
|
14 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
15 |
+
<p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
<!-- header end -->
|
19 |
+
|
20 |
+
# Baichuan Inc's Baichuan 7B GPTQ
|
21 |
+
|
22 |
+
These files are GPTQ 4bit model files for [Baichuan Inc's Baichuan 7B](https://huggingface.co/baichuan-inc/baichuan-7B).
|
23 |
+
|
24 |
+
It is the result of quantising to 4bit using [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ).
|
25 |
+
|
26 |
+
## Repositories available
|
27 |
+
|
28 |
+
* [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/CAMEL-33B-Combined-Data-GPTQ)
|
29 |
+
* [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/baichuan-inc/baichuan-7B)
|
30 |
+
|
31 |
+
## Experimental first GPTQ, requires AutoGPTQ PR
|
32 |
+
|
33 |
+
This is a first quantisation of a brand new model type.
|
34 |
+
|
35 |
+
It will only work with AutoGPTQ, and only by merging [LaaZa's PR](https://github.com/PanQiWei/AutoGPTQ/pull/164).
|
36 |
+
|
37 |
+
To merge this PR, please follow these steps to install AutoGPTQ from source:
|
38 |
+
```
|
39 |
+
pip uninstall -y auto-gptq
|
40 |
+
git clone -b Baichuan https://github.com/LaaZa/AutoGPTQ baichuan_AutoGPTQ
|
41 |
+
cd baichuan_AutoGPTQ
|
42 |
+
GITHUB_ACTIONS=true pip install .
|
43 |
+
```
|
44 |
+
|
45 |
+
## Trust Remote Code
|
46 |
+
|
47 |
+
As this is a new model type, not yet supported by Transformers, you must run inference with Trust Remote Code set.
|
48 |
+
|
49 |
+
Using text-generation-webui, this can be done by ticking "Trust Remote Code" in the UI, or by passing `--trust-remote-code` on the command line.
|
50 |
+
|
51 |
+
In Python code, please pass `trust_remote_code=True` to both the `AutoTokenizer.from_pretrained()` and `AutoGPTQForCausalLM.from_quantized()` calls.
|
52 |
+
|
53 |
+
## Prompt template
|
54 |
+
|
55 |
+
A general prompt template is unknown at this point.
|
56 |
+
|
57 |
+
The example given in the README is a 1-shot categorisation:
|
58 |
+
```
|
59 |
+
Hamlet->Shakespeare\nOne Hundred Years of Solitude->
|
60 |
+
```
|
61 |
+
|
62 |
+
|
63 |
+
## How to easily download and use this model in text-generation-webui
|
64 |
+
|
65 |
+
Please make sure you're using the latest version of text-generation-webui
|
66 |
+
|
67 |
+
1. Click the **Model tab**.
|
68 |
+
2. Untick **Autoload**
|
69 |
+
3. Under **Download custom model or LoRA**, enter `TheBloke/baichuan-7B-GPTQ`.
|
70 |
+
4. Click **Download**.
|
71 |
+
5. The model will start downloading. Once it's finished it will say "Done"
|
72 |
+
5. Choose the AutoGPTQ loader.
|
73 |
+
6. In the top left, click the refresh icon next to **Model**.
|
74 |
+
7. In the **Model** dropdown, choose the model you just downloaded: `baichuan-7B-GPTQ`
|
75 |
+
8. Tick "Trust Remote Code". Then click **Save Settings** followed by **Reload**
|
76 |
+
7. The model will automatically load, and is now ready for use!
|
77 |
+
8. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
|
78 |
+
|
79 |
+
## How to use this GPTQ model from Python code
|
80 |
+
|
81 |
+
First make sure you have the [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) PR installed as mentioned above.
|
82 |
+
|
83 |
+
Then try the following example code:
|
84 |
+
|
85 |
+
```python
|
86 |
+
from transformers import AutoTokenizer
|
87 |
+
from auto_gptq import AutoGPTQForCausalLM
|
88 |
+
|
89 |
+
model_name_or_path = "/workspace/process/baichuan-7B/gptq"
|
90 |
+
|
91 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
|
92 |
+
|
93 |
+
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
94 |
+
use_safetensors=True,
|
95 |
+
device_map="auto",
|
96 |
+
trust_remote_code=True)
|
97 |
+
|
98 |
+
# This is the example from the Baichuan README
|
99 |
+
inputs = tokenizer('Hamlet->Shakespeare\nOne Hundred Years of Solitude->', return_tensors='pt')
|
100 |
+
inputs = inputs.to('cuda:0')
|
101 |
+
pred = model.generate(**inputs, max_new_tokens=64,repetition_penalty=1.1)
|
102 |
+
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
103 |
+
|
104 |
+
# Here's my own example, which sometimes kind of works.
|
105 |
+
inputs = tokenizer('USER:Write a story about llamas\nASSISTANT:', return_tensors='pt')
|
106 |
+
inputs = inputs.to('cuda:0')
|
107 |
+
pred = model.generate(**inputs, max_new_tokens=500,repetition_penalty=1.1)
|
108 |
+
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
109 |
+
```
|
110 |
+
|
111 |
+
## Provided files
|
112 |
+
|
113 |
+
**gptq_model-4bit-128g.safetensors**
|
114 |
+
|
115 |
+
This will work only with [AutoGPTQ using LaaZa's PR](https://github.com/PanQiWei/AutoGPTQ/pull/164).
|
116 |
+
|
117 |
+
* `gptq_model-4bit-128g.safetensors`
|
118 |
+
* Works only with AutoGPTQ, using PR.
|
119 |
+
* Requires `trust_remote_code`.
|
120 |
+
* Works with text-generation-webui, but not yet with one-click-installers unless you manually re-compile AutoGPTQ.
|
121 |
+
* Parameters: Groupsize = 128. Act Order / desc_act = False.
|
122 |
+
|
123 |
+
<!-- footer start -->
|
124 |
+
## Discord
|
125 |
+
|
126 |
+
For further support, and discussions on these models and AI in general, join us at:
|
127 |
+
|
128 |
+
[TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
|
129 |
+
|
130 |
+
## Thanks, and how to contribute.
|
131 |
+
|
132 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
133 |
+
|
134 |
+
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
135 |
+
|
136 |
+
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
137 |
+
|
138 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
139 |
+
|
140 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
141 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
142 |
+
|
143 |
+
**Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
|
144 |
+
|
145 |
+
**Patreon special mentions**: Mano Prime, Fen Risland, Derek Yates, Preetika Verma, webtim, Sean Connelly, Alps Aficionado, Karl Bernard, Junyu Yang, Nathan LeClaire, Chris McCloskey, Lone Striker, Asp the Wyvern, Eugene Pentland, Imad Khwaja, trip7s trip, WelcomeToTheClub, John Detwiler, Artur Olbinski, Khalefa Al-Ahmad, Trenton Dambrowitz, Talal Aujan, Kevin Schuppel, Luke Pendergrass, Pyrater, Joseph William Delisle, terasurfer , vamX, Gabriel Puliatti, David Flickinger, Jonathan Leane, Iucharbius , Luke, Deep Realms, Cory Kujawski, ya boyyy, Illia Dulskyi, senxiiz, Johann-Peter Hartmann, John Villwock, K, Ghost , Spiking Neurons AB, Nikolai Manek, Rainer Wilmers, Pierre Kircher, biorpg, Space Cruiser, Ai Maven, subjectnull, Willem Michiel, Ajan Kanaga, Kalila, chris gileta, Oscar Rangel
|
146 |
+
|
147 |
+
Thank you to all my generous patrons and donaters!
|
148 |
+
|
149 |
+
<!-- footer end -->
|
150 |
+
|
151 |
+
# Original model card: Baichuan Inc's Baichuan 7B
|
152 |
+
|
153 |
+
# baichuan-7B
|
154 |
+
|
155 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
156 |
+
|
157 |
+
baichuan-7B是由百川智能开发的一个开源的大规模预训练模型。基于Transformer结构,在大约1.2万亿tokens上训练的70亿参数模型,支持中英双语,上下文窗口长度为4096。在标准的中文和英文权威benchmark(C-EVAL/MMLU)上均取得同尺寸最好的效果。
|
158 |
+
|
159 |
+
如果希望使用baichuan-7B(如进行推理、Finetune等),我们推荐使用配套代码库[baichuan-7B](https://github.com/baichuan-inc/baichuan-7B)。
|
160 |
+
|
161 |
+
baichuan-7B is an open-source large-scale pre-trained model developed by Baichuan Intelligent Technology. Based on the Transformer architecture, it is a model with 7 billion parameters trained on approximately 1.2 trillion tokens. It supports both Chinese and English, with a context window length of 4096. It achieves the best performance of its size on standard Chinese and English authoritative benchmarks (C-EVAL/MMLU).
|
162 |
+
|
163 |
+
If you wish to use baichuan-7B (for inference, finetuning, etc.), we recommend using the accompanying code library [baichuan-7B](https://github.com/baichuan-inc/baichuan-7B).
|
164 |
+
|
165 |
+
## Why use baichuan-7B
|
166 |
+
|
167 |
+
- 在同尺寸模型中baichuan-7B达到了目前SOTA的水平,参考下面MMLU指标
|
168 |
+
- baichuan-7B使用自有的中英文双语语料进行训练,在中文上进行优化,在C-Eval达到SOTA水平
|
169 |
+
- 不同于LLaMA完全禁止商业使用,baichuan-7B使用更宽松的开源协议,允许用于商业目的
|
170 |
+
|
171 |
+
- Among models of the same size, baichuan-7B has achieved the current state-of-the-art (SOTA) level, as evidenced by the following MMLU metrics.
|
172 |
+
- baichuan-7B is trained on proprietary bilingual Chinese-English corpora, optimized for Chinese, and achieves SOTA performance on C-Eval.
|
173 |
+
- Unlike LLaMA, which completely prohibits commercial use, baichuan-7B employs a more lenient open-source license, allowing for commercial purposes.
|
174 |
+
|
175 |
+
## How to Get Started with the Model
|
176 |
+
|
177 |
+
如下是一个使用baichuan-7B进行1-shot推理的任务,根据作品给出作者名,正确输出为"夜雨寄北->李商隐"
|
178 |
+
```python
|
179 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
180 |
+
|
181 |
+
tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/baichuan-7B", trust_remote_code=True)
|
182 |
+
model = AutoModelForCausalLM.from_pretrained("baichuan-inc/baichuan-7B", device_map="auto", trust_remote_code=True)
|
183 |
+
inputs = tokenizer('登鹳雀楼->王之涣\n夜雨寄北->', return_tensors='pt')
|
184 |
+
inputs = inputs.to('cuda:0')
|
185 |
+
pred = model.generate(**inputs, max_new_tokens=64,repetition_penalty=1.1)
|
186 |
+
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
187 |
+
```
|
188 |
+
|
189 |
+
The following is a task of performing 1-shot inference using baichuan-7B, where the author's name is given based on the work, with the correct output being "One Hundred Years of Solitude->Gabriel Garcia Marquez"
|
190 |
+
```python
|
191 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
192 |
+
|
193 |
+
tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/baichuan-7B", trust_remote_code=True)
|
194 |
+
model = AutoModelForCausalLM.from_pretrained("baichuan-inc/baichuan-7B", device_map="auto", trust_remote_code=True)
|
195 |
+
inputs = tokenizer('Hamlet->Shakespeare\nOne Hundred Years of Solitude->', return_tensors='pt')
|
196 |
+
inputs = inputs.to('cuda:0')
|
197 |
+
pred = model.generate(**inputs, max_new_tokens=64,repetition_penalty=1.1)
|
198 |
+
print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
|
199 |
+
```
|
200 |
+
|
201 |
+
## Model Details
|
202 |
+
|
203 |
+
### Model Description
|
204 |
+
|
205 |
+
<!-- Provide a longer summary of what this model is. -->
|
206 |
+
|
207 |
+
- **Developed by:** 百川智能(Baichuan Intelligent Technology)
|
208 |
+
- **Email**: opensource@baichuan-inc.com
|
209 |
+
- **Language(s) (NLP):** Chinese/English
|
210 |
+
- **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)
|
211 |
+
|
212 |
+
### Model Sources
|
213 |
+
|
214 |
+
<!-- Provide the basic links for the model. -->
|
215 |
+
|
216 |
+
整体模型基于标准的Transformer结构,我们采用了和LLaMA一样的模型设计
|
217 |
+
- **Position Embedding**:采用rotary-embedding,是现阶段被大多数模型采用的位置编码方案,具有很好的外推性。
|
218 |
+
- **Feedforward Layer**:采用SwiGLU,Feedforward变化为(8/3)倍的隐含层大小,即11008。
|
219 |
+
- **Layer Normalization**: 基于[RMSNorm](https://arxiv.org/abs/1910.07467)的Pre-Normalization。
|
220 |
+
|
221 |
+
具体参数和见下表
|
222 |
+
| Hyperparameter | Value |
|
223 |
+
|----------------|-------|
|
224 |
+
|n_parameters | 7000559616 |
|
225 |
+
|n_layers | 32 |
|
226 |
+
| n_heads | 32 |
|
227 |
+
| d_model | 4096 |
|
228 |
+
| vocab size | 64000 |
|
229 |
+
| sequence length | 4096 |
|
230 |
+
|
231 |
+
The overall model is based on the standard Transformer structure, and we have adopted the same model design as LLaMA:
|
232 |
+
|
233 |
+
- 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.
|
234 |
+
- Feedforward Layer: We use SwiGLU. The feedforward changes to (8/3) times the size of the hidden layer, that is, 11008.
|
235 |
+
- Layer Normalization: Pre-Normalization based on [RMSNorm](https://arxiv.org/abs/1910.07467).
|
236 |
+
|
237 |
+
The specific parameters are as follows:
|
238 |
+
| Hyperparameter | Value |
|
239 |
+
|----------------|-------|
|
240 |
+
|n_parameters | 7000559616 |
|
241 |
+
|n_layers | 32 |
|
242 |
+
| n_heads | 32 |
|
243 |
+
| d_model | 4096 |
|
244 |
+
| vocab size | 64000 |
|
245 |
+
| sequence length | 4096 |
|
246 |
+
|
247 |
+
## Uses
|
248 |
+
|
249 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
250 |
+
|
251 |
+
### Downstream Use
|
252 |
+
|
253 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
254 |
+
我们同时开源出了和本模型配套的训练代码,允许进行高效的Finetune用于下游任务,具体参见[baichuan-7B](https://github.com/baichuan-inc/baichuan-7B)。
|
255 |
+
|
256 |
+
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).
|
257 |
+
|
258 |
+
### Out-of-Scope Use
|
259 |
+
|
260 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
261 |
+
在没有充分评估风险和采取缓解措施的情况下投入生产使用;任何可能被视为不负责任或有害的使用案例。
|
262 |
+
|
263 |
+
Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.
|
264 |
+
|
265 |
+
## Bias, Risks, and Limitations
|
266 |
+
|
267 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
268 |
+
|
269 |
+
baichuan-7B可能会产生事实上不正确的输出,不应依赖它产生事实上准确的信息。baichuan-7B是在各种公共数据集上进行训练的。尽管我们已经做出了巨大的努力来清洗预训练数据,但这个模型可能会生成淫秽、偏见或其他冒犯性的输出。
|
270 |
+
|
271 |
+
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.
|
272 |
+
|
273 |
+
## Training Details
|
274 |
+
|
275 |
+
训练具体设置参见[baichuan-7B](https://github.com/baichuan-inc/baichuan-7B)。
|
276 |
+
|
277 |
+
For specific training settings, please refer to [baichuan-7B](https://github.com/baichuan-inc/baichuan-7B).
|
278 |
+
|
279 |
+
## Evaluation
|
280 |
+
|
281 |
+
### 中文评测
|
282 |
+
#### C-Eval
|
283 |
+
[CEval数据集](https://cevalbenchmark.com/index.html)是一个全面的中文基础模型评测数据集,涵盖了52个学科和四个难度的级别。我们使用该数据集的dev集作为few-shot的来源,在test集上进行了5-shot测试。
|
284 |
+
|
285 |
+
|
286 |
+
| Model 5-shot | Average | Avg(Hard) | STEM | Social Sciences | Humanities | Others |
|
287 |
+
|-----------------------------|---------|-----------|------|-----------------|------------|--------|
|
288 |
+
| GPT-4 | 68.7 | 54.9 | 67.1 | 77.6 | 64.5 | 67.8 |
|
289 |
+
| ChatGPT | 54.4 | 41.4 | 52.9 | 61.8 | 50.9 | 53.6 |
|
290 |
+
| Claude-v1.3 | 54.2 | 39.0 | 51.9 | 61.7 | 52.1 | 53.7 |
|
291 |
+
| Claude-instant-v1.0 | 45.9 | 35.5 | 43.1 | 53.8 | 44.2 | 45.4 |
|
292 |
+
| moss-moon-003-base (16B) | 27.4 | 24.5 | 27.0 | 29.1 | 27.2 | 26.9 |
|
293 |
+
| Ziya-LLaMA-13B-pretrain | 30.2 | 22.7 | 27.7 | 34.4 | 32.0 | 28.9 |
|
294 |
+
| LLaMA-7B-hf | 27.1 | 25.9 | 27.1 | 26.8 | 27.9 | 26.3 |
|
295 |
+
| ChatGLM-6B | 34.5 | 23.1 | 30.4 | 39.6 | 37.4 | 34.5 |
|
296 |
+
| Falcon-7B | 25.8 | 24.3 | 25.8 | 26.0 | 25.8 | 25.6 |
|
297 |
+
| Open-LLaMA-v2-pretrain (7B) | 24.0 | 22.5 | 23.1 | 25.3 | 25.2 | 23.2 |
|
298 |
+
| TigerBot-7B-base | 25.7 | 27.0 | 27.3 | 24.7 | 23.4 | 26.1 |
|
299 |
+
| Aquila-7B<sup>*</sup> | 25.5 | 25.2 | 25.6 | 24.6 | 25.2 | 26.6 |
|
300 |
+
| BLOOM-7B | 22.8 | 20.2 | 21.8 | 23.3 | 23.9 | 23.3 |
|
301 |
+
| BLOOMZ-7B | 35.7 | 25.8 | 31.3 | 43.5 | 36.6 | 35.6 |
|
302 |
+
| **baichuan-7B** | 42.8 | 31.5 | 38.2 | 52.0 | 46.2 | 39.3 |
|
303 |
+
|
304 |
+
|
305 |
+
#### Gaokao
|
306 |
+
[Gaokao](https://github.com/ExpressAI/AI-Gaokao) 是一个以中国高考题作为评测大语言模型能力的数据集,用以评估模型的语言能力和逻辑推理能力。
|
307 |
+
我们只保留了其中的单项选择题,并对所有模型进行统一5-shot测试。
|
308 |
+
|
309 |
+
以下是测试的结果。
|
310 |
+
|
311 |
+
| Model | Average |
|
312 |
+
|-------------------------|-----------------|
|
313 |
+
| Open-LLaMA-v2-pretrain | 21.41 |
|
314 |
+
| Ziya-LLaMA-13B-pretrain | 23.17 |
|
315 |
+
| Falcon-7B | 23.98 |
|
316 |
+
| TigerBot-7B-base | 25.94 |
|
317 |
+
| LLaMA-7B | 27.81 |
|
318 |
+
| ChatGLM-6B | 21.41 |
|
319 |
+
| BLOOM-7B | 26.96 |
|
320 |
+
| BLOOMZ-7B | 28.72 |
|
321 |
+
| Aquila-7B<sup>*</sup> | 24.39 |
|
322 |
+
| **baichuan-7B** | **36.24** |
|
323 |
+
|
324 |
+
|
325 |
+
#### AGIEval
|
326 |
+
[AGIEval](https://github.com/microsoft/AGIEval) 旨在评估模型的认知和解决问题相关的任务中的一般能力。
|
327 |
+
我们只保留了其中的四选一单项选择题,随机划分后对所有模型进行了统一5-shot测试。
|
328 |
+
|
329 |
+
| Model | Average |
|
330 |
+
|-------------------------|-----------------|
|
331 |
+
| Open-LLaMA-v2-pretrain | 23.49 |
|
332 |
+
| Ziya-LLaMA-13B-pretrain | 27.64 |
|
333 |
+
| Falcon-7B | 27.18 |
|
334 |
+
| TigerBot-7B-base | 25.19 |
|
335 |
+
| LLaMA-7B | 28.17 |
|
336 |
+
| ChatGLM-6B | 23.49 |
|
337 |
+
| BLOOM-7B | 26.55 |
|
338 |
+
| BLOOMZ-7B | 30.27 |
|
339 |
+
| Aquila-7B<sup>*</sup> | 25.58 |
|
340 |
+
| **baichuan-7B** | **34.44** |
|
341 |
+
|
342 |
+
<sup>*</sup>其中Aquila模型来源于[智源官方网站](https://model.baai.ac.cn/model-detail/100098),仅做参考
|
343 |
+
|
344 |
+
### English Leaderboard
|
345 |
+
In addition to Chinese, we also tested the model's performance in English.
|
346 |
+
|
347 |
+
#### MMLU
|
348 |
+
|
349 |
+
[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.
|
350 |
+
|
351 |
+
We adopted the [open-source]((https://github.com/hendrycks/test)) evaluation scheme, and the final 5-shot results are as follows:
|
352 |
+
|
353 |
+
| Model | Humanities | Social Sciences | STEM | Other | Average |
|
354 |
+
|----------------------------------------|-----------:|:---------------:|:----:|:-----:|:-------:|
|
355 |
+
| LLaMA-7B<sup>2</sup> | 34.0 | 38.3 | 30.5 | 38.1 | 35.1 |
|
356 |
+
| Falcon-7B<sup>1</sup> | - | - | - | - | 35.0 |
|
357 |
+
| mpt-7B<sup>1</sup> | - | - | - | - | 35.6 |
|
358 |
+
| ChatGLM-6B<sup>0</sup> | 35.4 | 41.0 | 31.3 | 40.5 | 36.9 |
|
359 |
+
| BLOOM 7B<sup>0</sup> | 25.0 | 24.4 | 26.5 | 26.4 | 25.5 |
|
360 |
+
| BLOOMZ 7B<sup>0</sup> | 31.3 | 42.1 | 34.4 | 39.0 | 36.1 |
|
361 |
+
| moss-moon-003-base (16B)<sup>0</sup> | 24.2 | 22.8 | 22.4 | 24.4 | 23.6 |
|
362 |
+
| moss-moon-003-sft (16B)<sup>0</sup> | 30.5 | 33.8 | 29.3 | 34.4 | 31.9 |
|
363 |
+
| **baichuan-7B<sup>0</sup>** | 38.4 | 48.9 | 35.6 | 48.1 | 42.3 |
|
364 |
+
|
365 |
+
The superscript in the Model column indicates the source of the results.
|
366 |
+
```
|
367 |
+
0:reimplemented
|
368 |
+
1:https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
|
369 |
+
2:https://paperswithcode.com/sota/multi-task-language-understanding-on-mmlu
|
370 |
+
```
|