Optimum 文档
DistributedRunner
加入 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 )
设置训练/推理硬件配置并运行分布式命令。
用于 DeepSpeed 的多节点配置设置。
单卡设置。
单节点多卡配置设置。
用于 DeepSpeed 的单节点多卡配置设置。
用于 mpirun 的单节点多卡配置设置。
返回用于 DeepSpeed 多节点运行的主地址。直接受 https://github.com/microsoft/DeepSpeed/blob/316c4a43e0802a979951ee17f735daf77ea9780f/deepspeed/autotuning/utils.py#L145 的启发。
运行用户指定的命令。