File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
examples/language_model/gpt-3 Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 44GPT-[ 3] ( https://arxiv.org/pdf/2005.14165.pdf ) 是以[ Transformer] ( https://arxiv.org/abs/1706.03762 ) 为基础的语言生成模型。GPT-3模型的最大参数量可以达到170B,如此大规模参数的模型对于训练使用的深度学习框架是一个巨大的挑战。
55
66本示例主要提供了GPT-3的训练过程,数据准备、预测部署等内容请参见[ GPT] ( ../gpt ) 目录。
7- 本示例包含了GPT-3的[ 静态图] ( ./static ) 和 [ 动态图 ] ( ./dygraph ) 的多级并行训练流程 。
7+ 本示例包含了GPT-3的[ 静态图] ( ./static ) 和动态图的多级并行训练流程 。
88用户可以根据自己的需求,训练GPT-3模型,或者参考本示例,使用模型并行、流水线并行等策略,开发训练其他大模型。
99
1010
@@ -72,12 +72,12 @@ python -u -m paddle.distributed.fleet.launch \
7272- ` warmup_rate ` 学习率warmup参数。
7373- ` grad_clip ` 梯度裁剪范围。
7474- ` logging_freq ` 日志输出间隔。
75- - `eval_freq 模型评估间隔。
75+ - ` eval_freq ` 模型评估间隔。
7676- ` device ` 训练设备。
7777
78- 注
78+ 注:
7979- 一般而言,需要设置 ` mp_degree * sharding_degree * pp_degree * dp_degree ` = 训练机器的总卡数。
80- - 一般而言, ` global_batch_size = micro_batch_size * sharding_degree * dp_degree ` 。用户也可以使用梯度累积的方式增大global_batch_size 。
80+ - 一般而言, ` global_batch_size = micro_batch_size * sharding_degree * dp_degree ` 。用户也可以使用梯度累积的方式增大 ` global_batch_size ` 。
8181
8282### 飞桨 4D 并行简介
8383
@@ -88,8 +88,7 @@ python -u -m paddle.distributed.fleet.launch \
8888- 流水线并行(Pipeline Parallelism)
8989- 纯数据并行(Data Parallelism)
9090
91- 具体内容可以参考稿件 :[ 飞桨分布式训练又推新品,4D混合并行可训千亿级AI模型] ( https://baijiahao.baidu.com/s?id=1697085717806202673 ) 。
91+ 除了上述混合并行策略外,飞桨还支持重计算、offload、混合精度等策略,来减少显存占用、加速训练。更多具体内容可以参考稿件 :[ 飞桨分布式训练又推新品,4D混合并行可训千亿级AI模型] ( https://baijiahao.baidu.com/s?id=1697085717806202673 ) 。
9292
9393### 参考文献
9494- [ Language Models are Few-Shot Learners] ( https://arxiv.org/pdf/2005.14165.pdf )
95- 除了上述混合并行策略外,飞桨还支持重计算、offload、混合精度等策略,来减少显存占用、加速训练。
You can’t perform that action at this time.
0 commit comments