[Feature] Add native ModelExpress weight transfer backend (#58399)

Signed-off-by: Hyunjae Woo <hwoo@nvidia.com>
Co-authored-by: aoshen02 <aoshen@inferact.ai>
This commit is contained in:
Hyunjae Woo
2026-10-02 02:29:35 +00:00
committed by GitHub
co-authored by aoshen02
parent 785b990116
commit 5a661487e2
5 changed files with 558 additions and 0 deletions
@@ -250,6 +250,13 @@ WeightTransferEngineFactory.register_engine(
)
WeightTransferEngineFactory.register_engine(
"modelexpress",
"vllm.distributed.weight_transfer.modelexpress_engine",
"ModelExpressWeightTransferEngine",
)
# Trainer-side engines, parallel to the worker registry above.
WeightTransferTrainerFactory.register_engine(
"nccl",
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""Re-export the weight-transfer backend maintained by ModelExpress.
Install ModelExpress from the main branch's modelexpress_client/python
subdirectory.
"""
try:
from modelexpress import configure_vllm_logging
from modelexpress_rl.inference.engines.vllm.weight_transfer_engine import (
ModelExpressWeightTransferEngine,
ModelExpressWeightTransferInitInfo,
ModelExpressWeightTransferUpdateInfo,
)
except ModuleNotFoundError as exc:
if exc.name not in {
"modelexpress",
"modelexpress_rl",
"modelexpress_rl.inference",
"modelexpress_rl.inference.engines",
"modelexpress_rl.inference.engines.vllm",
"modelexpress_rl.inference.engines.vllm.weight_transfer_engine",
}:
raise
raise ImportError(
"The 'modelexpress' weight transfer backend requires ModelExpress. "
"Install it with `uv pip install "
"'git+https://github.com/ai-dynamo/modelexpress@main"
"#subdirectory=modelexpress_client/python'`."
) from exc
configure_vllm_logging()
__all__ = [
"ModelExpressWeightTransferEngine",
"ModelExpressWeightTransferInitInfo",
"ModelExpressWeightTransferUpdateInfo",
]