Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- llama3
|
| 5 |
+
- chinese
|
| 6 |
---
|
| 7 |
+
|
| 8 |
+
# Llama3-Chinese-8B-Instruct
|
| 9 |
+
|
| 10 |
+
Llama3-Chinese-8B-Instruct基于Llama3-8B中文微调对话模型,由Llama中文社区和AtomEcho(原子回声)联合研发,我们会持续提供更新的模型参数,模型训练过程见(https://llama.family)。
|
| 11 |
+
|
| 12 |
+
模型的部署、训练、微调等方法详见Llama中文社区GitHub仓库:https://github.com/LlamaFamily/Llama-Chinese
|
| 13 |
+
|
| 14 |
+
## 如何使用
|
| 15 |
+
|
| 16 |
+
```
|
| 17 |
+
import transformers
|
| 18 |
+
import torch
|
| 19 |
+
model_id = "FlagAlpha/Llama3-Chinese-8B-Instruct"
|
| 20 |
+
|
| 21 |
+
pipeline = transformers.pipeline(
|
| 22 |
+
"text-generation", model=model_id, model_kwargs={"torch_dtype": torch.bfloat16}, device_map="auto"
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
pipeline("介绍一下机器学习?")
|
| 26 |
+
```
|