yangapku commited on
Commit
6b0ab20
1 Parent(s): 8de590f

update modeling_qwen.py

Browse files
Files changed (1) hide show
  1. modeling_qwen.py +1 -1
modeling_qwen.py CHANGED
@@ -524,7 +524,7 @@ class QWenAttention(nn.Module):
524
  -1, -1, causal_mask.size(2), -1
525
  )
526
  if causal_mask is not None:
527
- attention_mask.masked_fill_(~causal_mask, torch.finfo(query.dtype).min)
528
  else:
529
  attention_mask = causal_mask
530
  attn_output = F.scaled_dot_product_attention(
 
524
  -1, -1, causal_mask.size(2), -1
525
  )
526
  if causal_mask is not None:
527
+ attention_mask = attention_mask.masked_fill(~causal_mask, torch.finfo(query.dtype).min)
528
  else:
529
  attention_mask = causal_mask
530
  attn_output = F.scaled_dot_product_attention(