README.md 5.21 KB
Newer Older
chenych's avatar
chenych committed
1
# 模型名称(跟原生模型一致,优先模型系列名,特殊情况可单独以模型某size命名)
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
## 环境依赖
- 列举基础环境需求,根据实际情况填写

| 软件 | 版本 |
| :------: | :------: |
| DTK | xxx |
chenych's avatar
chenych committed
20
21
22
23
24
25
| Python | xx |
| Transformers | xx |
| vLLM | xx |
| SGLang | xx |
| Paddlepaddle | xx |
| DeepSpeed | xx |
chenych's avatar
chenych committed
26

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

chenych's avatar
chenych committed
30
```bash
chenych's avatar
chenych committed
31
docker run -it \
chenych's avatar
chenych committed
32
    --shm-size 256g \
chenych's avatar
chenych committed
33
34
35
36
37
38
39
40
41
42
43
44
45
    --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
46

chenych's avatar
chenych committed
47
48
示例如下(展示到modelzoo上的内容,就是将上面的{docker_image_name}{docker_name}根据实际模型填写)
docker run -it \
chenych's avatar
chenych committed
49
    --shm-size 256g \
chenych's avatar
chenych committed
50
51
52
53
54
55
56
57
58
59
60
61
62
    --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
63
```
chenych's avatar
chenych committed
64
更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。
liuhy's avatar
liuhy committed
65

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

chenzk's avatar
v1.0  
chenzk committed
163
## 预训练权重
chenych's avatar
chenych committed
164
165
> `BW1100`显存不一样,所需卡数不一样,可单列一行写

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

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

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

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