Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dcuai
dlexamples
Commits
6a57493a
Commit
6a57493a
authored
Apr 22, 2022
by
panhuiwen
Browse files
Update README.md
parent
aeaee61d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
PyTorch/NLP/gnmt/README.md
PyTorch/NLP/gnmt/README.md
+17
-16
No files found.
PyTorch/NLP/gnmt/README.md
View file @
6a57493a
...
...
@@ -36,20 +36,20 @@ python3 setup.py install
+
下载
[
mosedecoder
](
https://github.com/moses-smt/mosesdecoder
)
工具
+
使用
**mosedecoder**
将
**newstest2016**
等数据集转换为原始txt格式
+
使用
**mosedecoder**
中的
**tokenizer**
分词器将语料进行分词
+
清洗所有语料
(copora)
+
做BPE
+
清洗所有语料
+
做
**
BPE
**
### 2. 数据集预处理
此部分已经整合到
**train.py**
中
### 3. 修改训练脚本
修改训练脚本
**
`
run_fp32_singleCard.sh
`
**
内的参数:
修改训练脚本
**run_fp32_singleCard.sh**
内的参数:
```
GPUS:
使用几张
GPU卡
TRAIN_BATCH_SIZE:批大小
NUMEPOCHS: 代数
TRAIN_SEQ_LEN: 最大句子长度
MATH: 精度
--
GPUS:
GPU卡
数
--
TRAIN_BATCH_SIZE:
批大小
--
NUMEPOCHS:
代数
--
TRAIN_SEQ_LEN:
最大句子长度
--
MATH:
精度
```
### 4. 执行训练
```
...
...
@@ -57,11 +57,12 @@ bash run_fp32_singleCard.sh
```
### 5. 测试结果
| 卡数 | 精度 | bs | 测试结果 | NV卡对比 |
| :---: | :---: | :---: | :---: | :---: |
| 1 | FP32 | 64 | 11650 | |
| 1 | FP32 | 128 | 14220 | 21860 |
| 1 | FP16 | 128 | 11500 | |
| 4 | FP32 | 64 | 8521
*
4 | |
| 4 | FP32 | 128 | 11225
*
4 | 80224 |
| 4 | FP16 | 128 | 10692
*
4 | |
| 卡数 | 精度 | bs | 测试结果 | NV卡对比 | 显存占用 |
|:---:|:---:|:---:|:---:|:---:|:---:|
| 1 | FP32 | 64 | 11332 | | 54% |
| 1 | FP32 | 128 | 14025 | 21860 | 80% |
| 1 | FP16 | 128 | 11404 | | 58% |
| 1 | FP16 | 256 | 13584 | | 97% |
| 4 | FP32 | 64 | 9784
*
4 | | 66% |
| 4 | FP32 | 128 | 12495
*
4 | 80224 | 92% |
| 4 | FP16 | 128 | 10937
*
4 | | 71% |
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment