Baichua 2
目录
更新
[2023.12.29] ??? 我们发布了 Baichua2-13B-Chat v2 版本。其中:
- 大幅提升了模型的综合能力,特别是数学和逻辑推理、复杂指令跟随能力。
模型介绍
- Baichua 2 是百川智能推出的新一代开源大语言模型,采用 2.6 万亿 Tokes 的高质量语料训练。
- Baichua 2 在多个权威的中文、英文和多语言的通用、领域 bechmark 上取得同尺寸最佳的效果。
- 本次发布包含有 7B、13B 的 Base 和 Chat 版本,并提供了 Chat 版本的 4bits 量化。
- 所有版本对学术研究完全开放。同时,开发者通过邮件申请并获得官方商用许可后,即可免费商用,请参考协议章节。
- 欢迎阅读我们的技术报告 Baichua 2: Ope Large-scale Laguage Models 获取更多信息。
本次发布版本和下载链接见下表:
快速开始
import torch
from modelscope import sapshot_dowload, AutoModelForCausalLM, AutoTokeizer,GeeratioCofig
model_dir = sapshot_dowload("baichua-ic/Baichua2-13B-Chat", revisio='v2.0.1')
tokeizer = AutoTokeizer.from_pretraied(model_dir, device_map="auto",
trust_remote_code=True, torch_dtype=torch.float16)
model = AutoModelForCausalLM.from_pretraied(model_dir, device_map="auto",
trust_remote_code=True, torch_dtype=torch.float16)
model.geeratio_cofig = GeeratioCofig.from_pretraied(model_dir)
messages = []
messages.apped({"role": "user", "cotet": "讲解一下“温故而知新”"})
respose = model.chat(tokeizer, messages)
prit(respose)
messages.apped({'role': 'assistat', 'cotet': respose})
messages.apped({"role": "user", "cotet": "背诵一下将进酒"})
respose = model.chat(tokeizer, messages)
prit(respose)
在魔搭社区的免费算力上,也可以通过量化的方式使用13B对话模型
import torch
from modelscope import sapshot_dowload, AutoModelForCausalLM, AutoTokeizer,GeeratioCofig
from trasformers import BitsAdBytesCofig
quatizatio_cofig = BitsAdBytesCofig(
False,
True,
bb_4bit_compute_dtype=torch.bfloat16,
bb_4bit_quat_type='f4',
bb_4bit_use_double_quat=True)
model_dir = sapshot_dowload("baichua-ic/Baichua2-13B-Chat", revisio='v2.0.1')
tokeizer = AutoTokeizer.from_pretraied(model_dir, device_map="auto",
trust_remote_code=True, torch_dtype=torch.float16)
model = AutoModelForCausalLM.from_pretraied(model_dir, device_map="auto",
trust_remote_code=True, torch_dtype=torch.float16,
quatizatio_cofig=quatizatio_cofig)
model.geeratio_cofig = GeeratioCofig.from_pretraied(model_dir)
messages = []
messages.apped({"role": "user", "cotet": "讲解一下“温故而知新”"})
respose = model.chat(tokeizer, messages)
prit(respose)
messages.apped({'role': 'assistat', 'cotet': respose})
messages.apped({"role": "user", "cotet": "背诵一下将进酒"})
respose = model.chat(tokeizer, messages)
prit(respose)
Bechmark 结果
我们在通用、法律、医疗、数学、代码和多语言翻译六个领域的中英文权威数据集上对模型进行了广泛测试,更多详细测评结果可查看GitHub。
7B 模型结果
|
C-Eval |
MMLU |
CMMLU |
Gaokao |
AGIEval |
BBH |
|
5-shot |
5-shot |
5-shot |
5-shot |
5-shot |
3-shot |
GPT-4 |
68.40 |
83.93 |
70.33 |
66.15 |
63.27 |
75.12 |
GPT-3.5 Turbo |
51.10 |
68.54 |
54.06 |
47.07 |
46.13 |
61.59 |
LLaMA-7B |
27.10 |
35.10 |
26.75 |
27.81 |
28.17 |
32.38 |
LLaMA2-7B |
28.90 |
45.73 |
31.38 |
25.97 |
26.53 |
39.16 |
MPT-7B |
27.15 |
27.93 |
26.00 |
26.54 |
24.83 |
35.20 |
Falco-7B |
24.23 |
26.03 |
25.66 |
24.24 |
24.10 |
28.77 |
ChatGLM2-6B |
50.20 |
45.90 |
49.00 |
49.44 |
45.28 |
31.65 |
Baichua-7B |
42.80 |
42.30 |
44.02 |
36.34 |
34.44 |
32.48 |
Baichua2-7B-Base |
54.00 |
54.16 |
57.07 |
47.47 |
42.73 |
41.56 |
13B 模型结果
|
C-Eval |
MMLU |
CMMLU |
Gaokao |
AGIEval |
BBH |
|
5-shot |
5-shot |
5-shot |
5-shot |
5-shot |
3-shot |
GPT-4 |
68.40 |
83.93 |
70.33 |
66.15 |
63.27 |
75.12 |
GPT-3.5 Turbo |
51.10 |
68.54 |
54.06 |
47.07 |
46.13 |
61.59 |
LLaMA-13B |
28.50 |
46.30 |
31.15 |
28.23 |
28.22 |
37.89 |
LLaMA2-13B |
35.80 |
55.09 |
37.99 |
30.83 |
32.29 |
46.98 |
Vicua-13B |
32.80 |
52.00 |
36.28 |
30.11 |
31.55 |
43.04 |
Chiese-Alpaca-Plus-13B |
38.80 |
43.90 |
33.43 |
34.78 |
35.46 |
28.94 |
XVERSE-13B |
53.70 |
55.21 |
58.44 |
44.69 |
42.54 |
38.06 |
Baichua-13B-Base |
52.40 |
51.60 |
55.30 |
49.69 |
43.20 |
43.01 |
Baichua2-13B-Base |
58.10 |
59.17 |
61.97 |
54.33 |
48.17 |
48.78 |
训练过程模型
除了训练了 2.6 万亿 Tokes 的 Baichua2-7B-Base 模型,我们还提供了在此之前的另外 11 个中间过程的模型(分别对应训练了约 0.2 ~ 2.4 万亿 Tokes)供社区研究使用(训练过程checkpoit下载)。下图给出了这些 checkpoits 在 C-Eval、MMLU、CMMLU 三个 bechmark 上的效果变化:

社区与生态
Itel 酷睿 Ultra 平台运行百川大模型
使用酷睿™/至强® 可扩展处理器或配合锐炫™ GPU等进行部署Baichua2-7B-Chat,Baichua2-13B-Chat模型,推荐使用 BigDL-LLM(CPU, GPU)以发挥更好推理性能。
详细支持信息可参考中文操作手册,包括用otebook支持,加载,优化,保存方法等。
Whe deploy o Core™/Xeo® Scalable Processors or with Arc™ GPU, BigDL-LLM (CPU, GPU) is recommeded to take full advatage of better iferece performace.
声明与协议
声明
我们在此声明,我们的开发团队并未基于 Baichua 2 模型开发任何应用,无论是在 iOS、Adroid、网页或任何其他平台。我们强烈呼吁所有使用者,不要利用
Baichua 2 模型进行任何危害国家社会安全或违法的活动。另外,我们也要求使用者不要将 Baichua 2
模型用于未经适当安全审查和备案的互联网服务。我们希望所有的使用者都能遵守这个原则,确保科技的发展能在规范和合法的环境下进行。
我们已经尽我们所能,来确保模型训练过程中使用的数据的合规性。然而,尽管我们已经做出了巨大的努力,但由于模型和数据的复杂性,仍有可能存在一些无法预见的问题。因此,如果由于使用
Baichua 2 开源模型而导致的任何问题,包括但不限于数据安全问题、公共舆论风险,或模型被误导、滥用、传播或不当利用所带来的任何风险和问题,我们将不承担任何责任。
协议
[Email]: mailto:opesource@baichua-ic.com
评论