File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
applications/DeepSpeed-Chat/dschat/utils/model Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 11
11
)
12
12
from huggingface_hub import snapshot_download
13
13
from transformers .integrations .deepspeed import HfDeepSpeedConfig
14
- from transformers .modeling_utils import no_init_weights
15
14
16
15
from dschat .utils .model .reward_model import RewardModel
17
16
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
100
if rlhf_training :
102
101
# the weight loading is handled by create critic model
103
- with no_init_weights ():
104
- model = model_class .from_config (model_config )
102
+ model = model_class .from_config (model_config )
105
103
else :
106
104
model = model_class .from_pretrained (
107
105
model_name_or_path ,
You can’t perform that action at this time.
0 commit comments