HuggingFace Accelerate无法使用正确数量的进程。

huangapple go评论66阅读模式
英文:

HuggingFace Accelerate won't use the proper number of processes

问题

The server I'm using has a total of 4 GPUs and I want to use 2. I'm therefore trying to do accelerate launch --num_processes 2 train.py, but when I run the script it says that the number of processes is only 1. Why is this happening? It seems as of now I can either only use all 4 or only 1.

英文:

The server I'm using has a total of 4 GPUs and I want to use 2. I'm therefore trying to do accelerate launch --num_processes 2 train.py, but when I run the script it says that the number of processes is only 1. Why is this happening? It seems as of now I can either only use all 4 or only 1.

答案1

得分: 2

当使用命令行界面时,您还需要传递--multi_gpu参数以启用分布式训练。
然而,文档建议使用accelerate config来简化配置。

英文:

When using the command line interface, you also need to pass the --multi_gpu argument to enable distributed training.
However the documentation recommends using accelerate config to facilitate the configuration.

huangapple
  • 本文由 发表于 2023年5月17日 12:54:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76268667.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定