dLLM-RL icon indicating copy to clipboard operation
dLLM-RL copied to clipboard

multi-node rl training

Open STAR-CV opened this issue 11 months ago • 4 comments

Hello, great work! I have a question about training multi-node RL. Is it only possible to train by SSHing to other nodes' addresses? Do we need to provide the addresses of other nodes here? Due to constraints, we can only use nodes automatically assigned by the server. Is there a command similar to sft train to start multinode_rl?

accelerate launch \ --num_machines $MLP_WORKER_NUM \ --machine_rank $MLP_ROLE_INDEX \ --main_process_ip $MLP_WORKER_0_HOST \ --main_process_port $MLP_WORKER_0_PORT \ --config_file accelerate_configs/4_node_8_gpus_deepspeed_zero3.yaml \ train/sft_dream.py \ config=configs/sft_sdar.yaml I would be most grateful for any suggestions you might offer, and I look forward to your response.

STAR-CV avatar Dec 17 '25 01:12 STAR-CV

Sorry, currently this code needs the main node to ssh other nodes.

In multinoderl code, worker_hosts = [os.environ[f"MLP_WORKER_{i}_HOST"] for i in range(num_node)]. So MLP_WORKER_{i}HOST is automately accessed by the main node, not something you need to assigned by yourself. Could you check if you can access MLP_WORKER{i}_HOST from your main node?

BTW, we are also considering to shift this code base to verl's version.

yinjjiew avatar Dec 18 '25 23:12 yinjjiew

Thank you for your prompt reply. Due to personal circumstances, I can only use nodes automatically assigned by the server, which may make passwordless SSH access difficult. I've tried using torchrun instead of SSH for multi-node connections. I'd like to ask if you've encountered the following error during previous multi-node runs. It typically occurs between steps 15 and 20: ` File "/mnt/data/dLLM-RL/sample/sdar_rl_rollout.py", line 567, in kind, payload = out_q.get(timeout=1800) File "/root/miniconda3/envs/dllm-rl/lib/python3.10/multiprocessing/queues.py", line 114, in get raise Empty _queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/mnt/data/dLLM-RL/sample/sdar_rl_rollout.py", line 578, in raise RuntimeError("Some workers died without returning results. See logs above.") RuntimeError: Some workers died without returning results. See logs above.` I would be most grateful for any suggestions you might offer, and I look forward to your response. @yinjjiew

STAR-CV avatar Dec 22 '25 01:12 STAR-CV

Previously, evaluation errors occurred on single node 8 A100. This was resolved by reducing the max_active size from 256 to 16. This time, I'm using a two-node, 8-card A100 setup and am also attempting to reduce the max_active size to see if it successfully resolves the aforementioned issue.

STAR-CV avatar Dec 22 '25 02:12 STAR-CV

Running in a multi-node environment, changing max_active from 256 to 128 resolved the aforementioned error. Thank you for your excellent work.

STAR-CV avatar Dec 23 '25 01:12 STAR-CV