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 1111)
1212from huggingface_hub import snapshot_download
1313from transformers .integrations .deepspeed import HfDeepSpeedConfig
14- from transformers .modeling_utils import no_init_weights
1514
1615from dschat .utils .model .reward_model import RewardModel
1716from dschat .utils .utils import load_state_dict_into_model , print_rank_0
@@ -100,8 +99,7 @@ def create_hf_model(model_class,
10099 dschf = None
101100 if rlhf_training :
102101 # 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 )
105103 else :
106104 model = model_class .from_pretrained (
107105 model_name_or_path ,
You can’t perform that action at this time.
0 commit comments