Optimum 文档
DistributedRunner
加入 Hugging Face 社区
并获得增强的文档体验
开始使用
DistributedRunner
class optimum.habana.distributed.DistributedRunner
< source >( 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 )
设置训练/推理硬件配置并运行分布式命令。
DeepSpeed 的多节点配置设置。
单卡设置。
单节点多卡配置设置。
DeepSpeed 的单节点多卡配置设置。
mpirun 的单节点多卡配置设置。
返回用于 DeepSpeed 多节点运行的主节点地址。直接灵感来自 https://github.com/microsoft/DeepSpeed/blob/316c4a43e0802a979951ee17f735daf77ea9780f/deepspeed/autotuning/utils.py#L145。
使用用户指定的配置运行所需的命令。