first commit
This commit is contained in:
68
README.md
68
README.md
@@ -7,15 +7,16 @@ tasks:
|
||||
|
||||
#model-type:
|
||||
##如 gpt、phi、llama、chatglm、baichuan 等
|
||||
#- gpt
|
||||
- llama
|
||||
|
||||
#domain:
|
||||
##如 nlp、cv、audio、multi-modal
|
||||
#- nlp
|
||||
- nlp
|
||||
|
||||
#language:
|
||||
##语言代码列表 https://help.aliyun.com/document_detail/215387.html?spm=a2c4g.11186623.0.0.9f8d7467kni6Aa
|
||||
#- cn
|
||||
- cn
|
||||
- zh
|
||||
|
||||
#metrics:
|
||||
##如 CIDEr、Blue、ROUGE 等
|
||||
@@ -23,29 +24,54 @@ tasks:
|
||||
|
||||
#tags:
|
||||
##各种自定义,包括 pretrained、fine-tuned、instruction-tuned、RL-tuned 等训练方法和其他
|
||||
#- pretrained
|
||||
- fine-tuned
|
||||
|
||||
#tools:
|
||||
##如 vllm、fastchat、llamacpp、AdaSeq 等
|
||||
#- vllm
|
||||
- vllm
|
||||
|
||||
---
|
||||
### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。
|
||||
#### 您可以通过如下git clone命令,或者ModelScope SDK来下载模型
|
||||
# Unichat-llama3-Chinese-8B
|
||||
|
||||
|
||||
## 介绍
|
||||
* 中国联通AI创新中心发布llama3.1中文指令微调模型,全参数微调
|
||||
* 基础模型 [**Meta-Llama-3.1-8B-Instruct**](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct)
|
||||
|
||||
|
||||
### 📊 数据
|
||||
- 高质量指令数据,覆盖多个领域和行业,为模型训练提供充足的数据支持
|
||||
- 微调指令数据经过严格的人工筛查,保证优质的指令数据用于模型微调
|
||||
|
||||
|
||||
SDK下载
|
||||
```bash
|
||||
#安装ModelScope
|
||||
pip install modelscope
|
||||
```
|
||||
```python
|
||||
#SDK模型下载
|
||||
from modelscope import snapshot_download
|
||||
model_dir = snapshot_download('UnicomAI/Unichat-llama3.1-Chinese-8B')
|
||||
```
|
||||
Git下载
|
||||
```
|
||||
#Git模型下载
|
||||
git clone https://www.modelscope.cn/UnicomAI/Unichat-llama3.1-Chinese-8B.git
|
||||
import transformers
|
||||
import torch
|
||||
|
||||
model_id = "UnicomAI/Unichat-llama3.1-Chinese-8B"
|
||||
|
||||
pipeline = transformers.pipeline(
|
||||
"text-generation",
|
||||
model=model_id,
|
||||
model_kwargs={"torch_dtype": torch.bfloat16},
|
||||
device_map="auto",
|
||||
)
|
||||
|
||||
messages = [
|
||||
{"role": "system", "content": "You are a helpful assistant"},
|
||||
{"role": "user", "content": "你是谁?"},
|
||||
]
|
||||
|
||||
outputs = pipeline(
|
||||
messages,
|
||||
max_new_tokens=1024,
|
||||
do_sample=False,
|
||||
repetition_penalty=1.1,
|
||||
)
|
||||
print(outputs[0]["generated_text"][-1])
|
||||
```
|
||||
|
||||
<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>
|
||||
## 资源
|
||||
更多模型,数据集和训练相关细节请参考:
|
||||
* Github:[**Unichat-llama3-Chinese**](https://github.com/UnicomAI/Unichat-llama3-Chinese)
|
||||
|
||||
Reference in New Issue
Block a user