File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
examples/model_compression Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Day12 预训练模型小型化与部署实战作业辅导
2
2
3
3
本教程旨在辅导同学如何完成 AI Studio课程——[ 『NLP打卡营』实践课12:预训练模型小型化与部署实战
4
- ] ( https://aistudio.baidu.com/aistudio/projectdetail/1920541 ) 课后作业。
4
+ ] ( https://aistudio.baidu.com/aistudio/projectdetail/2017520 ) 课后作业。
5
5
6
6
## 1. 对ERNIE-Gram进行fine-tuning得到教师模型
7
7
由于我们的蒸馏是在中文情感分析ChnSentiCorp任务上,因此我们需要对PaddleNLP提供的ERNIE-Gram在我们的任务上进行Fine-tuning。下面是详细的步骤:
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ python -u ./run_glue.py \
65
65
--logging_steps 10 \
66
66
--save_steps 10 \
67
67
--output_dir ../model_compression/distill_lstm/pretrained_models/$TASK_NAME / \
68
- --n_gpu 1 \
68
+ --device gpu \
69
69
70
70
```
71
71
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ python -u ./run_glue.py \
54
54
--logging_steps 1 \
55
55
--save_steps 500 \
56
56
--output_dir ./tmp/$TASK_NAME / \
57
- --n_gpu 1 \
57
+ --device gpu \
58
58
59
59
```
60
60
You can’t perform that action at this time.
0 commit comments