Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api/paddle/distributed/fleet/DistributedStrategy_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ COPY-FROM: paddle.distributed.fleet.DistributedStrategy.amp_configs
dgc
'''''''''

是否启用深度梯度压缩训练。更多信息请参考[Deep Gradient Compression](https://arxiv.org/abs/1712.01887)。默认值:False
是否启用深度梯度压缩训练。更多信息请参考 `Deep Gradient Compression https://arxiv.org/abs/1712.01887`_ 。默认值:False

**代码示例**

Expand Down Expand Up @@ -267,7 +267,7 @@ COPY-FROM: paddle.distributed.fleet.DistributedStrategy.fp16_allreduce
sharding
'''''''''

是否开启 sharding 策略。sharding 实现了[ZeRO: Memory Optimizations Toward Training Trillion Parameter Models](https://arxiv.org/abs/1910.02054)
是否开启 sharding 策略。sharding 实现了 `ZeRO: Memory Optimizations Toward Training Trillion Parameter Models https://arxiv.org/abs/1910.02054`_
中 ZeRO-DP 类似的功能,其通过将模型的参数和优化器状态在 ranks 间分片来支持更大模型的训练。

目前在混合并行(Hybrid parallelism) 模式下,sharding config 作为混合并行设置的统一入口来设置混合并行相关参数。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

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

FL-PS 训练基于飞桨静态图,在这之前,请用户了解下 NCF 模型的单机静态图训练示例以及本地单机模拟分布式的使用方法:\ `https://github.com/PaddlePaddle/PaddleRec/tree/master/models/recall/ncf`_\。
FL-PS 训练基于飞桨静态图,在这之前,请用户了解下 `NCF 模型的单机静态图训练示例以及本地单机模拟分布式的使用方法 https://github.com/PaddlePaddle/PaddleRec/tree/master/models/recall/ncf`_

在传统 PS 基础上,通过生成异构数据集、开启中心调度功能(Coordinator)进行 Client 选择、自定义配置 Client 端私有稀疏参数和 Server 端公共稀疏参数等手段,提升 FL-PS 的训练精度和效率。

更多使用细节请阅读 \FL-PS 帮助文档:`https://github.com/PaddlePaddle/PaddleRec/blob/master/models/recall/ncf/fl_ps_help.md`_\.
更多使用细节请阅读 `FL-PS 帮助文档 https://github.com/PaddlePaddle/PaddleRec/blob/master/models/recall/ncf/fl_ps_help.md`_

本功能依赖 PaddlePaddle2.4 及以上版本的飞桨开源框架,或者用户从 PaddlePaddle develop 分支进行源码编译。

Expand All @@ -33,13 +33,13 @@ FL-PS 训练主要包括如下几个部分:
3. 加载模型
4. 开始训练

用户可从 FL-PS 训练脚本 `https://github.com/PaddlePaddle/PaddleRec/blob/master/tools/static_fl_trainer.py` 入手梳理详细流程。
用户可从 `FL-PS 训练脚本 https://github.com/PaddlePaddle/PaddleRec/blob/master/tools/static_fl_trainer.py`_ 入手梳理详细流程。

1.2.1 准备样本
""""""""""""

* 在 PaddleRec/datasets/movielens_pinterest_NCF 目录中执行: sh run.sh,获取初步处理过的训练数据(big_train)和测试数据(test_data)
* 从 MovieLens 官网 `https://grouplens.org/datasets/movielens/1m/` 下载 ml-1m 数据集,获取 users.dat 文件(可自定义存储路径,但需要和 gen_heter_data.py 脚本中路径保持一致),后续用于构造异构数据集(按 zipcode 的首位数字划分)
* 从 `MovieLens 官网 https://grouplens.org/datasets/movielens/1m/`_ 下载 ml-1m 数据集,获取 users.dat 文件(可自定义存储路径,但需要和 gen_heter_data.py 脚本中路径保持一致),后续用于构造异构数据集(按 zipcode 的首位数字划分)
* 在 PaddleRec/datasets/movielens_pinterest_NCF/fl_data 中新建目录 fl_test_data 和 fl_train_data,用于存放每个 client 上的训练数据集和测试数据集
* 在 PaddleRec/datasets/movielens_pinterest_NCF/fl_data 目录中执行: python gen_heter_data.py,生成 10 份训练数据
* 总样本数 4970844(按 1:4 补充负样本):0 - 518095,1 - 520165,2 - 373605,3 - 315550,4 - 483779,5 - 495635,6 - 402810,7 - 354590,8 - 262710,9 - 1243905
Expand Down Expand Up @@ -231,15 +231,15 @@ FL-PS 训练主要包括如下几个部分:
1.3.2 Coordinator 模块
""""""""""""

用户可以基于文件 `Paddle/python/paddle/distributed/ps/coordinator.py` 中定义的相关基类进行继承开发,用户自定义的各种 Client 选择算法均可以用 python 代码实现,从类 `ClientSelectorBase` 继承。
用户可以基于文件 `coordinator.py https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/distributed/ps/coordinator.py`_ 中定义的相关基类进行继承开发,用户自定义的各种 Client 选择算法均可以用 python 代码实现,从类 `ClientSelectorBase` 继承。

1.3.3 构造自定义异构数据集
""""""""""""

参考脚本 `gen_heter_data.py` 写法。


备注:本教程主要介绍了横向联邦 PS 的使用方法,关于纵向联邦 PS 的使用,请参考\ `https://github.com/PaddlePaddle/Paddle/blob/develop/test/ps/test_fl_ps.py`_\,使用 1.3.1 节的编译命令,再执行下述命令即可
备注:本教程主要介绍了横向联邦 PS 的使用方法,关于纵向联邦 PS 的使用,请参考 `test_fl_ps.py https://github.com/PaddlePaddle/Paddle/blob/develop/test/ps/test_fl_ps.py`_ ,使用 1.3.1 节的编译命令,再执行下述命令即可

.. code-block:: bash
ctest -R test_fl_ps -V
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/flags/data_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FLAGS_use_mkldnn
*******************************************
(始于 0.13.0)

在预测或训练过程中,可以通过该选项选择使用 Intel MKL-DNNhttps://github.com/intel/mkl-dnn库运行。
在预测或训练过程中,可以通过该选项选择使用 `Intel MKL-DNN <https://github.com/intel/mkl-dnn>`_ 库运行。
“用于深度神经网络的英特尔(R)数学核心库(Intel(R) MKL-DNN)”是一个用于深度学习应用程序的开源性能库。该库加速了英特尔(R)架构上的深度学习应用程序和框架。Intel MKL-DNN 包含矢量化和线程化构建建块,您可以使用它们来实现具有 C 和 C ++接口的深度神经网络(DNN)。

取值范围
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/flags/data_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FLAGS_use_mkldnn
*******************************************
(since 0.13.0)

Give a choice to run with Intel MKL-DNN (https://github.com/intel/mkl-dnn) library on inference or training.
Give a choice to run with `Intel MKL-DNN <https://github.com/intel/mkl-dnn>`_ library on inference or training.

Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN) is an open-source performance library for deep-learning applications. The library accelerates deep-learning applications and frameworks on Intel(R) architecture. Intel MKL-DNN contains vectorized and threaded building blocks that you can use to implement deep neural networks (DNN) with C and C++ interfaces.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/flags/executor_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FLAGS_use_ngraph
*******************************************
(始于 1.4.0)

在预测或训练过程中,可以通过该选项选择使用英特尔 nGraphhttps://github.com/NervanaSystems/ngraph引擎。它将在英特尔 Xeon CPU 上获得很大的性能提升。
在预测或训练过程中,可以通过该选项选择使用英特尔 `nGraph <https://github.com/NervanaSystems/ngraph>`_ 引擎。它将在英特尔 Xeon CPU 上获得很大的性能提升。

取值范围
---------------
Expand All @@ -34,4 +34,4 @@ FLAGS_use_ngraph=True - 开启使用 nGraph 运行。

注意
-------
英特尔 nGraph 目前仅在少数模型中支持。我们只验证了[ResNet-50](https://github.com/PaddlePaddle/models/blob/develop/PaddleCV/image_classification/README_ngraph.md的训练和预测。
英特尔 nGraph 目前仅在少数模型中支持。我们只验证了 `ResNet-50 <https://github.com/PaddlePaddle/models/blob/develop/PaddleCV/image_classification/README_ngraph.md>_ 的训练和预测。
4 changes: 2 additions & 2 deletions docs/guides/flags/executor_en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ FLAGS_use_ngraph
*******************************************
(since 1.4.0)

Give a choice to run with Intel nGraph(https://github.com/NervanaSystems/ngraph) engine on inference or training. This will obtain much performance boost on Intel Xeon CPU.
Give a choice to run with Intel `nGraph <https://github.com/NervanaSystems/ngraph>`_ engine on inference or training. This will obtain much performance boost on Intel Xeon CPU.

Values accepted
---------------
Expand All @@ -34,4 +34,4 @@ FLAGS_use_ngraph=True will enable running with nGraph support.

Note
-------
Intel nGraph is only supported in few models yet. We have only verified [ResNet-50](https://github.com/PaddlePaddle/models/blob/develop/PaddleCV/image_classification/README_ngraph.md) training and inference.
Intel nGraph is only supported in few models yet. We have only verified `ResNet-50 <https://github.com/PaddlePaddle/models/blob/develop/PaddleCV/image_classification/README_ngraph.md>`_ training and inference.
2 changes: 1 addition & 1 deletion docs/hardware_support/iluvatar_gpu/index_cn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
天数 GPGPU 芯片
####################

天数 BI150 加速卡([了解天数智芯](https://www.iluvatar.com/))是基于天数智芯自研通用 GPU 的训推一体加速卡,具备广通用性、强灵活性、高性价比的显著优势,支持市场主流生态,可广泛应用于主流大模型的预训练、微调以及推理任务,以及通用计算、新算法研究等场景,赋能 AI 智能社会。
天数 BI150 加速卡( `了解天数智芯 https://www.iluvatar.com/`_ )是基于天数智芯自研通用 GPU 的训推一体加速卡,具备广通用性、强灵活性、高性价比的显著优势,支持市场主流生态,可广泛应用于主流大模型的预训练、微调以及推理任务,以及通用计算、新算法研究等场景,赋能 AI 智能社会。

飞桨框架支持基于天数 GPGPU 芯片的训练和推理,请参考以下内容快速体验:

Expand Down