testing dynamic register

This commit is contained in:
Chranos
2026-02-05 16:26:24 +08:00
parent 31e7cd3bf9
commit 2cb9f6ce1d
4 changed files with 336 additions and 45 deletions

View File

@@ -353,8 +353,20 @@ class ModelConfig:
task_support: Dict[_Task, bool] = {
# NOTE: Listed from highest to lowest priority,
# in case the model supports multiple of them
"generate": ModelRegistry.is_text_generation_model(architectures),
"embedding": ModelRegistry.is_embedding_model(architectures),
"generate": ModelRegistry.is_text_generation_model(
architectures,
model_path=self.model,
revision=self.revision,
trust_remote_code=self.trust_remote_code,
hf_config=hf_config,
),
"embedding": ModelRegistry.is_embedding_model(
architectures,
model_path=self.model,
revision=self.revision,
trust_remote_code=self.trust_remote_code,
hf_config=hf_config,
),
}
supported_tasks_lst: List[_Task] = [
task for task, is_supported in task_support.items() if is_supported