Toby0830 commited on
Commit
5af2fa9
·
verified ·
1 Parent(s): 8f63abe

Upload InternLM2ForCausalLM

Browse files
Files changed (1) hide show
  1. modeling_internlm2.py +1 -1
modeling_internlm2.py CHANGED
@@ -390,7 +390,7 @@ class InternLM2Attention(nn.Module):
390
  # attn_weights_i = attn_weights_i + causal_mask_i
391
 
392
  # # Upcast attention to fp32 and apply softmax
393
- # attn_weights_i = F.softmax(attn_weights_i, dim=-1, dtype=torch.float32).to(query_states_i.dtype)
394
  # attn_output_i = torch.matmul(attn_weights_i, value_states.to(device))
395
 
396
  # return attn_output_i
 
390
  # attn_weights_i = attn_weights_i + causal_mask_i
391
 
392
  # # Upcast attention to fp32 and apply softmax
393
+ # attn_weights_i = nn.functional.softmax(attn_weights_i, dim=-1, dtype=torch.float32).to(query_states_i.dtype)
394
  # attn_output_i = torch.matmul(attn_weights_i, value_states.to(device))
395
 
396
  # return attn_output_i