[BugFix] Require kv producer for layer sharding (#8563)
### What this PR does / why we need it? This PR introduce stricter Ascend `additional_config.layer_sharding` validation to the 0.18 release branch so it is only accepted on PD-disaggregated P nodes with `kv_role="kv_producer"`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? E2E test --------- Signed-off-by: chenchuw886 <chenchuw@huawei.com> Co-authored-by: chenchuw886 <chenchuw@huawei.com>
This commit is contained in:
@@ -241,7 +241,7 @@ class NPUPlatform(Platform):
|
||||
return
|
||||
|
||||
kv_transfer_config = vllm_config.kv_transfer_config
|
||||
if kv_transfer_config is not None and kv_transfer_config.kv_role != "kv_producer":
|
||||
if kv_transfer_config is None or kv_transfer_config.kv_role != "kv_producer":
|
||||
raise ValueError(
|
||||
"additional_config.layer_sharding is only supported on P nodes "
|
||||
"(kv_role='kv_producer') when KV transfer is enabled."
|
||||
|
||||
Reference in New Issue
Block a user