You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Multi-Instance vLLM Support in gym eval submit (#2482)
## Multi-Instance vLLM Support in `gym eval submit`
### Summary
Adds support for running multiple vLLM engine replicas in `gym eval
submit` using vLLM's native data-parallel multi-instance mode.
Previously, `VllmServiceConfig` only supported a single vLLM engine.
This change introduces two new fields:
- **`number_of_instances`** — the number of engine replicas to run
(default `1`, preserving existing behavior)
- **`distributed_backend`** — a typed, extensible sub-config declaring
how replicas are coordinated. The only type available in this PR is
`vllm_service`, which maps to vLLM's `--data-parallel-size N` flag. vLLM
manages load balancing internally, so no external router or extra
processes are needed.
When `number_of_instances > 1`, the generated sbatch script passes
`--data-parallel-size N` to the single `vllm serve` command. The single
endpoint, health check, and driver URL wiring are all unchanged.
The `distributed_backend` field is designed to be extended in future PRs
— Ray Serve and Dynamo routing backends will each add a new type to the
discriminated union without touching existing configs.
### Validation rules
- `number_of_instances > 1` requires `distributed_backend` to be set
(fails loudly with a clear message)
- `number_of_instances == 1` with `distributed_backend` set is rejected
- `number_of_instances < 1` is rejected
### Also included
- `--pipeline-parallel-size` is now emitted in the generated `vllm
serve` command when `> 1` (it was in the config but was never passed to
the CLI)
- An example YAML (`examples/slurm_vllm_multi_instance.yaml`) showing a
4-instance setup with TP=2 across 8 GPUs
---------
Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: prokotg <19536019+prokotg@users.noreply.github.com>
Signed-off-by: Onur Yilmaz <oyilmaz@nvidia.com>
Signed-off-by: Onur Yilmaz <35306097+oyilmaz-nvidia@users.noreply.github.com>
Co-authored-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Co-authored-by: prokotg <19536019+prokotg@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
0 commit comments