[BugFix] Disable async scheduling for Mamba prefix caching (#33352)
Signed-off-by: huanghaoyan.hhy <huanghaoyan.hhy@alibaba-inc.com>
This commit is contained in:
@@ -619,6 +619,11 @@ class VllmConfig:
|
|||||||
"`external_launcher` distributed executor backend, but you chose "
|
"`external_launcher` distributed executor backend, but you chose "
|
||||||
f"`{executor_backend}`."
|
f"`{executor_backend}`."
|
||||||
)
|
)
|
||||||
|
if self.cache_config.mamba_cache_mode != "none":
|
||||||
|
raise ValueError(
|
||||||
|
"Currently, async scheduling is not compatible with "
|
||||||
|
"prefix caching for Mamba models."
|
||||||
|
)
|
||||||
elif self.scheduler_config.async_scheduling is None:
|
elif self.scheduler_config.async_scheduling is None:
|
||||||
# Enable async scheduling unless there is an incompatible option.
|
# Enable async scheduling unless there is an incompatible option.
|
||||||
if (
|
if (
|
||||||
@@ -651,6 +656,13 @@ class VllmConfig:
|
|||||||
scope="local",
|
scope="local",
|
||||||
)
|
)
|
||||||
self.scheduler_config.async_scheduling = False
|
self.scheduler_config.async_scheduling = False
|
||||||
|
elif self.cache_config.mamba_cache_mode != "none":
|
||||||
|
logger.warning_once(
|
||||||
|
"Async scheduling is not compatible with "
|
||||||
|
"prefix caching for Mamba models and will be disabled.",
|
||||||
|
scope="local",
|
||||||
|
)
|
||||||
|
self.scheduler_config.async_scheduling = False
|
||||||
else:
|
else:
|
||||||
self.scheduler_config.async_scheduling = True
|
self.scheduler_config.async_scheduling = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user