models/xverse-13B/MODEL_LICENSE.pdf ADDED
Binary file (315 kB). View file
 
models/xverse-13B/README.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+
4
+ inference: false
5
+
6
+ ---
7
+
8
+ # XVERSE-13B
9
+
10
+ ## 模型介绍
11
+
12
+ **XVERSE-13B** 是由深圳元象科技自主研发的支持多语言的大语言模型(Large Language Model),主要特点如下:
13
+
14
+ - **模型结构**:XVERSE-13B 使用主流 Decoder-only 的标准 Transformer 网络结构,支持 8K 的上下文长度(Context Length),为同尺寸模型中最长,能满足更长的多轮对话、知识问答与摘要等需求,模型应用场景更广泛。
15
+ - **训练数据**:构建了 1.4 万亿 token 的高质量、多样化的数据对模型进行充分训练,包含中、英、俄、西等 40 多种语言,通过精细化设置不同类型数据的采样比例,使得中英两种语言表现优异,也能兼顾其他语言效果。
16
+ - **分词**:基于 BPE(Byte-Pair Encoding)算法,使用上百 GB 语料训练了一个词表大小为 100,278 的分词器,能够同时支持多语言,而无需额外扩展词表。
17
+ - **训练框架**:自主研发多项关键技术,包括高效算子、显存优化、并行调度策略、数据-计算-通信重叠、平台和框架协同等,让训练效率更高,模型稳定性强,在千卡集群上的峰值算力利用率可达到 58.5%,位居业界前列。
18
+
19
+ ## Model Introduction
20
+
21
+ **XVERSE-13B** is a multilingual large language model, independently developed by Shenzhen Yuanxiang Technology. Its key features are as follows:
22
+
23
+ - **Model Structure**: XVERSE-13B uses the mainstream Decoder-only Transformer network structure, supports 8k context length, the longest one among models of the same size, which can meet the need of longer multi-round dialogues, knowledge question-answering, and summarization. This makes the model more versatile in application scenarios.
24
+ - **Training Data**: The model has been thoroughly trained on a diversified and high-quality dataset consisting of 1.4 trillion of tokens, including more than 40 languages such as Chinese, English, Russian, and Spanish. The sampling ratio of different types of data is finely set, which makes the performance of Chinese and English excellent, and also takes into account the effect of other languages.
25
+ - **Tokenization**: Based on the BPE (Byte-Pair Encoding) algorithm, a tokenizer with a vocabulary size of 100,278 has been trained using hundreds of gigabytes of language data. This tokenizer is capable of supporting multilingual without the need for additional vocabulary expansion.
26
+ - **Training Framework**: Several key technologies have also been independently developed, including efficient operators, memory optimization, parallel scheduling strategies, overlap of data-computation-communication, and synergy between platforms and frameworks. These advancements enhance training efficiency and model stability. With these technologies, the peak computational power utilization rate on a thousand-card cluster can reach 58.5%, ranking at the forefront of the industry.
27
+
28
+ ## 评测结果
29
+
30
+ 为验证模型的各项能力,我们选取了多个学科综合能力评测集,包括 [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)(英文),评测结果如下:
31
+
32
+ | 模型\数据集 | MMLU | C-Eval | AGIEval<sup>1</sup> | GAOKAO-Bench<sup>1</sup> | GAOKAO-English<sup>1</sup> |
33
+ | :------------------------: | :--------------: | :--------------: | :-----------------: | :----------------------: | :------------------------: |
34
+ | Baichuan-13B | 51.6<sup>2</sup> | 53.6<sup>3</sup> | 40.5 | 45.9 | 56.9 |
35
+ | Llama-1-13B | 46.9<sup>4</sup> | 28.8 | 27.3 | 26.4 | 38.1 |
36
+ | Llama-2-13B | 54.8<sup>4</sup> | 35.6 | 33.4 | 35.4 | 60.6 |
37
+ | moss-moon-003-base (16B) | 24.7 | 33.1<sup>3</sup> | 26.8 | 28.5 | 34.7 |
38
+ | OpenLLaMA-13B | 42.4 | 24.7 | 24.0 | 25.6 | 33.3 |
39
+ | OPT-13B | 25.2 | 25.0 | 24.2 | 24.4 | 31.1 |
40
+ | Pythia-12B | 25.1 | 26.2 | 25.3 | 25.3 | 26.8 |
41
+ | Ziya-LLaMA-13B-Pretrain-v1 | 43.9 | 30.2 | 27.2 | 26.4 | 37.6 |
42
+ | **XVERSE-13B** | **55.1** | **54.7** | **41.4** | **53.9** | **66.5** |
43
+
44
+ > <sup>1:只针对其中的单项选择题进行测试,即排除了填空题、开放性问题和多项选择题</sup>
45
+ > <sup>2:来源于 [Baichuan-13B](https://github.com/baichuan-inc/Baichuan-13B) 的汇报结果</sup>
46
+ > <sup>3:来源于 [C-Eval](https://cevalbenchmark.com/) 的汇报结果</sup>
47
+ > <sup>4:来源于[Llama 2 论文](https://arxiv.org/abs/2307.09288)的汇报结果</sup>
48
+ >
49
+ > 对于 MMLU ,我们采用作者提供的[评测工具](https://github.com/hendrycks/test),C-Eval、AGIEval、GAOKAO-Bench、GAOKAO-English 与 MMLU 的评测方式相同,且统一采用 **5-shot** 构造测试样本。
50
+
51
+
52
+ ## Model Evaluation
53
+
54
+ In order to validate the various abilities of the model, we have chosen several comprehensive capability benchmarks across multiple disciplines, including [MMLU](https://arxiv.org/abs/2009.03300) (English), [C-Eval](https://cevalbenchmark.com/) (Chinese), [AGIEval](https://arxiv.org/abs/2304.06364) (Chinese and English), [GAOKAO-Bench](https://github.com/OpenLMLab/GAOKAO-Bench) (Chinese and English), [GAOKAO-English](https://github.com/ExpressAI/AI-Gaokao) (English), the evaluation results are as follows:
55
+
56
+ | Models\Datasets | MMLU | C-Eval | AGIEval<sup>1</sup> | GAOKAO-Bench<sup>1</sup> | GAOKAO-English<sup>1</sup> |
57
+ | :------------------------: | :--------------: | :--------------: | :-----------------: | :----------------------: | :------------------------: |
58
+ | Baichuan-13B | 51.6<sup>2</sup> | 53.6<sup>3</sup> | 40.5 | 45.9 | 56.9 |
59
+ | Llama-1-13B | 46.9<sup>4</sup> | 28.8 | 27.3 | 26.4 | 38.1 |
60
+ | Llama-2-13B | 54.8<sup>4</sup> | 35.6 | 33.4 | 35.4 | 60.6 |
61
+ | moss-moon-003-base (16B) | 24.7 | 33.1<sup>3</sup> | 26.8 | 28.5 | 34.7 |
62
+ | OpenLLaMA-13B | 42.4 | 24.7 | 24.0 | 25.6 | 33.3 |
63
+ | OPT-13B | 25.2 | 25.0 | 24.2 | 24.4 | 31.1 |
64
+ | Pythia-12B | 25.1 | 26.2 | 25.3 | 25.3 | 26.8 |
65
+ | Ziya-LLaMA-13B-Pretrain-v1 | 43.9 | 30.2 | 27.2 | 26.4 | 37.6 |
66
+ | **XVERSE-13B** | **55.1** | **54.7** | **41.4** | **53.9** | **66.5** |
67
+
68
+ > <sup>1: Tests are conducted only on single-answer multiple-choice questions, thus excluding fill-in-the-blanks, open-ended questions, and multiple-answer multiple-choice questions.</sup>
69
+ > <sup>2: Reporting results from [Baichuan-13B](https://github.com/baichuan-inc/Baichuan-13B).</sup>
70
+ > <sup>3: Reporting results from [C-Eval](https://cevalbenchmark.com/).</sup>
71
+ > <sup>4: Reporting results from [Llama 2](https://arxiv.org/abs/2307.09288).</sup>
72
+ >
73
+ > For MMLU, we adopt the [evaluation tools](https://github.com/hendrycks/test) provided by the authors, C-Eval, AGIEval, GAOKAO-Bench, GAOKAO-English are the same as MMLU, and uniformly use **5-shot** to construct the test samples.
74
+
75
+ ### MMLU 各类别指标
76
+
77
+ MMLU Category Results
78
+
79
+ | 模型\类别 | Average | STEM | Social Science | Humanities | Others |
80
+ | :------------------------: | :------: | :------: | :------------: | :--------: | :------: |
81
+ | Baichuan-13B | 51.6 | 41.6 | 60.9 | 47.4 | 58.5 |
82
+ | Llama-1-13B | 46.9 | 35.8 | 53.8 | 45.0 | 53.3 |
83
+ | Llama-2-13B | 54.8 | 44.1 | 62.6 | 52.8 | 61.1 |
84
+ | moss-moon-003-base (16B) | 24.7 | 23.0 | 24.0 | 25.2 | 26.3 |
85
+ | OpenLLaMA-13B | 42.4 | 34.7 | 48.6 | 40.0 | 47.1 |
86
+ | OPT-13B | 25.2 | 23.9 | 24.1 | 25.9 | 26.3 |
87
+ | Pythia-12B | 25.1 | 24.8 | 23.0 | 26.1 | 26.0 |
88
+ | Ziya-LLaMA-13B-Pretrain-v1 | 43.9 | 36.3 | 48.8 | 41.1 | 50.3 |
89
+ | **XVERSE-13B** | **55.1** | **44.5** | **64.4** | **50.5** | **62.9** |
90
+
91
+ ### C-Eval 各类别指标
92
+
93
+ C-Eval Category Results
94
+
95
+ | 模型\类别 | Average | STEM | Social Science | Humanities | Others |
96
+ | :------------------------: | :------: | :------: | :------------: | :--------: | :------: |
97
+ | Baichuan-13B | 53.6 | 47.0 | 66.8 | 57.3 | 49.8 |
98
+ | Llama-1-13B | 28.8 | 27.5 | 33.9 | 27.7 | 27.7 |
99
+ | Llama-2-13B | 35.6 | 34.5 | 39.8 | 36.2 | 33.2 |
100
+ | moss-moon-003-base (16B) | 33.1 | 31.6 | 37.0 | 33.4 | 32.1 |
101
+ | OpenLLaMA-13B | 24.7 | 25.5 | 23.5 | 24.2 | 24.7 |
102
+ | OPT-13B | 25.0 | 24.4 | 24.6 | 25.9 | 25.4 |
103
+ | Pythia-12B | 26.2 | 26.8 | 25.1 | 26.7 | 25.4 |
104
+ | Ziya-LLaMA-13B-Pretrain-v1 | 30.2 | 27.8 | 34.3 | 32.0 | 29.0 |
105
+ | **XVERSE-13B** | **54.7** | **45.6** | **66.2** | **58.3** | **56.9** |
106
+
107
+ ### Loading with Transformers
108
+
109
+ 可通过以下代码加载 XVERSE-13B 模型进行推理:
110
+
111
+ The XVERSE-13B model can be loaded for inference using the following code:
112
+
113
+ ```python
114
+ >>> from transformers import AutoTokenizer, AutoModelForCausalLM
115
+ >>> tokenizer = AutoTokenizer.from_pretrained("xverse/XVERSE-13B")
116
+ >>> model = AutoModelForCausalLM.from_pretrained("xverse/XVERSE-13B", trust_remote_code=True).half().cuda()
117
+ >>> model = model.eval()
118
+ >>> inputs = tokenizer('北京的景点:故宫、天坛、万里长城等。\n深圳的景点:', return_tensors='pt').input_ids
119
+ >>> inputs = inputs.cuda()
120
+ >>> generated_ids = model.generate(inputs, max_new_tokens=64, eos_token_id=tokenizer.eos_token_id, repetition_penalty=1.1)
121
+ >>> print(tokenizer.batch_decode(generated_ids, skip_special_tokens=True))
122
+ ```
123
+
124
+ 更多有关相关细节,包括文本生成demo和环境依赖,请参考我们的[Github](https://github.com/xverse-ai/XVERSE-13B)。
125
+
126
+ For more details, including the demo of text generation and environmental dependencies, please refer to our [Github](https://github.com/xverse-ai/XVERSE-13B).
127
+
128
+
129
+ ## 局限性与免责申明
130
+
131
+ XVERSE-13B 与其他所有 LLM 一样,在某些情况下可能会产生不准确、有偏见或其他令人反感的内容。因此,请谨慎使用模型生成的内容,请勿将生成的有害内容进行传播,在部署任何 XVERSE-13B 的应用之前,开发人员应根据其具体应用对模型进行安全测试和调优。
132
+
133
+ 我们强烈警告不要将 XVERSE-13B 模型用于制造或传播有害信息,或进行任何可能损害公众、国家、社会安全或违反法规的活动。如果使用 XVERSE-13B 模型产生任何问题,无论是数据安全问题、公共舆论风险,还是模型被误解、滥用、传播或不合规使用所引发的任何风险和问题,我们将不承担任何责任。
134
+
135
+ ## Limitations and Disclaimer
136
+
137
+ Like all other Large Language Models (LLMs), XVERSE-13B may produce inaccurate, biased, or otherwise offensive content under certain circumstances. Therefore, please use the content generated by the model with caution and refrain from disseminating harmful content. Before deploying any application of XVERSE-13B, developers should conduct safety tests and optimization of the model according to its specific application.
138
+
139
+ We strongly warn against the use of the XVERSE-13B model for producing or spreading harmful information, or conducting any activities that might harm the public, national, or social security, or violate regulations. We assume no responsibility for any problems arising from the use of the XVERSE-13B model, whether it be data security issues, public opinion risks, or any risks and issues caused by misunderstanding, misuse, dissemination, or non-compliance with the model.
140
+
141
+ ## 模型开源协议
142
+
143
+ 使用本仓库的源码需要遵循 [Apache-2.0](https://github.com/xverse-ai/XVERSE-13B/blob/main/LICENSE) 开源协议,使用 XVERSE-13B 的模型权重则需要遵循[模型许可协议](MODEL_LICENSE.pdf)。
144
+
145
+ XVERSE-13B 模型权重对学术研究**完全开放**,并且支持**免费商用**,商用需申请商业使用授权,可以发送邮件到 <[email protected]> 进行申请。
146
+
147
+ ## Open Source License
148
+
149
+ The use of the source code in this repository must follow the [Apache-2.0](https://github.com/xverse-ai/XVERSE-13B/blob/main/LICENSE) open-source license, while the use of the model weights of XVERSE-13B needs to adhere to the [Model License Agreement](MODEL_LICENSE.pdf).
150
+
151
+ The XVERSE-13B model weights are **fully open** to academic research and support **free commercial use**. Commercial use requires an application for a commercial use license by sending an email to <[email protected]>.
152
+
models/xverse-13B/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff