We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d83278 commit ff3a22dCopy full SHA for ff3a22d
1 file changed
applications/DeepSpeed-Chat/dschat/utils/model/model_utils.py
@@ -11,7 +11,6 @@
11
)
12
from huggingface_hub import snapshot_download
13
from transformers.integrations.deepspeed import HfDeepSpeedConfig
14
-from transformers.modeling_utils import no_init_weights
15
16
from dschat.utils.model.reward_model import RewardModel
17
from dschat.utils.utils import load_state_dict_into_model, print_rank_0
@@ -100,8 +99,7 @@ def create_hf_model(model_class,
100
99
dschf = None
101
if rlhf_training:
102
# the weight loading is handled by create critic model
103
- with no_init_weights():
104
- model = model_class.from_config(model_config)
+ model = model_class.from_config(model_config)
105
else:
106
model = model_class.from_pretrained(
107
model_name_or_path,
0 commit comments