README.md 4.99 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
26

推荐使用镜像:
chenych's avatar
chenych committed
27
- 挂载地址`-v``{docker_name}``{docker_image_name}`根据实际模型情况修改
liuhy's avatar
liuhy committed
28

chenych's avatar
chenych committed
29
30
31
32
33
```bash
docker run -it --shm-size 200g --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 /path/your_code_path/:/path/your_code_path/ -v /opt/hyhal/:/opt/hyhal/:ro {docker_image_name} bash

示例如下:
docker run -it --shm-size 200g --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 /path/your_code_path/:/path/your_code_path/ -v /opt/hyhal/:/opt/hyhal/:ro 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
34
```
chenych's avatar
chenych committed
35
更多镜像可前往[光源](https://sourcefind.cn/#/service-list)下载使用。
liuhy's avatar
liuhy committed
36

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

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

chenzk's avatar
v1.0  
chenzk committed
45
此处提供数据预处理脚本的使用方法
chenych's avatar
chenych committed
46
```bash
chenzk's avatar
v1.0  
chenzk committed
47
48
python xxx.py
```
chenzk's avatar
v1.0.1  
chenzk committed
49
项目中已提供用于试验训练的迷你数据集,训练数据目录结构如下,用于正常训练的完整数据集请按此目录结构进行制备:
chenzk's avatar
v1.0  
chenzk committed
50
51
```
 ── dataset
chenych's avatar
chenych committed
52
    │   ├── filename_1
chenzk's avatar
v1.0  
chenzk committed
53
54
55
    │             ├── xxx.png
    │             ├── xxx.png
    │             └── ...
chenych's avatar
chenych committed
56
    │   └── filename_2
chenzk's avatar
v1.0  
chenzk committed
57
58
59
60
    │             ├── xxx.png
    │             ├── xxx.png
    │             └── ...
```
chenych's avatar
chenych committed
61
**如果没有数据集,写`暂无`**
chenych's avatar
chenych committed
62

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

chenych's avatar
chenych committed
67
### 单机训练
chenych's avatar
chenych committed
68
69
```bash
sh xxx.sh 或 python xxx.py
chenzk's avatar
v1.0  
chenzk committed
70
```
liuhy's avatar
liuhy committed
71

chenych's avatar
chenych committed
72
### 多机训练
chenych's avatar
chenych committed
73
74
```bash
sh xxx.sh 或 python xxx.py
chenzk's avatar
v1.0  
chenzk committed
75
```
chenych's avatar
chenych committed
76

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

### transformers
#### 单机推理
chenych's avatar
chenych committed
83
84
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
85
86
87
```

#### 多机推理
chenych's avatar
chenych committed
88
89
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
90
91
92
93
```

### vllm
#### 单机推理
chenych's avatar
chenych committed
94
95
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
96
97
98
```

#### 多机推理
chenych's avatar
chenych committed
99
100
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
101
102
103
104
```

### SGLang
#### 单机推理
chenych's avatar
chenych committed
105
106
```bash
sh xxx.sh 或 python xxx.py
chenych's avatar
chenych committed
107
108
109
```

#### 多机推理
chenych's avatar
chenych committed
110
111
```bash
sh xxx.sh 或 python xxx.py
chenzk's avatar
v1.0  
chenzk committed
112
```
chenych's avatar
chenych committed
113
114
...

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

chenzk's avatar
v1.0.6  
chenzk committed
118
119
120
<div align=center>
    <img src="./doc/xxx.png"/>
</div>
liuhy's avatar
liuhy committed
121

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

chenzk's avatar
v1.0  
chenzk committed
125
根据测试结果情况填写表格:
liuhy's avatar
liuhy committed
126
127
128
129
| xxx | xxx | xxx | xxx | xxx |
| :------: | :------: | :------: | :------: |:------: |
| xxx | xxx | xxx | xxx | xxx  |
| xxx | xx | xxx | xxx | xxx |
chenzk's avatar
v1.0.5  
chenzk committed
130

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

chenych's avatar
chenych committed
134
## 算法类别
chenzk's avatar
v1.0  
chenzk committed
135
`此处填算法类别`
chenych's avatar
chenych committed
136
137
138

- 填写此算法最主要的算法类别,数量为1,**与icon图标名称一致,请勿随意命名**
- 算法类别:3D生成、AI4S、AIGC、COR、代码生成、动作识别、对话问答等,全部类别请查看:https://r0ddbu55vzx.feishu.cn/drive/folder/AgoUfBk5IlYTV1dBz2YcGSYUnDf
chenzk's avatar
v1.0.7  
chenzk committed
139

chenzk's avatar
v1.0  
chenzk committed
140
## 预训练权重
chenych's avatar
chenych committed
141
142
| 模型名称  | 权重大小  | DCU型号  | 最低卡数需求 |下载地址|
|:-----:|:----------:|:----------:|:---------------------:|:----------:|
chenych's avatar
chenych committed
143
| Qwen3 | 4B | K100AI,BW1000,... | 1 | 填写公开预训练权重官网下载地址(必须),使用`[下载地址](链接)`格式,样例如下[下载地址](https://hf-mirror.com/Qwen/Qwen3-4B-Instruct-2507) |
chenych's avatar
chenych committed
144

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

chenzk's avatar
v1.0  
chenzk committed
148
## 参考资料
chenzk's avatar
v1.0.1  
chenzk committed
149
- 此处填源github地址(方便使用者查看原github issue)
chenzk's avatar
v1.0  
chenzk committed
150
151
- 此处填参考项目或教程网址
- ......
chenzk's avatar
chenzk committed
152

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