Optimum 文件

DistributedRunner

您正在檢視的是需要從原始碼安裝。如果您想透過 pip 安裝常規版本,請檢視最新穩定版 (v1.27.0)。
Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

分散式執行器

class optimum.habana.distributed.DistributedRunner

< >

( command_list: typing.List = [] world_size: int = 1 hostfile: typing.Union[str, pathlib.Path] = None use_mpi: bool = False use_deepspeed: bool = False master_port: int = 29500 use_env: bool = False map_by: bool = 'socket' multi_hls = None )

設定訓練/推理硬體配置並執行分散式命令。

create_multi_node_setup

< >

( )

用於 DeepSpeed 的多節點配置設定。

create_single_card_setup

< >

( use_deepspeed = False )

單卡設定。

create_single_node_setup

< >

( )

單節點多卡配置設定。

create_single_node_setup_deepspeed

< >

( )

用於 DeepSpeed 的單節點多卡配置設定。

create_single_node_setup_mpirun

< >

( )

用於 mpirun 的單節點多卡配置設定。

process_hostfile

< >

( ) str

返回

字串

主節點的地址。

返回用於 DeepSpeed 多節點執行的主地址。直接受 https://github.com/microsoft/DeepSpeed/blob/316c4a43e0802a979951ee17f735daf77ea9780f/deepspeed/autotuning/utils.py#L145 的啟發。

run

< >

( )

執行使用者指定的命令。

< > 在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.