zhichen commited on
Commit
fd80146
1 Parent(s): da879af

add readme

Browse files
Files changed (4) hide show
  1. README.md +154 -3
  2. README_CN.md +154 -0
  3. images/logo.png +0 -0
  4. images/vllm_web_demo.png +0 -0
README.md CHANGED
@@ -1,3 +1,154 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="left">
2
+ 中文</a>&nbsp | &nbsp<a href="README.md">English</a>
3
+ </p>
4
+ <br><br>
5
+
6
+ <p align="center">
7
+ <a href='https://huggingface.co/spaces/zhichen'>
8
+ <img src='./images/logo.png'>
9
+ </a>
10
+ </p>
11
+
12
+ <div align="center">
13
+ <p align="center">
14
+ <h3> Llama3-Chinese </h3>
15
+
16
+ <p align="center">
17
+ <a href='https://huggingface.co/zhichen'>
18
+ <img src='https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Llama3%20Chinese-yellow'>
19
+ </a>
20
+ <a href='https://modelscope.cn/profile/seanzhang'>
21
+ <img src='https://img.shields.io/badge/🤖 ModelScope-Llama3%20Chinese-blue'>
22
+ </a>
23
+ <br>
24
+ <a href=href="https://github.com/seanzhang-zhichen/llama3-chinese/stargazers">
25
+ <img src="https://img.shields.io/github/stars/seanzhang-zhichen/llama3-chinese?color=ccf">
26
+ </a>
27
+ <a href="https://github.com/seanzhang-zhichen/llama3-chinese/blob/main/LICENSE">
28
+ <img alt="GitHub Contributors" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" />
29
+ </a>
30
+ </p>
31
+ </div>
32
+
33
+
34
+ ## 介绍
35
+
36
+ **Llama3-Chinese**是**以Meta-Llama-3-8B为底座**,使用 [DORA](https://arxiv.org/pdf/2402.09353.pdf) + [LORA+](https://arxiv.org/pdf/2402.12354.pdf) 的训练方法,在50w高质量中文多轮SFT数据 + 10w英文多轮SFT数据 + 2000单轮自我认知数据训练而来的大模型。
37
+
38
+ **Github:** [https://github.com/seanzhang-zhichen/llama3-chinese](https://github.com/seanzhang-zhichen/llama3-chinese)
39
+
40
+ ![DEMO](./images/vllm_web_demo.png)
41
+
42
+
43
+ ## 模型下载
44
+
45
+ | Model | Download |
46
+ |:-------------------:|:-----------:|
47
+ | Meta-Llama-3-8B |[ 🤗 HuggingFace](https://huggingface.co/meta-llama/Meta-Llama-3-8B) [ 🤖 ModelScope](https://modelscope.cn/models/LLM-Research/Meta-Llama-3-8B)|
48
+ | Llama3-Chinese-Lora |[ 🤗 HuggingFace](https://huggingface.co/zhichen/Llama3-Chinese-Lora) [ 🤖 ModelScope](https://modelscope.cn/models/seanzhang/Llama3-Chinese-Lora)|
49
+ | Llama3-Chinese (合并好的模型) |[ 🤗 HuggingFace](https://huggingface.co/zhichen/Llama3-Chinese) [ 🤖 ModelScope](https://modelscope.cn/models/seanzhang/Llama3-Chinese)|
50
+
51
+
52
+
53
+ ## 合并LORA模型(可跳过)
54
+
55
+ 1、下载 [Meta-Llama-3-8B](https://modelscope.cn/models/LLM-Research/Meta-Llama-3-8B)
56
+
57
+ ```bash
58
+ git clone https://www.modelscope.cn/LLM-Research/Meta-Llama-3-8B.git
59
+ ```
60
+
61
+ 2、下载[Llama3-Chinese-Lora](https://www.modelscope.cn/models/seanzhang/Llama3-Chinese-Lora)
62
+
63
+ **From ModelScope**
64
+ ```bash
65
+ git lfs install
66
+ git clone https://www.modelscope.cn/seanzhang/Llama3-Chinese-Lora.git
67
+ ```
68
+
69
+ **From HuggingFace**
70
+ ```bash
71
+ git lfs install
72
+ git clone https://huggingface.co/zhichen/Llama3-Chinese-Lora
73
+ ```
74
+
75
+ 3、合并模型
76
+
77
+ ```bash
78
+ python merge_lora.py \
79
+ --base_model path/to/Meta-Llama-3-8B \
80
+ --lora_model path/to/lora/Llama3-Chinese-Lora \
81
+ --output_dir ./Llama3-Chinese
82
+ ```
83
+
84
+ ## 下载 Llama3-Chinese(合并好的模型)
85
+
86
+ **From ModelScope**
87
+ ```bash
88
+ git lfs install
89
+ git clone https://www.modelscope.cn/seanzhang/Llama3-Chinese.git
90
+ ```
91
+
92
+ **From HuggingFace**
93
+ ```bash
94
+ git lfs install
95
+ git clone https://huggingface.co/zhichen/Llama3-Chinese
96
+ ```
97
+
98
+
99
+
100
+
101
+ ## vllm web 推理
102
+
103
+ 1、使用[vllm](https://github.com/vllm-project/vllm)部署模型
104
+
105
+ ```bash
106
+ python -m vllm.entrypoints.openai.api_server --served-model-name Llama3-Chinese --model ./Llama3-Chinese(换成你自己的合并后的模型路径)
107
+ ```
108
+
109
+ 2、在命令行执行
110
+
111
+ ```bash
112
+ python vllm_web_demo.py --model Llama3-Chinese
113
+ ```
114
+
115
+
116
+
117
+
118
+ ## 训练数据集
119
+
120
+ [匠数科技大模型sft数据集](https://modelscope.cn/datasets/deepctrl/deepctrl-sft-data)
121
+
122
+
123
+ ## LICENSE
124
+
125
+ 本项目仅可应用于研究目的,项目开发者不承担任何因使用本项目(包含但不限于数据、模型、代码等)导致的危害或损失。详细请参考[免责声明](https://github.com/seanzhang-zhichen/Llama3-Chinese/blob/main/DISCLAIMER)。
126
+
127
+ Llama3-Chinese项目代码的授权协议为 [The Apache License 2.0](./LICENSE),代码可免费用做商业用途,模型权重和数据只能用于研究目的。请在产品说明中附加Llama3-Chinese的链接和授权协议。
128
+
129
+ ## Citation
130
+
131
+ 如果你在研究中使用了Llama3-Chinese,请按如下格式引用:
132
+
133
+ ```latex
134
+ @misc{Llama3-Chinese,
135
+ title={Llama3-Chinese},
136
+ author={Zhichen Zhang},
137
+ year={2024},
138
+ howpublished={\url{https://github.com/seanzhang-zhichen/llama3-chinese}},
139
+ }
140
+ ```
141
+
142
+
143
+ ## Acknowledgement
144
+
145
+ [meta-llama/llama3](https://github.com/meta-llama/llama3)
146
+ <br>
147
+ [hiyouga/LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)
148
+
149
+
150
+
151
+ ## Star History
152
+
153
+ [![Star History Chart](https://api.star-history.com/svg?repos=seanzhang-zhichen/Llama3-Chinese&type=Date)](https://star-history.com/#seanzhang-zhichen/Llama3-Chinese&Date)
154
+
README_CN.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="left">
2
+ 中文</a>&nbsp | &nbsp<a href="README.md">English</a>
3
+ </p>
4
+ <br><br>
5
+
6
+ <p align="center">
7
+ <a href='https://huggingface.co/spaces/zhichen'>
8
+ <img src='./images/logo.png'>
9
+ </a>
10
+ </p>
11
+
12
+ <div align="center">
13
+ <p align="center">
14
+ <h3> Llama3-Chinese </h3>
15
+
16
+ <p align="center">
17
+ <a href='https://huggingface.co/zhichen'>
18
+ <img src='https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Llama3%20Chinese-yellow'>
19
+ </a>
20
+ <a href='https://modelscope.cn/profile/seanzhang'>
21
+ <img src='https://img.shields.io/badge/🤖 ModelScope-Llama3%20Chinese-blue'>
22
+ </a>
23
+ <br>
24
+ <a href=href="https://github.com/seanzhang-zhichen/llama3-chinese/stargazers">
25
+ <img src="https://img.shields.io/github/stars/seanzhang-zhichen/llama3-chinese?color=ccf">
26
+ </a>
27
+ <a href="https://github.com/seanzhang-zhichen/llama3-chinese/blob/main/LICENSE">
28
+ <img alt="GitHub Contributors" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" />
29
+ </a>
30
+ </p>
31
+ </div>
32
+
33
+
34
+ ## 介绍
35
+
36
+ **Llama3-Chinese**是**以Meta-Llama-3-8B为底座**,使用 [DORA](https://arxiv.org/pdf/2402.09353.pdf) + [LORA+](https://arxiv.org/pdf/2402.12354.pdf) 的训练方法,在50w高质量中文多轮SFT数据 + 10w英文多轮SFT数据 + 2000单轮自我认知数据训练而来的大模型。
37
+
38
+ **Github:** [https://github.com/seanzhang-zhichen/llama3-chinese](https://github.com/seanzhang-zhichen/llama3-chinese)
39
+
40
+ ![DEMO](./images/vllm_web_demo.png)
41
+
42
+
43
+ ## 模型下载
44
+
45
+ | Model | Download |
46
+ |:-------------------:|:-----------:|
47
+ | Meta-Llama-3-8B |[ 🤗 HuggingFace](https://huggingface.co/meta-llama/Meta-Llama-3-8B) [ 🤖 ModelScope](https://modelscope.cn/models/LLM-Research/Meta-Llama-3-8B)|
48
+ | Llama3-Chinese-Lora |[ 🤗 HuggingFace](https://huggingface.co/zhichen/Llama3-Chinese-Lora) [ 🤖 ModelScope](https://modelscope.cn/models/seanzhang/Llama3-Chinese-Lora)|
49
+ | Llama3-Chinese (合并好的模型) |[ 🤗 HuggingFace](https://huggingface.co/zhichen/Llama3-Chinese) [ 🤖 ModelScope](https://modelscope.cn/models/seanzhang/Llama3-Chinese)|
50
+
51
+
52
+
53
+ ## 合并LORA模型(可跳过)
54
+
55
+ 1、下载 [Meta-Llama-3-8B](https://modelscope.cn/models/LLM-Research/Meta-Llama-3-8B)
56
+
57
+ ```bash
58
+ git clone https://www.modelscope.cn/LLM-Research/Meta-Llama-3-8B.git
59
+ ```
60
+
61
+ 2、下载[Llama3-Chinese-Lora](https://www.modelscope.cn/models/seanzhang/Llama3-Chinese-Lora)
62
+
63
+ **From ModelScope**
64
+ ```bash
65
+ git lfs install
66
+ git clone https://www.modelscope.cn/seanzhang/Llama3-Chinese-Lora.git
67
+ ```
68
+
69
+ **From HuggingFace**
70
+ ```bash
71
+ git lfs install
72
+ git clone https://huggingface.co/zhichen/Llama3-Chinese-Lora
73
+ ```
74
+
75
+ 3、合并模型
76
+
77
+ ```bash
78
+ python merge_lora.py \
79
+ --base_model path/to/Meta-Llama-3-8B \
80
+ --lora_model path/to/lora/Llama3-Chinese-Lora \
81
+ --output_dir ./Llama3-Chinese
82
+ ```
83
+
84
+ ## 下载 Llama3-Chinese(合并好的模型)
85
+
86
+ **From ModelScope**
87
+ ```bash
88
+ git lfs install
89
+ git clone https://www.modelscope.cn/seanzhang/Llama3-Chinese.git
90
+ ```
91
+
92
+ **From HuggingFace**
93
+ ```bash
94
+ git lfs install
95
+ git clone https://huggingface.co/zhichen/Llama3-Chinese
96
+ ```
97
+
98
+
99
+
100
+
101
+ ## vllm web 推理
102
+
103
+ 1、使用[vllm](https://github.com/vllm-project/vllm)部署模型
104
+
105
+ ```bash
106
+ python -m vllm.entrypoints.openai.api_server --served-model-name Llama3-Chinese --model ./Llama3-Chinese(换成你自己的合并后的模型路径)
107
+ ```
108
+
109
+ 2、在命令行执行
110
+
111
+ ```bash
112
+ python vllm_web_demo.py --model Llama3-Chinese
113
+ ```
114
+
115
+
116
+
117
+
118
+ ## 训练数据集
119
+
120
+ [匠数科技大模型sft数据集](https://modelscope.cn/datasets/deepctrl/deepctrl-sft-data)
121
+
122
+
123
+ ## LICENSE
124
+
125
+ 本项目仅可应用于研究目的,项目开发者不承担任何因使用本项目(包含但不限于数据、模型、代码等)导致的危害或损失。详细请参考[免责声明](https://github.com/seanzhang-zhichen/Llama3-Chinese/blob/main/DISCLAIMER)。
126
+
127
+ Llama3-Chinese项目代码的授权协议为 [The Apache License 2.0](./LICENSE),代码可免费用做商业用途,模型权重和数据只能用于研究目的。请在产品说明中附加Llama3-Chinese的链接和授权协议。
128
+
129
+ ## Citation
130
+
131
+ 如果你在研究中使用了Llama3-Chinese,请按如下格式引用:
132
+
133
+ ```latex
134
+ @misc{Llama3-Chinese,
135
+ title={Llama3-Chinese},
136
+ author={Zhichen Zhang},
137
+ year={2024},
138
+ howpublished={\url{https://github.com/seanzhang-zhichen/llama3-chinese}},
139
+ }
140
+ ```
141
+
142
+
143
+ ## Acknowledgement
144
+
145
+ [meta-llama/llama3](https://github.com/meta-llama/llama3)
146
+ <br>
147
+ [hiyouga/LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory)
148
+
149
+
150
+
151
+ ## Star History
152
+
153
+ [![Star History Chart](https://api.star-history.com/svg?repos=seanzhang-zhichen/Llama3-Chinese&type=Date)](https://star-history.com/#seanzhang-zhichen/Llama3-Chinese&Date)
154
+
images/logo.png ADDED
images/vllm_web_demo.png ADDED