Skip to content

Commit

Permalink
support transformers 4.34+ for llama (#9229)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangw1234 committed Oct 20, 2023
1 parent 7e96d3e commit 118249b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/llm/src/bigdl/llm/transformers/models/llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def llama_attention_forward_4_31(
past_key_value: Optional[Tuple[torch.Tensor]] = None,
output_attentions: bool = False,
use_cache: bool = False,
padding_mask: Optional[torch.LongTensor] = None,
**kwargs,
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
bsz, q_len, _ = hidden_states.size()
device = hidden_states.device
Expand Down

0 comments on commit 118249b

Please sign in to comment.