From 2a781756a1a84b2a91294c57dcdc468605cd0feb Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Thu, 28 May 2026 10:39:41 +0100 Subject: [PATCH] Restore `Literal` for `WeightTransferConfig.backend` (#43183) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- vllm/config/weight_transfer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vllm/config/weight_transfer.py b/vllm/config/weight_transfer.py index e2ac6e71a9..86e75c7965 100644 --- a/vllm/config/weight_transfer.py +++ b/vllm/config/weight_transfer.py @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project +from typing import Literal + from vllm.config.utils import config @@ -7,7 +9,7 @@ from vllm.config.utils import config class WeightTransferConfig: """Configuration for weight transfer during RL training.""" - backend: str = "nccl" + backend: Literal["nccl", "ipc"] | str = "nccl" """The backend to use for weight transfer. Validated against the `WeightTransferEngineFactory` registry at engine creation time. """