Skip to content

Commit 2063b13

Browse files
sijunhewj-Mcat
andauthored
pr (#4140)
Co-authored-by: 骑马小猫 <1435130236@qq.com>
1 parent 2482b0f commit 2063b13

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

paddlenlp/transformers/model_utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@
4848
download_check,
4949
get_path_from_url_with_filelock,
5050
)
51-
from paddlenlp.utils.env import HF_CACHE_HOME, LEGACY_CONFIG_NAME, MODEL_HOME
51+
from paddlenlp.utils.env import (
52+
CONFIG_NAME,
53+
HF_CACHE_HOME,
54+
LEGACY_CONFIG_NAME,
55+
MODEL_HOME,
56+
)
5257
from paddlenlp.utils.log import logger
5358

5459
from .configuration_utils import PretrainedConfig
@@ -239,6 +244,7 @@ def __init__(self, *args, **kwargs):
239244
break
240245
if config is not None:
241246
self.config: PretrainedConfig = config
247+
self.model_config_file = CONFIG_NAME
242248
return
243249

244250
# extract config from kwargs
@@ -252,6 +258,7 @@ def __init__(self, *args, **kwargs):
252258
raise TypeError("config parameter should be the instance of PretraiendConfig")
253259

254260
self.config: PretrainedConfig = kwargs["config"]
261+
self.model_config_file = CONFIG_NAME
255262
self.warnings_issued = {}
256263

257264
def _post_init(self, original_init, *args, **kwargs):

0 commit comments

Comments
 (0)