forked from EngineX-Cambricon/enginex-mlu370-vllm
testing dynamic register
This commit is contained in:
@@ -447,12 +447,18 @@ class _ModelRegistry:
|
||||
warn_on_fail=True,
|
||||
)
|
||||
if model_cls is not None:
|
||||
logger.info(
|
||||
"Found custom model class %s from auto_map[%s], "
|
||||
"using TransformersForCausalLM wrapper",
|
||||
model_cls.__name__,
|
||||
name
|
||||
)
|
||||
# Only log once per model class to avoid spam
|
||||
log_key = f"{model_cls.__name__}_{name}"
|
||||
if not hasattr(self, '_logged_custom_models'):
|
||||
self._logged_custom_models = set()
|
||||
if log_key not in self._logged_custom_models:
|
||||
logger.info(
|
||||
"Found custom model class %s from auto_map[%s], "
|
||||
"using TransformersForCausalLM wrapper",
|
||||
model_cls.__name__,
|
||||
name
|
||||
)
|
||||
self._logged_custom_models.add(log_key)
|
||||
# Return the wrapper architecture, not the actual class
|
||||
return "TransformersForCausalLM"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user