horovod/horovod

Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.

What it solves

Horovod 簡化了將深度學習訓練從單一 GPU 擴展到多 GPU 及多主機的過程。它消除了一般分散式訓練所伴隨的複雜性,例如管理參數伺服器,提供了一種更直接的方式在叢集上平行執行模型。

How it works

Horovod 使用基於 MPI(Message Passing Interface)的模型來處理工作節點之間的通訊。它不使用中心伺服器,而是採用 allreduce 等集合通訊操作來對所有工作節點的梯度進行平均。它可與 TensorFlow、Keras、PyTorch 以及 Apache MXNet 等流行框架整合。實作時,使用者需要初始化 Horovod、將 GPU 綁定到特定的程序、調整學習率,並將 optimizer 包裝成 DistributedOptimizer

Who it’s for

此框架設計給機器學習工程師與基礎建設團隊使用,讓他們能在多 GPU 或多伺服器上訓練大型模型與大規模資料集,同時將擴展所需的程式碼變更降到最低。

Highlights

  • Multi-Framework Support: Works with TensorFlow, PyTorch, Keras, and MXNet.
  • Tensor Fusion: Improves performance by batching small allreduce operations and interleaving communication with computation.
  • High Scaling Efficiency: Demonstrates high efficiency (up to 90% for certain models) when scaling across hundreds of GPUs.
  • Autotuning: Includes a system to automatically optimize performance settings to reduce trial-and-error tuning.
  • Flexible Deployment: Can be run via horovodrun, Docker, Kubernetes, Spark, Ray, and various HPC clusters.