stanrom commited on
Commit
22cba02
1 Parent(s): 7eca9f4

Update modeling_InternLM_XComposer.py

Browse files
Files changed (1) hide show
  1. modeling_InternLM_XComposer.py +2 -2
modeling_InternLM_XComposer.py CHANGED
@@ -82,8 +82,8 @@ conversation
82
  # speed up init llm
83
  with torch.device('meta'):
84
  self.internlm_model = InternLMForCausalLM._from_config(config)
85
- self.internlm_model.to_empty(device=config.device).to(torch.float16)
86
- self.internlm_model.to(config.device)
87
  for n, m in self.internlm_model.named_modules():
88
  if 'lora' in n:
89
  m.float()
 
82
  # speed up init llm
83
  with torch.device('meta'):
84
  self.internlm_model = InternLMForCausalLM._from_config(config)
85
+ # self.internlm_model.to_empty(device=config.device).to(torch.float16)
86
+ # self.internlm_model.to(config.device)
87
  for n, m in self.internlm_model.named_modules():
88
  if 'lora' in n:
89
  m.float()