Skip to content

Commit 9c23f63

Browse files
committed
Release new version
1 parent 15cfc5c commit 9c23f63

File tree

4 files changed

+198
-204
lines changed

4 files changed

+198
-204
lines changed

MODEL_LICENSE.pdf

-9.08 KB
Binary file not shown.

README.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</div>
66

77
<p align="center">
8-
<a href="https://huggingface.co/xverse/XVERSE-13B">🤗 XVERSE-13B</a>&nbsp|&nbsp<a href="https://huggingface.co/xverse/XVERSE-13B-Chat">🤗 XVERSE-13B-Chat</a>&nbsp|&nbsp
9-
<a href="https://modelscope.cn/organization/xverse" rel="nofollow"><img src="resources/modelscope.png" width="20px" style="max-width: 100%;"> ModelScope</a>&nbsp|&nbsp
8+
<a href="https://huggingface.co/xverse">🤗 Hugging Face</a>&nbsp|
9+
<a href="https://modelscope.cn/organization/xverse" rel="nofollow"><img src="resources/modelscope.png" width="20px" style="max-width: 100%;"> ModelScope</a>&nbsp|
1010
<a href="resources/wechat.png">💬 微信社区</a>
1111
</p>
1212

@@ -19,84 +19,42 @@
1919
</h4>
2020

2121
## 更新信息
22-
**[2023/09/26]** 发布 7B 尺寸的 [XVERSE-7B](https://github.com/xverse-ai/XVERSE-7B) 底座模型和 [XVERSE-7B-Chat](https://github.com/xverse-ai/XVERSE-7B) 对话模型,支持在单张消费级显卡部署运行,并保持高性能、全开源、免费可商用。
23-
**[2023/08/22]** 发布经过指令精调的 XVERSE-13B-Chat 对话模型。
22+
**[2023/11/06]** 发布新版本的 **XVERSE-13B-2** 底座模型和 **XVERSE-13B-Chat-2** 对话模型,相较于原始版本,新版本的模型训练更加充分(从 1.4T 增加到 3.2T),各方面的能力均得到大幅提升,同时新增工具调用能力。
23+
**[2023/09/26]** 发布 7B 尺寸的 [XVERSE-7B](https://github.com/xverse-ai/XVERSE-7B) 底座模型和 [XVERSE-7B-Chat](https://github.com/xverse-ai/XVERSE-7B) 对话模型,支持在单张消费级显卡部署运行,并保持高性能、全开源、免费可商用。
24+
**[2023/08/22]** 发布经过指令精调的 XVERSE-13B-Chat 对话模型。
25+
**[2023/08/07]** 发布 13B 尺寸的 XVERSE-13B 底座模型。
2426

2527
## 模型介绍
2628

2729
**XVERSE-13B** 是由深圳元象科技自主研发的支持多语言的大语言模型(Large Language Model),主要特点如下:
2830

2931
- **模型结构**:XVERSE-13B 使用主流 Decoder-only 的标准 Transformer 网络结构,支持 8K 的上下文长度(Context Length),为同尺寸模型中最长,能满足更长的多轮对话、知识问答与摘要等需求,模型应用场景更广泛。
30-
- **训练数据**:构建了 1.4 万亿 token 的高质量、多样化的数据对模型进行充分训练,包含中、英、俄、西等 40 多种语言,通过精细化设置不同类型数据的采样比例,使得中英两种语言表现优异,也能兼顾其他语言效果。
31-
- **分词**:基于 BPE(Byte-Pair Encoding)算法,使用上百 GB 语料训练了一个词表大小为 100,278 的分词器,能够同时支持多语言,而无需额外扩展词表。
32+
- **训练数据**:构建了 3.2 万亿 token 的高质量、多样化的数据对模型进行充分训练,包含中、英、俄、西等 40 多种语言,通过精细化设置不同类型数据的采样比例,使得中英两种语言表现优异,也能兼顾其他语言效果。
33+
- **分词**:基于 BPE(Byte-Pair Encoding)算法,使用上百 GB 语料训练了一个词表大小为 100,534 的分词器,能够同时支持多语言,而无需额外扩展词表。
3234
- **训练框架**:自主研发多项关键技术,包括高效算子、显存优化、并行调度策略、数据-计算-通信重叠、平台和框架协同等,让训练效率更高,模型稳定性强,在千卡集群上的峰值算力利用率可达到 58.5%,位居业界前列。
3335

3436
## 评测结果
3537

36-
为验证模型的各项能力,我们选取了多个学科综合能力评测集,包括 [MMLU](https://arxiv.org/abs/2009.03300)(英文)、 [C-Eval](https://cevalbenchmark.com/)(中文)、[AGIEval](https://arxiv.org/abs/2304.06364)(中英) 、[GAOKAO-Bench](https://github.com/OpenLMLab/GAOKAO-Bench)(中英)、[GAOKAO-English](https://github.com/ExpressAI/AI-Gaokao)(英文),评测结果如下:
37-
38-
| 模型 | 类型 | MMLU | C-Eval | AGIEval<sup>1</sup> | GAOKAO-Bench<sup>1</sup> | GAOKAO-English<sup>1</sup> |
39-
| :------------------------: | :--------------: | :--------------: | :--------------: | :-----------------: | :----------------------: | :------------------------: |
40-
| Baichuan-13B | 底座 | 51.6<sup>2</sup> | 53.6<sup>3</sup> | 40.5 | 45.9 | 56.9 |
41-
| Baichuan-13B-Chat | 对话 | 52.1<sup>2</sup> | 51.5<sup>2</sup> | 34.6 | 46.7 | 63.8 |
42-
| Chinese-Alpaca-2-13B | 对话 | 53.2 | 41.3 | 36.6 | 38.4 | 65.1 |
43-
| Llama-1-13B | 底座 | 46.9<sup>4</sup> | 28.8 | 27.3 | 26.4 | 38.1 |
44-
| Llama-2-13B | 底座 | 54.8<sup>4</sup> | 35.6 | 33.4 | 35.4 | 60.6 |
45-
| moss-moon-003-base (16B) | 底座 | 24.7 | 33.1<sup>3</sup> | 26.8 | 28.5 | 34.7 |
46-
| moss-moon-003-sft (16B) | 对话 | 25.5 | 33.6 | 27.6 | 28.8 | 29.2 |
47-
| OpenLLaMA-13B | 底座 | 42.4 | 24.7 | 24.0 | 25.6 | 33.3 |
48-
| OPT-13B | 底座 | 25.2 | 25.0 | 24.2 | 24.4 | 31.1 |
49-
| Pythia-12B | 底座 | 25.1 | 26.2 | 25.3 | 25.3 | 26.8 |
50-
| Vicuna-13B-v1.5 | 对话 | 53.5 | 27.9 | 29.7 | 31.6 | 52.9 |
51-
| Ziya-LLaMA-13B-Pretrain-v1| 底座 | 43.9 | 30.2 | 27.2 | 26.4 | 37.6 |
52-
| Ziya-LLaMA-13B-v1.1 | 对话 | 50.6 | 29.3 | 23.6 | 26.7 | 27.3 |
53-
| **XVERSE-13B** | 底座 | **55.1** | **54.7** | **41.4** | **53.9** | **66.5** |
54-
| **XVERSE-13B-Chat** | 对话 | **60.2** | **53.1** | **48.3** | **50.7** | **80.6** |
38+
为了综合评估模型的性能,我们在一系列标准数据集上进行了全面测试,包括C-Eval、CMMLU、Gaokao-Bench、MMLU、GAOKAO-English、AGIEval、RACE-M、CommonSenseQA、PIQA、GSM8K和HumanEval。这些评估覆盖了模型在多个领域的能力,具体包括中文问答、英文问答、语言理解、常识问答、逻辑推理、数学问题解答以及编程能力。评估结果如下:
39+
40+
| 能力维度 | 数据集 | | XVERSE-13B-2 | XVERSE-13B | Baichuan2-13B | Llama1-13B | Llama2-13B |
41+
| :--------: | :------------------------: | :----: | :----------: | :--------: | :-----------: | :--------: | :--------: |
42+
| 中文问答 | C-Eval | 5-shot | 63.5 | 54.7 | 58.1 | 28.8 | 35.6 |
43+
| | CMMLU | 5-shot | 66.2 | 59.1 | 62.0 | 31.5 | 38.4 |
44+
| | Gaokao-Bench<sup>1</sup> | 5-shot | 67.5 | 53.9 | 54.3 | 26.4 | 35.4 |
45+
| 英文问答 | MMLU | 5-shot | 61.2 | 55.1 | 59.2 | 46.9 | 54.8 |
46+
| | GAOKAO-English<sup>1</sup> | 5-shot | 73.7 | 66.5 | 67.7 | 38.1 | 60.6 |
47+
| 中英文问答 | AGIEval<sup>1</sup> | 5-shot | 54.5 | 41.4 | 48.2 | 27.3 | 33.4 |
48+
| 语言理解 | RACE-M | 0-shot | 84.6 | 74.2 | 68.9 | 61.6 | 63.0 |
49+
| 常识问答 | CommonSenseQA | 7-shot | 74.0 | 69.5 | 65.6 | 62.0 | 67.3 |
50+
| 推理 | PIQA | 0-shot | 80.8 | 79.0 | 78.5 | 80.1 | 80.5 |
51+
| 数学 | GSM8K | 4-shot | 54.9 | 18.4 | 52.7 | 17.8 | 28.7 |
52+
| 代码 | HumanEval | 0-shot | 39.6 | 15.9 | 17.1 | 15.8 | 18.3 |
5553

5654
> <sup>1:只针对其中的单项选择题进行测试,即排除了填空题、开放性问题和多项选择题</sup>
57-
> <sup>2:来源于 [Baichuan-13B](https://github.com/baichuan-inc/Baichuan-13B) 的汇报结果</sup>
58-
> <sup>3:来源于 [C-Eval](https://cevalbenchmark.com/) 的汇报结果</sup>
59-
> <sup>4:来源于[Llama 2 论文](https://arxiv.org/abs/2307.09288)的汇报结果</sup>
60-
>
61-
> 对于 MMLU ,我们采用作者提供的[评测工具](https://github.com/hendrycks/test),C-Eval、AGIEval、GAOKAO-Bench、GAOKAO-English 与 MMLU 的评测方式相同,且统一采用 **5-shot** 构造测试样本。
62-
63-
### MMLU 各类别指标
64-
| 模型 | 类型 | Average | STEM | Social Science | Humanities | Others |
65-
| :------------------------: | :------------------------: | :------: | :------: | :------------: | :--------: | :------: |
66-
| Baichuan-13B | 底座 | 51.6 | 41.6 | 60.9 | 47.4 | 58.5 |
67-
| Baichuan-13B-Chat | 对话 | 52.1 | 40.9 | 60.9 | 48.8 | 59.0 |
68-
| Chinese-Alpaca-2-13B | 对话 | 53.2 | 41.8 | 61.2 | 51.3 | 59.2 |
69-
| Llama-1-13B | 底座 | 46.9 | 35.8 | 53.8 | 45.0 | 53.3 |
70-
| Llama-2-13B | 底座 | 54.8 | 44.1 | 62.6 | 52.8 | 61.1 |
71-
| moss-moon-003-base (16B) | 底座 | 24.7 | 23.0 | 24.0 | 25.2 | 26.3 |
72-
| moss-moon-003-sft (16B) | 对话 | 25.5 | 25.9 | 23.8 | 27.1 | 24.4 |
73-
| OpenLLaMA-13B | 底座 | 42.4 | 34.7 | 48.6 | 40.0 | 47.1 |
74-
| OPT-13B | 底座 | 25.2 | 23.9 | 24.1 | 25.9 | 26.3 |
75-
| Pythia-12B | 底座 | 25.1 | 24.8 | 23.0 | 26.1 | 26.0 |
76-
| Vicuna-13B-v1.5 | 对话 | 53.5 | 42.3 | 61.3 | 50.3 | 60.9 |
77-
| Ziya-LLaMA-13B-Pretrain-v1 | 底座 | 43.9 | 36.3 | 48.8 | 41.1 | 50.3 |
78-
| Ziya-LLaMA-13B-v1.1 | 对话 | 50.6 | 40.7 | 57.8 | 48.1 | 56.7 |
79-
| **XVERSE-13B** | 底座 | **55.1** | **44.5** | **64.4** | **50.5** | **62.9** |
80-
| **XVERSE-13B-Chat** | 对话 | **60.2** | **48.1** | **67.7** | **56.4** | **68.0** |
81-
82-
### C-Eval 各类别指标
83-
| 模型 | 类型 | Average | STEM | Social Science | Humanities | Others |
84-
| :------------------------: | :------------------------: | :------: | :------: | :------------: | :--------: | :------: |
85-
| Baichuan-13B | 底座 | 53.6 | 47.0 | 66.8 | 57.3 | 49.8 |
86-
| Baichuan-13B-Chat | 对话 | 51.5 | 43.7 | 64.6 | 56.2 | 49.2 |
87-
| Chinese-Alpaca-2-13B | 对话 | 41.3 | 37.8 | 51.1 | 42.4 | 37.8 |
88-
| Llama-1-13B | 底座 | 28.8 | 27.5 | 33.9 | 27.7 | 27.7 |
89-
| Llama-2-13B | 底座 | 35.6 | 34.5 | 39.8 | 36.2 | 33.2 |
90-
| moss-moon-003-base (16B) | 底座 | 33.1 | 31.6 | 37.0 | 33.4 | 32.1 |
91-
| moss-moon-003-sft (16B) | 对话 | 33.6 | 31.4 | 38.6 | 33.8 | 32.9 |
92-
| OpenLLaMA-13B | 底座 | 24.7 | 25.5 | 23.5 | 24.2 | 24.7 |
93-
| OPT-13B | 底座 | 25.0 | 24.4 | 24.6 | 25.9 | 25.4 |
94-
| Pythia-12B | 底座 | 26.2 | 26.8 | 25.1 | 26.7 | 25.4 |
95-
| Vicuna-13B-v1.5 | 对话 | 27.9 | 25.4 | 33.2 | 29.3 | 26.2 |
96-
| Ziya-LLaMA-13B-Pretrain-v1 | 底座 | 30.2 | 27.8 | 34.3 | 32.0 | 29.0 |
97-
| Ziya-LLaMA-13B-v1.1 | 对话 | 29.3 | 27.5 | 32.8 | 29.7 | 29.0 |
98-
| **XVERSE-13B** | 底座 | **54.7** | **45.6** | **66.2** | **58.3** | **56.9** |
99-
| **XVERSE-13B-Chat** | 对话 | **53.1** | **44.5** | **65.3** | **56.5** | **54.3** |
55+
56+
对于上述所有比较模型,我们优先汇报其官方公布的结果。在缺少官方结果的情况下,我们采用了 [OpenCompass 榜单](https://opencompass.org.cn/leaderboard-llm)的报告结果。其他结果则来自于我们自行执行的评估流程所获得的数据。
57+
对于 MMLU ,我们采用作者提供的[评测工具](https://github.com/hendrycks/test),C-Eval、AGIEval、GAOKAO-Bench、GAOKAO-English 与 MMLU 的评测方式相同,其余评测数据集使用 [OpenCompass 评估框架](https://github.com/open-compass/OpenCompass/)进行评估。
10058

10159
## 使用方法
10260

@@ -332,6 +290,48 @@ XVERSE-13B-Chat:
332290
```
333291
</details>
334292

293+
<details><summary><b>工具调用</b></summary>
294+
295+
```
296+
用户:
297+
你是个大语言模型,有多种能力,可以通过插件集成api来回复用户的问题,还能解答用户使用模型遇到的问题和模型知识相关问答。目前支持的插件信息如下,请自行判断是否需要调用插件来解决当前用户问题。若需要调用插件,则需要将插件调用请求按照json格式给出,必须包含api_name、url、parameters字段,并在其前后使用<|startofthink|>和<|endofthink|>作为标志。然后你需要根据插件API调用结果生成合理的答复;若无需调用插件,则直接给出对应回复即可:
298+
1. {"name": "recommendation", "description": "根据用户历史行为,推荐商品","parameters": [{"name": "user_id", "description": "用户ID"}, {"name": "limit", "description": "返回结果数量"}]}
299+
2. {"name": "touristAttraction", "description": "旅游景点查询API,根据用户指令查询旅游景点相关信息","parameters": [{"name": "city", "description": "指定查询的城市,例如北京、上海、广州", "required": "True"}, {"name": "price", "description": "指定查询的门票价格,例如100元以下、100-200元、200元以上"}]}
300+
3. {"name": "hotel_search", "description": "可以查询多个酒店的信息","parameters": [{"name": "city", "description": "城市名称,比如上海", "required": true}, {"name": "check_in", "description": "入住日期,格式为YYYY-MM-DD,默认为今天", "required": true}, {"name": "check_out", "description": "离店日期,格式为YYYY-MM-DD,默认为明天", "required": true}, {"name": "guests", "description": "旅客人数,包括成人和儿童,默认为1", "required": true}, {"name": "rooms", "description": "预订房间数,默认为1", "required": true}, {"name": "price_min", "description": "最低价格,单位为人民币,可选", "required": false}, {"name": "price_max", "description": "最高价格,单位为人民币,可选", "required": false}, {"name": "rating_min", "description": "最低评分,范围为0到10,可选", "required": false}, {"name": "amenities", "description": "设施和服务,如wifi、停车场、健身房等,可选", "required": false}, {"name": "keywords", "description": "搜索关键字,可选", "required": false}]}
301+
当前时间:2007-03-09 07:02:15
302+
请帮我找一下上海的酒店,入住日期是今天,离店日期是明天,一共两个人,需要一间房间。
303+
304+
XVERSE-13B-Chat:
305+
好的,请问您需要查询哪个价格区间和评分区间的酒店呢?
306+
307+
用户:
308+
价格在300-500之间,评分不低于8分
309+
310+
XVERSE-13B-Chat:
311+
好的,还有其他特殊需求吗?比如设施和服务方面的要求?
312+
313+
用户:
314+
有免费停车场就更好了。
315+
316+
XVERSE-13B-Chat:
317+
好的,我会为您查询符合条件的酒店。请稍等片刻
318+
<|startofthink|>```JSON
319+
{
320+
"api_name": "hotel_search","parameters": {
321+
"city": "上海",
322+
"check_in": "2007-03-09",
323+
"check_out": "2007-03-10",
324+
"guests": 2,
325+
"rooms": 1,
326+
"price_min": 300,
327+
"price_max": 500,
328+
"rating_min": 8,
329+
"amenities": "停车场"
330+
}
331+
}```<|endofthink|>
332+
```
333+
</details>
334+
335335

336336
## 模型量化
337337
我们支持 INT8 和 INT4 类型的量化,可以大幅降低模型加载所需的显存。
@@ -427,5 +427,5 @@ XVERSE-13B 与其他所有 LLM 一样,在某些情况下可能会产生不准
427427

428428
使用本仓库的源码需要遵循 [Apache-2.0](LICENSE) 开源协议,使用 XVERSE-13B 的模型权重则需要遵循[模型许可协议](MODEL_LICENSE.pdf)
429429

430-
XVERSE-13B 模型权重对学术研究**完全开放**,并且支持**免费商用**如需商用请填写《模型许可协议》末尾的**商用申请表**,发送邮件到 <opensource@xverse.cn> 进行申请
430+
XVERSE-13B 模型权重对学术研究**完全开放**,并且支持**免费商用**如需申请商业许可证,请填写【[申请表](https://chat.xverse.cn/home/business.html)】,如有其他问题或合作,请联系 <opensource@xverse.cn>
431431

0 commit comments

Comments
 (0)