77 lines
2.2 KiB
Markdown
77 lines
2.2 KiB
Markdown
---
|
||
frameworks:
|
||
- Pytorch
|
||
license: Apache License 2.0
|
||
tasks:
|
||
- chatbot
|
||
|
||
#model-type:
|
||
##如 gpt、phi、llama、chatglm、baichuan 等
|
||
#- gpt
|
||
|
||
#domain:
|
||
##如 nlp、cv、audio、multi-modal
|
||
#- nlp
|
||
|
||
#language:
|
||
##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa
|
||
#- cn
|
||
|
||
#metrics:
|
||
##如 CIDEr、Blue、ROUGE 等
|
||
#- CIDEr
|
||
|
||
#tags:
|
||
##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他
|
||
#- pretrained
|
||
|
||
#tools:
|
||
##如 vllm、fastchat、llamacpp、AdaSeq 等
|
||
#- vllm
|
||
---
|
||
### 模型介绍
|
||
首个llama3 中文版系列模型,v1版本 2024-04-19 下午1点
|
||
该版本是instruct 中文版 (本系列第3个模型),支持system prompt自定义,基于英文原版instruct增量170k优质中文对话数据进行sft得到
|
||
Github:https://github.com/CrazyBoyM/llama3-Chinese-chat
|
||
|
||
### 模型推理
|
||
首先拉取本模型和Github仓库代码
|
||
```
|
||
git clone https://github.com/CrazyBoyM/llama3-Chinese-chat --depth 1
|
||
git lfs clone https://www.modelscope.cn/baicai003/llama-3-8b-Instruct-chinese_v2.git
|
||
```
|
||
接着
|
||
```
|
||
pip install -U streamlit
|
||
```
|
||
通过以上命令安装streamlit,然后通过下面命令启动网页以便访问,'/path/to/model'需要改成你的权重下载路径。
|
||
V1版本:
|
||
```shell
|
||
cd llama3-Chinese-chat
|
||
streamlit run deploy/web_streamlit_for_v1.py /path/to/model --theme.base="dark"
|
||
```
|
||
|
||
Instruct版本 (支持自定义system prompt)
|
||
```
|
||
cd llama3-Chinese-chat
|
||
streamlit run deploy/web_streamlit_for_instruct.py /path/to/model --theme.base="dark"
|
||
```
|
||
|
||
### 模型下载
|
||
SDK下载
|
||
```bash
|
||
#安装ModelScope
|
||
pip install modelscope
|
||
```
|
||
```python
|
||
#SDK模型下载
|
||
from modelscope import snapshot_download
|
||
model_dir = snapshot_download('baicai003/llama-3-8b-Instruct-chinese_v2')
|
||
```
|
||
Git下载
|
||
```
|
||
#Git模型下载
|
||
git clone https://www.modelscope.cn/baicai003/llama-3-8b-Instruct-chinese_v2.git
|
||
```
|
||
|
||
<p style="color: lightgrey;">如果您是本模型的贡献者,我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>,及时完善模型卡片内容。</p> |