[Core] Support disaggregated prefill with Mooncake Transfer Engine (#10884)

Signed-off-by: Shangming Cai <caishangming@linux.alibaba.com>
This commit is contained in:
shangmingc
2024-12-16 05:28:18 +08:00
committed by GitHub
parent 38e599d6a8
commit d263bd9df7
4 changed files with 352 additions and 31 deletions

View File

@@ -2171,13 +2171,14 @@ class KVTransferConfig(BaseModel):
return KVTransferConfig.model_validate_json(cli_value)
def model_post_init(self, __context: Any) -> None:
supported_kv_connector = ["PyNcclConnector", "MooncakeConnector"]
if all([
self.kv_connector is not None,
self.kv_connector != "PyNcclConnector"
self.kv_connector is not None, self.kv_connector
not in supported_kv_connector
]):
raise ValueError(f"Unsupported kv_connector: {self.kv_connector}. "
f"Supported connectors are "
f"`PyNcclConnector`.")
f"{supported_kv_connector}.")
if self.kv_role is not None and self.kv_role not in [
"kv_producer", "kv_consumer", "kv_both"