評價此頁

分散式#

分散式訓練是一種模型訓練正規化,它涉及將訓練工作負載分佈到多個工作節點上,從而顯著提高訓練速度和模型準確性。雖然分散式訓練可用於任何型別的機器學習模型訓練,但對於大型模型和計算密集型任務(如深度學習)來說,使用它最有益。

在 PyTorch 中,有幾種方法可以執行分散式訓練,每種方法在特定用例中都有其優勢。

分散式概覽 中閱讀更多關於這些選項的資訊。

學習 DDP#

DDP 入門影片教程

一個關於如何開始使用 DistributedDataParallel 並深入更復雜主題的分步影片系列。

https://pytorch.com.tw/tutorials/beginner/ddp_series_intro.html?utm_source=distr_landing&utm_medium=ddp_series_intro
分散式資料並行入門

本教程提供了一個簡短而易懂的 PyTorch 分散式資料並行入門。

https://pytorch.com.tw/tutorials/intermediate/ddp_tutorial.html?utm_source=distr_landing&utm_medium=intermediate_ddp_tutorial
使用 Join 上下文管理器處理不均勻輸入的分散式訓練

本教程介紹了 Join 上下文管理器,並演示了它與分散式資料並行的使用。

https://pytorch.com.tw/tutorials/advanced/generic_join.html?utm_source=distr_landing&utm_medium=generic_join

學習 FSDP2#

FSDP2 入門

本教程演示瞭如何使用 FSDP2 在 Transformer 模型上執行分散式訓練。

https://pytorch.com.tw/tutorials/intermediate/FSDP_tutorial.html?utm_source=distr_landing&utm_medium=FSDP_getting_started

學習張量並行 (TP)#

使用張量並行 (TP) 進行大規模 Transformer 模型訓練

本教程演示瞭如何使用張量並行和完全分片資料並行在數百到數千個 GPU 上訓練大型類 Transformer 模型。

https://pytorch.com.tw/tutorials/intermediate/TP_tutorial.html

學習裝置網格#

DeviceMesh 入門

在本教程中,您將瞭解 DeviceMesh 及其如何幫助進行分散式訓練。

https://pytorch.com.tw/tutorials/recipes/distributed_device_mesh.html?highlight=devicemesh

學習 RPC#

分散式 RPC 框架入門

本教程演示瞭如何開始使用基於 RPC 的分散式訓練。

https://pytorch.com.tw/tutorials/intermediate/rpc_tutorial.html?utm_source=distr_landing&utm_medium=rpc_getting_started
使用分散式 RPC 框架實現引數伺服器

本教程將引導您完成使用 PyTorch 的分散式 RPC 框架實現引數伺服器的簡單示例。

https://pytorch.com.tw/tutorials/intermediate/rpc_param_server_tutorial.html?utm_source=distr_landing&utm_medium=rpc_param_server_tutorial
使用非同步執行實現批處理 RPC

在本教程中,您將使用 @rpc.functions.async_execution 裝飾器構建批處理 RPC 應用程式。

https://pytorch.com.tw/tutorials/intermediate/rpc_async_execution.html?utm_source=distr_landing&utm_medium=rpc_async_execution
結合 Distributed DataParallel 和分散式 RPC 框架

在本教程中,您將學習如何將分散式資料並行與分散式模型並行結合起來。

https://pytorch.com.tw/tutorials/advanced/rpc_ddp_tutorial.html?utm_source=distr_landing&utm_medium=rpc_plus_ddp

自定義擴充套件#

使用 Cpp 擴充套件自定義程序組後端

在本教程中,您將學習如何實現自定義 ProcessGroup 後端,並使用 C++ 擴充套件將其整合到 PyTorch 分散式包中。

https://pytorch.com.tw/tutorials/intermediate/process_group_cpp_extension_tutorial.html?utm_source=distr_landing&utm_medium=custom_extensions_cpp