jeffreygao commited on
Commit
08881d3
1 Parent(s): 7dcb63b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ language:
4
+ - zh
5
+ - en
6
+ ---
7
+ # BlueLM
8
+
9
+ <p align="center">
10
+ 🖥 <a href="https://github.com/vivo-ai-lab/BlueLM" target="_blank">github</a> • 📜 <a href="https://huggingface.co/vivo-ai/BlueLM-7B-Chat-4bits/blob/main/MODEL_LICENSE" target="_blank">LICENSE</a> • 🎯 <a href="https://developers.vivo.com/product/ai/bluelm" target="_blank">vivo Developers</a> • 🗨 <a href="https://github.com/vivo-ai-lab/BlueLM/blob/main/resources/wechat.png" target="_blank">WeChat</a>
11
+ </p>
12
+
13
+ ## 模型介绍/Introduction
14
+
15
+ BlueLM 是由 vivo AI 全球研究院自主研发的大规模预训练语言模型,本次发布包含 7B 基础模型和 7B 对话模型,同时我们开源了支持 **32K** 的长文本基础模型和对话模型。
16
+
17
+ - **更大量的优质数据**:高质量语料库进行训练,规模达到了 **2.6 万亿** 的 token 数,该语料库包含中文、英文以及少量日韩数据。
18
+ - **更优的效果**:其中 BlueLM-7B-Chat 在 **C-Eval** 和 **CMMLU** 上均取得领先结果,对比同尺寸开源模型中具有较强的竞争力。
19
+ - **长文本支持**:BlueLM-7B-Base-32K 和 BlueLM-7B-Chat-32K 均支持 **32K** 长文本,在保持基础能力相当情况下,能够支持更长上下文理解。
20
+ - **协议说明**:BlueLM 系列欢迎开发者进行学术研究和商业应用。
21
+
22
+ BlueLM is a large-scale open-source language model independently developed by the vivo AI Lab. This release includes 2K and 32K context length versions for both Base and Chat models.
23
+
24
+ - **High-quality Data**: BlueLM is trained on a high-quality data with 2.6 trillion tokens. Our train corpus mainly consists of Chinese and English data, with a small amount of Japanese and Korean data.
25
+ - **Stronger Performance**: BlueLM-7B-Chat achieves a strong competitive performance in C-Eval and CMMLU benchmarks of the same size.
26
+ - **Longer Context**: We have extended the context length of both BlueLM-7B-Base-32K and BlueLM-7B-Chat-32K models from 2K to 32K. The models can support longer context understanding while maintaining the same basic capabilities.
27
+ - **Model License**: BlueLM weights are open for academic research and commercial use.
28
+
29
+ 本次发布基座模型下载链接见:
30
+
31
+ The release versions and hugging face download links are listed in the table below:
32
+
33
+ | | Base Model | Chat Model | 4bits Quantized Chat Model |
34
+ |:---:|:--------------------:|:--------------------:|:--------------------------:|
35
+ | 7B-2k | [BlueLM-7B-Base](https://huggingface.co/vivo-ai/BlueLM-7B-Base) | [BlueLM-7B-Chat](https://huggingface.co/vivo-ai/BlueLM-7B-Chat) | [BlueLM-7B-Chat-4bits](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-4bits) |
36
+ | 7B-32K | [BlueLM-7B-Base-32K](https://huggingface.co/vivo-ai/BlueLM-7B-Base-32K) | [BlueLM-7B-Chat-32K](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-32K) | - |
37
+
38
+ ## 评测结果/Benchmark Results
39
+
40
+ 为了保证模型评测的一致性,我们采用 [OpenCompass](https://opencompass.org.cn/leaderboard-llm) 进行相关榜单的评测。我们分别在 C-Eval、MMLU、CMMLU、GaoKao、AGIEval、BBH、GSM8K、MATH 和 HumanEval 榜单对 BlueLM 的通用能力、数学能力和代码能力进行了测试。
41
+
42
+ To ensure the consistency of model evaluation, we use [OpenCompass](https://opencompass.org.cn/leaderboard-llm) to evaluate the performance on relevant leaderboards. We conducted extensive tests on C-Eval, MMLU, CMMLU, GaoKao, AGIEval, BBH, GSM8K, MATH and HumanEval datasets across general ability, mathematical ability and coding ability.
43
+
44
+ | Model | **C-Eval** | **MMLU** | **CMMLU** | **Gaokao** | **AGIEval** | **BBH** | **GSM8K** | **MATH** | **HumanEval** |
45
+ |:------------------|:-----------|:---------|:----------|:-----------|:------------|:--------|:----------|:---------|:--------------|
46
+ | | 5-shot | 5-shot | 5-shot | 0-shot | 0-shot | 3-shot | 4-shot | 5-shot | 0-shot |
47
+ | GPT-4 | 69.9 | 86.4 | 71.2 | 72.3 | 55.1 | 86.7 | 91.4 | 45.8 | 74.4 |
48
+ | ChatGPT | 52.5 | 70.0 | 53.9 | 51.1 | 39.9 | 70.1 | 78.2 | 28 | 73.2 |
49
+ | LLaMA2-7B | 32.5 | 45.3 | 31.8 | 18.9 | 21.8 | 38.2 | 16.7 | 3.3 | 12.8 |
50
+ | ChatGLM2-6B(Base) | 51.7 | 47.9 | 50.0 | - | - | 33.7 | 32.4 | 6.5 | - |
51
+ | Baichuan2-7B | 56.3 | 54.7 | 57.0 | 34.8 | 34.6 | 41.8 | 24.6 | 5.4 | 17.7 |
52
+ | BlueLM-7B-Base | 67.5 | 55.2 | 66.6 | 58.9 | 43.4 | 41.7 | 27.2 | 6.2 | 18.3 |
53
+ | BlueLM-7B-Chat | 72.7 | 50.7 | 74.2 | 48.7 | 43.4 | 65.6 | 51.9 | 13.4 | 21.3 |
54
+
55
+ ## 推理部署/Inference and Deployment
56
+
57
+ ```
58
+ git clone https://github.com/vivo-ai-lab/BlueLM
59
+ cd BlueLM/quant_cuda
60
+ python setup_cuda.py install
61
+ ```
62
+
63
+ ```python
64
+ >>> from transformers import AutoTokenizer, AutoModelForCausalLM
65
+ >>> tokenizer = AutoTokenizer.from_pretrained("vivo-ai/BlueLM-7B-Chat-4bits", trust_remote_code=True, use_fast=False)
66
+ >>> model = AutoModelForCausalLM.from_pretrained("vivo-ai/BlueLM-7B-Chat-4bits", device_map="cuda:0", torch_dtype=torch.bfloat16, trust_remote_code=True)
67
+ >>> model = model.eval()
68
+ >>> inputs = tokenizer("[|Human|]:三国演义的作者是谁?[|AI|]:", return_tensors="pt")
69
+ >>> inputs = inputs.to("cuda:0")
70
+ >>> outputs = model.generate(**inputs, max_new_tokens=128)
71
+ >>> print(tokenizer.decode(outputs.cpu()[0], skip_special_tokens=True))
72
+ 三国演义的作者是谁? 《三国演义》是由元末明初小说家罗贯中所著,是中国古典四大名著之一,也是中国古代历史小说发展的巅峰之作。
73
+ ```
74
+
75
+ 更多使用说明,请参考我们的 [Github 仓库](https://github.com/vivo-ai-lab/BlueLM)。
76
+
77
+ For more instructions, please refer to our [Github Repo](https://github.com/vivo-ai-lab/BlueLM).
78
+
79
+ ## 协议/License
80
+
81
+ 社区使用代码依照 [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) 协议开源,且使用 BlueLM 模型权重需要遵循 [vivo_BlueLM模型许可协议](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-4bits/blob/main/MODEL_LICENSE)。
82
+
83
+ Our code is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) and [Community License for BlueLM Model](https://huggingface.co/vivo-ai/BlueLM-7B-Chat-4bits/blob/main/MODEL_LICENSE).