diff --git a/optimum/modeling_base.py b/optimum/modeling_base.py index 9523f5c5042..9663a311692 100644 --- a/optimum/modeling_base.py +++ b/optimum/modeling_base.py @@ -358,7 +358,7 @@ def from_pretrained( if os.path.isdir(os.path.join(model_id, subfolder)) and cls.config_name == CONFIG_NAME: if CONFIG_NAME in os.listdir(os.path.join(model_id, subfolder)): config = AutoConfig.from_pretrained( - os.path.join(model_id, subfolder, CONFIG_NAME), trust_remote_code=trust_remote_code + os.path.join(model_id, subfolder), trust_remote_code=trust_remote_code ) elif CONFIG_NAME in os.listdir(model_id): config = AutoConfig.from_pretrained( diff --git a/optimum/utils/normalized_config.py b/optimum/utils/normalized_config.py index 8a5ef377854..a894001d359 100644 --- a/optimum/utils/normalized_config.py +++ b/optimum/utils/normalized_config.py @@ -252,6 +252,7 @@ class NormalizedConfigManager: "pegasus": BartLikeNormalizedTextConfig, "pix2struct": Pix2StructNormalizedTextConfig, "phi": NormalizedTextConfig, + "phi3": NormalizedTextConfigWithGQA, "poolformer": NormalizedVisionConfig, "regnet": NormalizedVisionConfig, "resnet": NormalizedVisionConfig,