英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论