stanrom commited on
Commit
66ceca3
1 Parent(s): 7bbe75c

to(torch.float16)

Browse files
Files changed (1) hide show
  1. modeling_InternLM_XComposer.py +1 -1
modeling_InternLM_XComposer.py CHANGED
@@ -66,7 +66,7 @@ class InternLMXComposerForCausalLM(PreTrainedModel):
66
  assert int(torch.__version__[0]) == 2
67
  # speed up init llm
68
  with torch.device('meta'):
69
- self.internlm_model = InternLMForCausalLM._from_config(config)
70
  # self.internlm_model.to_empty(device=config.device).to(torch.float16)
71
  self.internlm_model.tie_weights()
72
  # self.internlm_model.to(config.device)
 
66
  assert int(torch.__version__[0]) == 2
67
  # speed up init llm
68
  with torch.device('meta'):
69
+ self.internlm_model = InternLMForCausalLM._from_config(config).to(torch.float16)
70
  # self.internlm_model.to_empty(device=config.device).to(torch.float16)
71
  self.internlm_model.tie_weights()
72
  # self.internlm_model.to(config.device)