Skip to content

Commit

Permalink
small fix (#12397)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyita authored Nov 14, 2024
1 parent 00fce5c commit 59b01fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/llm/src/ipex_llm/transformers/npu_models/qwen2_mp.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,9 +934,9 @@ def forward(
hidden_states = F.pad(hidden_states.to(torch.float16), (0, 0, 0, pad_len), value=0.0)
position_ids = F.pad(position_ids, (0, pad_len), value=0)
attention_mask = F.pad(
attention_mask.to(torch.int64),
attention_mask.to(torch.float16),
(0, pad_len, 0, pad_len),
value=torch.iinfo(torch.int64).min,
value=torch.finfo(torch.float16).min,
)

args = (hidden_states, position_ids, attention_mask, past_key_value)
Expand Down

0 comments on commit 59b01fa

Please sign in to comment.