Update README.md
Browse files
README.md
CHANGED
|
@@ -12,20 +12,24 @@ tags:
|
|
| 12 |
- llama3
|
| 13 |
- chat
|
| 14 |
---
|
| 15 |
-
# llama3-instruct 中文DPO版
|
| 16 |
### 模型介绍
|
| 17 |
像原版instruct一样,喜欢用有趣中文和表情符号回答问题。
|
| 18 |
Github:https://github.com/CrazyBoyM/llama3-Chinese-chat
|
| 19 |
-
|
| 20 |
-
DPO
|
| 21 |
-
特点:偏好中文和emoji表情,且不损伤原instruct版模型能力。实测中文DPO版问答性能体验超过现在市面上任何llama3中文微调版 (微调会破坏llama3原版能力,导致遗忘)
|
| 22 |

|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
### 模型部署
|
| 25 |
-
网页脚本文件:https://github.com/CrazyBoyM/llama3-Chinese-chat/blob/main/deploy/web_streamlit_for_instruct_v2.py
|
|
|
|
| 26 |
```
|
| 27 |
pip install streamlit
|
| 28 |
-
|
|
|
|
| 29 |
```
|
| 30 |
|
| 31 |
### 模型下载
|
|
@@ -37,10 +41,10 @@ pip install modelscope
|
|
| 37 |
```python
|
| 38 |
#SDK模型下载
|
| 39 |
from modelscope import snapshot_download
|
| 40 |
-
model_dir = snapshot_download('
|
| 41 |
```
|
| 42 |
Git下载
|
| 43 |
```
|
| 44 |
#Git模型下载
|
| 45 |
-
git clone https://www.modelscope.cn/
|
| 46 |
-
```
|
|
|
|
| 12 |
- llama3
|
| 13 |
- chat
|
| 14 |
---
|
| 15 |
+
# llama3.1-8b-instruct 中文DPO版
|
| 16 |
### 模型介绍
|
| 17 |
像原版instruct一样,喜欢用有趣中文和表情符号回答问题。
|
| 18 |
Github:https://github.com/CrazyBoyM/llama3-Chinese-chat
|
| 19 |
+
|
| 20 |
+
特点:偏好中文和emoji表情,且不损伤原instruct版模型能力。实测中文DPO版问答性能体验超过现在市面上任何llama3.1中文微调版 (微调会大面积破坏llama3.1原版能力,导致遗忘)
|
|
|
|
| 21 |

|
| 22 |
|
| 23 |
+
### 训练细节
|
| 24 |
+
DPO(beta 0.5) + lora rank128, alpha256 + 打开"lm_head", "input_layernorm", "post_attention_layernorm", "norm"层训练.
|
| 25 |
+
|
| 26 |
### 模型部署
|
| 27 |
+
网页脚本文件:https://github.com/CrazyBoyM/llama3-Chinese-chat/blob/main/deploy/web_streamlit_for_instruct_v2.py
|
| 28 |
+
已经在模型文件夹里内置了一份web.py,可以直接使用。
|
| 29 |
```
|
| 30 |
pip install streamlit
|
| 31 |
+
pip install transformers==4.40.1
|
| 32 |
+
streamlit run web.py ./llama3.1-8b-instruct-dpo-zh
|
| 33 |
```
|
| 34 |
|
| 35 |
### 模型下载
|
|
|
|
| 41 |
```python
|
| 42 |
#SDK模型下载
|
| 43 |
from modelscope import snapshot_download
|
| 44 |
+
model_dir = snapshot_download('shareAI/llama3.1-8b-instruct-dpo-zh')
|
| 45 |
```
|
| 46 |
Git下载
|
| 47 |
```
|
| 48 |
#Git模型下载
|
| 49 |
+
git clone https://www.modelscope.cn/shareAI/llama3.1-8b-instruct-dpo-zh.git
|
| 50 |
+
```
|