[Model] Introduce verify_and_update_model_config for VerifyAndUpdateConfig. (#31131)
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com>
This commit is contained in:
+18
-1
@@ -595,7 +595,7 @@ class ModelConfig:
|
||||
|
||||
# Avoid running try_verify_and_update_config multiple times
|
||||
self.config_updated = False
|
||||
|
||||
self._try_verify_and_update_model_config()
|
||||
self._verify_quantization()
|
||||
self._verify_cuda_graph()
|
||||
self._verify_bnb_config()
|
||||
@@ -1008,6 +1008,23 @@ class ModelConfig:
|
||||
"when expert parallelism is enabled."
|
||||
)
|
||||
|
||||
def _try_verify_and_update_model_config(self):
|
||||
# Avoid running try_verify_and_update_config multiple times
|
||||
if getattr(self, "config_updated", False):
|
||||
return
|
||||
|
||||
architecture = self.architecture
|
||||
if architecture is None:
|
||||
return
|
||||
|
||||
from vllm.model_executor.models.config import (
|
||||
MODELS_CONFIG_MAP,
|
||||
)
|
||||
|
||||
cls = MODELS_CONFIG_MAP.get(architecture, None)
|
||||
if cls is not None:
|
||||
cls.verify_and_update_model_config(self)
|
||||
|
||||
def verify_dual_chunk_attention_config(
|
||||
self,
|
||||
load_config: LoadConfig,
|
||||
|
||||
Reference in New Issue
Block a user