Skip to content

Commit

Permalink
Fix issue #2568: --device mps led to TypeError: forward() got an unex…
Browse files Browse the repository at this point in the history
…pected keyword argument 'padding_mask'. (#2579)
  • Loading branch information
Phil-U-U authored Oct 18, 2023
1 parent 29de51f commit f79151b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fastchat/model/monkey_patch_non_inplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def forward(
past_key_value: Optional[Tuple[torch.Tensor]] = None,
output_attentions: bool = False,
use_cache: bool = False,
padding_mask: Optional[torch.LongTensor] = None,
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
bsz, q_len, _ = hidden_states.size()

Expand Down

0 comments on commit f79151b

Please sign in to comment.