Update modeling_InternLM_XComposer.py
Browse files
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()
|