Multi-node multi-instance vLLM via gym eval submit - #2597
Conversation
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…duplication back-off Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…nt home in indiviudla sruns Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
…solve configs properly (?) Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
prokotg
left a comment
There was a problem hiding this comment.
Thank you for the PR! I left comments in placees where I think some changes are critical. Let me know if I can provide more feedback
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
| def render_ray_prelude() -> str: | ||
| return _RAY_PRELUDE |
There was a problem hiding this comment.
this function can be removed
| return ( | ||
| f"# service: {name}\n" | ||
| f"{env_prefix}srun --overlap --no-container-mount-home{mounts_flag} --container-image={shlex.quote(container)} --output=logs/{name}.log {command} &\n" | ||
| f"{env_prefix}srun --overlap --no-container-mount-home{node_flags}{mounts_flag} --container-image={shlex.quote(container)} --output=logs/{name}.log {command} &\n" |
There was a problem hiding this comment.
Might be tackled in another PR but we need to check how multi-rank logs are written (we should be able to differentiate logs from instances)
prokotg
left a comment
There was a problem hiding this comment.
Approved, thank you! Agreed upon items to remember for the upcoming PRs:
- Multi-node multi-instnace model handling
- Partial allocation for service and collision avoidance (multiple services should have separate GPUs)
- Logging of multi-rank services should be handled
|
/ok to test 968b57c |
|
/ok to test 3b5da65 |
|
@prokotg To have a record here, so the following configs are supported for multi node. Assuming each node has 8 GPUs.
but the following is not supported.
And this is due to a bug on the vLLM side. |
|
Thanks @oyilmaz-nvidia could you share more details on the vllm bug? |
Summary
Adds multi-node vLLM service support to the Slurm orchestration layer (
gym eval submit), building on top of the existing single-node multi-instance support (separate PR:onur/multi-instance-vllm-service). Avllmservice can now span multiple physical Slurm nodes, either for a single replica's tensor/pipeline-parallel footprint, or for multi-node data-parallel replicas.What's NOT included in this PR is that multi-node TP with multiple instance which is a rare case. So, in order to use the features in this PR, the model has to fit into a single node.
What's new
raydistributed backend — a newdistributed_backendoption (alongside the existing single-nodempbackend) using vLLM's Ray core executor (--distributed-executor-backend ray, not theray.servelibrary) to span a service across nodes.compute.node_poolstotal more than one node,distributed_backendis automatically forced toray, overriding anything set/defaulted at the service level. No need to writedistributed_backend: {type: ray}yourself.number_of_instancesmust divide evenly across the node count (each node hosts an equal share of replicas).slurm_script.py):scontrol show hostnames,HEAD_NODE_IP/RAY_HEAD_NODE_IP) when any service uses theraybackend,ray symmetric-run(falling back to manualray start --head/--blockfor older Ray), spanning TP/PP across nodes,--headlesswith a--data-parallel-start-rankoffset — no Ray involved for that path,--nodes=/--ntasks=to each service'ssrunstep on multi-node compute (--nodes=1 --ntasks=1for the driver).New example config
examples/slurm_vllm_ray_multi_node.yaml— 2-node compute, 8 replicas (TP2) spanning both nodes, backend auto-selected asrayfrom node count alone.