add dynamic register

This commit is contained in:
Chranos
2026-02-05 15:53:43 +08:00
parent 9563c9af0d
commit 92f0016e6f
4 changed files with 244 additions and 14 deletions

View File

@@ -32,7 +32,13 @@ def get_model_architecture(
and "MixtralForCausalLM" in architectures):
architectures = ["QuantMixtralForCausalLM"]
return ModelRegistry.resolve_model_cls(architectures)
return ModelRegistry.resolve_model_cls(
architectures,
model_path=model_config.model,
revision=model_config.revision,
trust_remote_code=model_config.trust_remote_code,
hf_config=model_config.hf_config,
)
def get_architecture_class_name(model_config: ModelConfig) -> str: