Skip to content

Commit

Permalink
update qwen model
Browse files Browse the repository at this point in the history
Signed-off-by: tk <[email protected]>
  • Loading branch information
ssbuild committed Dec 2, 2023
1 parent 4fc0c8e commit 524f307
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/deep_training/nlp/models/qwen/modeling_qwen.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ def forward(
-1, -1, causal_mask.size(2), -1
)
if causal_mask is not None:
attention_mask.masked_fill(~causal_mask, torch.finfo(query.dtype).min)
# attention_mask.masked_fill(~causal_mask, torch.finfo(query.dtype).min)
attention_mask.masked_fill(~causal_mask, torch.finfo(attention_mask.dtype).min)
else:
attention_mask = causal_mask
attn_output = F.scaled_dot_product_attention(
Expand Down

0 comments on commit 524f307

Please sign in to comment.