Skip to content

Commit

Permalink
rename fleetx to ppfleetx (#5283)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForFishes authored Sep 16, 2022
1 parent e8efed2 commit 62554fa
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PaddlePaddle Fluid 支持在现代 GPU [#]_ 服务器集群上完成高性能分
data_loader.reset()
另外,可以使用 DALI 库提升数据处理性能。DALI 是 NVIDIA 开发的数据加载库,更多内容请参考 `官网文档 <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html>`_ 。飞桨中如何结合使用 DALI 库请参考 `使用示例 <https://github.com/PaddlePaddle/FleetX/tree/old_develop/deprecated/benchmark/collective/resnet>`_ 。
另外,可以使用 DALI 库提升数据处理性能。DALI 是 NVIDIA 开发的数据加载库,更多内容请参考 `官网文档 <https://docs.nvidia.com/deeplearning/dali/user-guide/docs/index.html>`_ 。飞桨中如何结合使用 DALI 库请参考 `使用示例 <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/deprecated/benchmark/collective/resnet>`_ 。

2、训练策略设置
===========
Expand Down Expand Up @@ -115,7 +115,7 @@ GPU 多机多卡同步训练过程中存在慢 trainer 现象,即每步中训
- Local SGD 的 warmup 步长 :code:`local_sgd_is_warm_steps` 影响最终模型的泛化能力,一般需要等到模型参数稳定之后在进行 Local SGD 训练,经验值可以将学习率第一次下降时的 epoch 作为 warmup 步长,之后再进行 Local SGD 训练。
- Local SGD 步长 :code:`local_sgd_steps` ,一般该值越大,通信次数越少,训练速度越快,但随之而来的时模型精度下降。经验值设置为 2 或者 4。

具体的 Local SGD 的训练代码可以参考:https://github.com/PaddlePaddle/FleetX/tree/old_develop/deprecated/examples/local_sgd/resnet
具体的 Local SGD 的训练代码可以参考:https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/deprecated/examples/local_sgd/resnet


2、使用混合精度训练
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ optimizer = fluid.optimizer.DGCMomentumOptimizer(
learning_rate=0.001, momentum=0.9, rampup_begin_step=0)
optimizer.minimize(cost)
```
在 fleet 中我们提供了[DGC 的示例](https://github.com/PaddlePaddle/FleetX/tree/old_develop/deprecated/examples/dgc_example)。示例中以数字手写体识别为例,将程序移植为分布式版本(注:DGC 亦支持单机多卡),再加上 DGC 优化器。可参照此示例将单机单卡程序迁移到 DGC。在单机单卡迁移到 DGC 过程中,一般需要先对齐多机 Momentum 的精度,再对齐 DGC 的精度。
在 fleet 中我们提供了[DGC 的示例](https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/deprecated/examples/dgc_example)。示例中以数字手写体识别为例,将程序移植为分布式版本(注:DGC 亦支持单机多卡),再加上 DGC 优化器。可参照此示例将单机单卡程序迁移到 DGC。在单机单卡迁移到 DGC 过程中,一般需要先对齐多机 Momentum 的精度,再对齐 DGC 的精度。

## 3. 调参&适用场景
### 3.1 预热调参
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Recompute 原则上适用于所有 Optimizer。

**2. 在 Fleet API 中使用 Recompute**

`Fleet API <https://github.com/PaddlePaddle/FleetX>`_
`Fleet API <https://github.com/PaddlePaddle/PaddleFleetX>`_
是基于 Fluid 的分布式计算高层 API。在 Fleet API 中添加 RecomputeOptimizer
仅需要 2 步:

Expand All @@ -121,7 +121,7 @@ Recompute 原则上适用于所有 Optimizer。
为了帮助您快速地用 Fleet API 使用 Recompute 任务,我们提供了一些例子,
并且给出了这些例子的计算速度、效果和显存节省情况:

- 用 Recompute 做 Bert Fine-tuning: `source <https://github.com/PaddlePaddle/FleetX/tree/old_develop/deprecated/examples/recompute/bert>`_
- 用 Recompute 做 Bert Fine-tuning: `source <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/deprecated/examples/recompute/bert>`_

- 用 Recompute 做目标检测:开发中.

Expand All @@ -136,7 +136,7 @@ Q&A
- **有没有更多 Recompute 的官方例子?**

更多 Recompute 的例子将更新在 `examples <https://github.com/PaddlePaddle/examples/tree/master/community_examples/recompute>`_
和 `Fleet <https://github.com/PaddlePaddle/FleetX>`_ 库下,欢迎关注。
和 `Fleet <https://github.com/PaddlePaddle/PaddleFleetX>`_ 库下,欢迎关注。

- **有没有添加 checkpoints 的建议?**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ In principle, recompute is for all kinds of optimizers in Paddle.

**2. Using Recompute in Fleet API**

`Fleet API <https://github.com/PaddlePaddle/FleetX>`_
`Fleet API <https://github.com/PaddlePaddle/PaddleFleetX>`_
is a high-level API for distributed training in Fluid. Adding
RecomputeOptimizer to Fluid takes two steps:

Expand All @@ -154,7 +154,7 @@ We also post corresponding training speed,
test results and memory usages of these examples for reference.


- Fine-tuning Bert Large model with recomputing: `source <https://github.com/PaddlePaddle/FleetX/tree/old_develop/deprecated/examples/recompute/bert>`_
- Fine-tuning Bert Large model with recomputing: `source <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/deprecated/examples/recompute/bert>`_

- Training object detection models with recomputing:developing.

Expand All @@ -171,7 +171,7 @@ first-computation and recomputation consistent.
- **Are there more official examples of Recompute?**

More examples will be updated at `examples <https://github.com/PaddlePaddle/examples/tree/master/community_examples/recompute>`_
and `Fleet <https://github.com/PaddlePaddle/FleetX>`_ . Feel free to
and `Fleet <https://github.com/PaddlePaddle/PaddleFleetX>`_ . Feel free to
raise issues if you get any problem with these examples.

- **How should I set checkpoints?**
Expand Down
2 changes: 1 addition & 1 deletion docs/faq/distributed_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

##### 问题:怎样了解飞桨分布式 Fleet API 用法?

+ 答复:可查看覆盖高低阶应用的[分布式用户文档](https://github.com/PaddlePaddle/fleetx)[分布式 API 文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distributed/Overview_cn.html)
+ 答复:可查看覆盖高低阶应用的[分布式用户文档](https://github.com/PaddlePaddle/PaddleFleetX)[分布式 API 文档](https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/distributed/Overview_cn.html)

----------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

本节将采用推荐领域非常经典的模型 wide_and_deep 为例,介绍如何使用飞桨分布式完成参数服务器训练任务。

参数服务器训练基于飞桨静态图,为方便用户理解,我们准备了一个 wide_and_deep 模型的单机静态图示例:\ `单机静态图示例 <https://github.com/PaddlePaddle/FleetX/tree/old_develop/eval/rec/wide_and_deep_single_static>`_\。
参数服务器训练基于飞桨静态图,为方便用户理解,我们准备了一个 wide_and_deep 模型的单机静态图示例:\ `单机静态图示例 <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/eval/rec/wide_and_deep_single_static>`_\。

在单机静态图示例基础上,通过 1.2 章节的操作方法,可以将其修改为参数服务器训练示例,本次快速开始的完整示例代码参考:\ `参数服务器完整示例 <https://github.com/PaddlePaddle/FleetX/tree/old_develop/examples/wide_and_deep_dataset>`_\。
在单机静态图示例基础上,通过 1.2 章节的操作方法,可以将其修改为参数服务器训练示例,本次快速开始的完整示例代码参考:\ `参数服务器完整示例 <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/examples/wide_and_deep_dataset>`_\。

同时,我们在 AIStudio 上建立了一个参数服务器快速开始的项目:\ `参数服务器快速开始 <https://aistudio.baidu.com/aistudio/projectdetail/4522337>`_\,用户可以跳转到 AIStudio 上直接运行参数服务器的训练代码。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@
使用 AMP 模式耗时:
共计耗时 = 1.222 sec
上述例子存放在:\ `example/amp/amp_dygraph.py <https://github.com/PaddlePaddle/FleetX/blob/old_develop/examples/amp/amp_dygraph.py>`_\
上述例子存放在:\ `example/amp/amp_dygraph.py <https://github.com/PaddlePaddle/PaddleFleetX/blob/old_develop/examples/amp/amp_dygraph.py>`_\
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ batch size = seq * seq_max_len
python recompute_dygraph.py
recompute 动态图代码:`代码示例 <https://github.com/PaddlePaddle/FleetX/tree/old_develop/examples/recompute>`__。
recompute 动态图代码:`代码示例 <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/examples/recompute>`__。

输出:

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/06_distributed_training/model_parallel_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
optimizer.clear_grad()
print("loss", loss.numpy())
模型并行的动态图代码:`example/model_parallelism/mp_dygraph.py <https://github.com/PaddlePaddle/FleetX/tree/old_develop/examples/model_parallelism>`_。
模型并行的动态图代码:`example/model_parallelism/mp_dygraph.py <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/examples/model_parallelism>`_。


运行方式(需要保证当前机器有两张 gpu):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ model.train_batch(...):这一步主要就是执行 1F1B 的流水线并行方
export CUDA_VISIBLE_DEVICES=0,1
python -m paddle.distributed.launch alexnet_dygraph_pipeline.py # alexnet_dygraph_pipeline.py 是用户运行动态图流水线的 python 文件
基于 AlexNet 的完整的流水线并行动态图代码:`alex <https://github.com/PaddlePaddle/FleetX/tree/old_develop/examples/pipeline>`_。
基于 AlexNet 的完整的流水线并行动态图代码:`alex <https://github.com/PaddlePaddle/PaddleFleetX/tree/old_develop/examples/pipeline>`_。

控制台输出信息如下:

Expand Down

0 comments on commit 62554fa

Please sign in to comment.