[feat][Ascend][Mindspore]: support model-impl of mindspore (#9234)
This commit is contained in:
@@ -99,7 +99,9 @@ def get_model_architecture(model_config: ModelConfig) -> Tuple[Type[nn.Module],
|
||||
supported_archs = ModelRegistry.get_supported_archs()
|
||||
is_native_supported = any(arch in supported_archs for arch in architectures)
|
||||
|
||||
if not is_native_supported or model_config.model_impl == ModelImpl.TRANSFORMERS:
|
||||
if model_config.model_impl == ModelImpl.MINDSPORE:
|
||||
architectures = ["MindSporeForCausalLM"]
|
||||
elif not is_native_supported or model_config.model_impl == ModelImpl.TRANSFORMERS:
|
||||
architectures = resolve_transformers_arch(model_config, architectures)
|
||||
return ModelRegistry.resolve_model_cls(architectures)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user