|
|
@@ -1888,6 +1888,9 @@ class PretrainedModel(
|
|
|
with ContextManagers(init_contexts):
|
|
|
model = cls(config, *init_args, **model_kwargs)
|
|
|
|
|
|
+ # modified by zhch158
|
|
|
+ transpose_weight_keys = [] # ✅ 默认初始化
|
|
|
+
|
|
|
if convert_from_torch and state_dict is None:
|
|
|
if (
|
|
|
resolved_archive_file.endswith(PYTORCH_WEIGHTS_NAME)
|