README.md 5.06 KB
Newer Older
chenych's avatar
chenych committed
1
# 模型名称(跟原生模型一致)
chenzk's avatar
v1.0  
chenzk committed
2
## 论文
chenych's avatar
chenych committed
3
[此处填写论文名称](此处填写论文地址链接)
liuhy's avatar
liuhy committed
4

chenych's avatar
chenych committed
5
**如果没有写`暂无`**
chenzk's avatar
v1.0.6  
chenzk committed
6

chenych's avatar
chenych committed
7
8
## 模型简介
简要介绍模型结构,根据论文或者原生模型介绍内容填写,如果有模型结构或者模型算法图则放图,没有则不放。
liuhy's avatar
liuhy committed
9

chenzk's avatar
v1.0.6  
chenzk committed
10
<div align=center>
chenych's avatar
chenych committed
11
    <img src="./doc/xxxx.png"/>
chenzk's avatar
v1.0.6  
chenzk committed
12
13
</div>

chenych's avatar
chenych committed
14
15
16
17
18
19
20
21
22
23
## 环境依赖
- 列举基础环境需求,根据实际情况填写

| 软件 | 版本 |
| :------: | :------: |
| DTK | xxx |
| python | xx |
| transformers | xx |
| vllm | xx |
| paddlepaddle | xx |
chenych's avatar
chenych committed
24
| deepspeed | xx |
chenych's avatar
chenych committed
25

chenych's avatar
chenych committed
26
推荐使用镜像: xxxxxx(镜像地址,如 image.sourcefind.cn:5000/dcu/admin/base/pytorch:2.5.1-ubuntu22.04-dtk25.04.2-py3.10)
chenych's avatar
chenych committed
27
- 挂载地址`-v``{docker_name}``{docker_image_name}`根据实际模型情况修改
liuhy's avatar
liuhy committed
28

chenych's avatar
chenych committed
29
```bash
chenych's avatar
chenych committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
docker run -it \
    --shm-size 60g \
    --network=host \
    --name {docker_name} \
    --privileged \
    --device=/dev/kfd \
    --device=/dev/dri \
    --device=/dev/mkfd \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    -u root \
    -v /opt/hyhal/:/opt/hyhal/:ro \
    -v /path/your_code_data/:/path/your_code_data/ \
    {docker_image_name} bash
chenych's avatar
chenych committed
45

chenych's avatar
chenych committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
示例如下(展示到modelzoo上的内容,就是将上面的{docker_image_name}{docker_name}根据实际模型填写)
docker run -it \
    --shm-size 60g \
    --network=host \
    --name qwen3 \
    --privileged \
    --device=/dev/kfd \
    --device=/dev/dri \
    --device=/dev/mkfd \
    --group-add video \
    --cap-add=SYS_PTRACE \
    --security-opt seccomp=unconfined \
    -u root \
    -v /opt/hyhal/:/opt/hyhal/:ro \
    -v /path/your_code_data/:/path/your_code_data/ \
    image.sourcefind.cn:5000/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk25.04.2-py3.10 bash
chenzk's avatar
v1.0  
chenzk committed
62
```
chenych's avatar
chenych committed
63
更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。
liuhy's avatar
liuhy committed
64

chenych's avatar
chenych committed
65
关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.sourcefind.cn/tool/)开发者社区下载安装,其它包参照requirements.txt安装:
chenzk's avatar
v1.0  
chenzk committed
66
67
68
```
pip install -r requirements.txt
```
chenzk's avatar
chenzk committed
69

chenych's avatar
chenych committed
70
71
## 数据集
[公开数据集名称](公开数据集官网下载地址,过小文件可打包到项目里。)
liuhy's avatar
liuhy committed
72

chenzk's avatar
v1.0  
chenzk committed
73
此处提供数据预处理脚本的使用方法
chenych's avatar
chenych committed
74
```bash
chenzk's avatar
v1.0  
chenzk committed
75
76
python xxx.py
```
chenzk's avatar
v1.0.1  
chenzk committed
77
项目中已提供用于试验训练的迷你数据集,训练数据目录结构如下,用于正常训练的完整数据集请按此目录结构进行制备:
chenzk's avatar
v1.0  
chenzk committed
78
79
```
 ── dataset
chenych's avatar
chenych committed
80
    │   ├── filename_1
chenzk's avatar
v1.0  
chenzk committed
81
82
83
    │             ├── xxx.png
    │             ├── xxx.png
    │             └── ...
chenych's avatar
chenych committed
84
    │   └── filename_2
chenzk's avatar
v1.0  
chenzk committed
85
86
87
88
    │             ├── xxx.png
    │             ├── xxx.png
    │             └── ...
```
chenych's avatar
chenych committed
89
**如果没有数据集,写`暂无`**
chenych's avatar
chenych committed
90

chenzk's avatar
v1.0  
chenzk committed
91
## 训练
chenych's avatar
chenych committed
92
93
94
1. `单机训练``多机训练`方法根据实际情况选择填写即可。
2. 如果没有训练脚本,则写`暂无`,后面`单机训练``多机训练`章节删掉。

chenych's avatar
chenych committed
95
### 单机训练
chenych's avatar
chenych committed
96
97
```bash
sh xxx.sh 或 python xxx.py
chenzk's avatar
v1.0  
chenzk committed
98
```
liuhy's avatar
liuhy committed
99

chenych's avatar
chenych committed
100
### 多机训练
chenych's avatar
chenych committed
101
102
```bash
sh xxx.sh 或 python xxx.py
chenzk's avatar
v1.0  
chenzk committed
103
```
chenych's avatar
chenych committed
104

chenzk's avatar
v1.0  
chenzk committed
105
## 推理
chenych's avatar
chenych committed
106
107
1. 推理框架有`transformers``vllm``SGLang`或者其他推理框架中任意一个即可,至少有一个;
2. `单机推理``多机推理`章节根据模型大小自行选择。
chenych's avatar
chenych committed
108
109
110

### transformers
#### 单机推理
chenych's avatar
chenych committed
111
112
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
113
114
115
```

#### 多机推理
chenych's avatar
chenych committed
116
117
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
118
119
120
121
```

### vllm
#### 单机推理
chenych's avatar
chenych committed
122
123
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
124
125
126
```

#### 多机推理
chenych's avatar
chenych committed
127
128
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
129
130
131
132
```

### SGLang
#### 单机推理
chenych's avatar
chenych committed
133
134
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
135
136
137
```

#### 多机推理
chenych's avatar
chenych committed
138
139
```bash
sh xxx.sh 或 python xxx.py
chenzk's avatar
v1.0  
chenzk committed
140
```
chenych's avatar
chenych committed
141
142
...

chenych's avatar
chenych committed
143
## 效果展示
chenzk's avatar
v1.0.6  
chenzk committed
144
此处填算法效果测试图(包括输入、输出)
liuhy's avatar
liuhy committed
145

chenzk's avatar
v1.0.6  
chenzk committed
146
147
148
<div align=center>
    <img src="./doc/xxx.png"/>
</div>
liuhy's avatar
liuhy committed
149

chenzk's avatar
v1.0.1  
chenzk committed
150
### 精度
liuhy's avatar
liuhy committed
151
152
测试数据:[test data](链接),使用的加速卡:xxx。

chenzk's avatar
v1.0  
chenzk committed
153
根据测试结果情况填写表格:
liuhy's avatar
liuhy committed
154
155
156
157
| xxx | xxx | xxx | xxx | xxx |
| :------: | :------: | :------: | :------: |:------: |
| xxx | xxx | xxx | xxx | xxx  |
| xxx | xx | xxx | xxx | xxx |
chenzk's avatar
v1.0.5  
chenzk committed
158

chenych's avatar
chenych committed
159
160
161
如果资源限制无法做到,至少要保证中英文测试用例DCU输出正常,填写:
`DCU与GPU精度一致,推理框架:XXX(测试使用的推理框架)。`

chenzk's avatar
v1.0  
chenzk committed
162
## 预训练权重
chenych's avatar
chenych committed
163
164
| 模型名称  | 权重大小  | DCU型号  | 最低卡数需求 |下载地址|
|:-----:|:----------:|:----------:|:---------------------:|:----------:|
chenych's avatar
chenych committed
165
| Qwen3 | 4B | K100AI,BW1000,... | 1 | 填写公开预训练权重官网下载地址(必须),使用`[Hugging Face](链接)``[Modelscope](链接)`格式,样例如下[Hugging Face](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507) |
chenych's avatar
chenych committed
166

167
## 源码仓库及问题反馈
chenzk's avatar
v1.0  
chenzk committed
168
- 此处填本项目gitlab地址
chenych's avatar
chenych committed
169

chenzk's avatar
v1.0  
chenzk committed
170
## 参考资料
chenzk's avatar
v1.0.1  
chenzk committed
171
- 此处填源github地址(方便使用者查看原github issue)
chenzk's avatar
v1.0  
chenzk committed
172
173
- 此处填参考项目或教程网址
- ......
chenzk's avatar
chenzk committed
174

chenych's avatar
chenych committed
175
176
177
其他说明:
关于model.properties(必要)、LICENSE(必要)、CONTRIBUTORS、模型图标(必要)等其它信息提供参照:[`ModelZooStd.md`](./ModelZooStd.md)
各个模型需要保留原项目README.md,改名为README_origin.md即可。