Skip to content

Commit

Permalink
fix python style checks
Browse files Browse the repository at this point in the history
  • Loading branch information
liu-shaojun committed Jun 26, 2024
1 parent 9798e05 commit 887ac64
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/llm/src/ipex_llm/transformers/models/qwen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,10 @@ def qwen2_attention_forward(
key_states = self.k_proj(hidden_states)
value_states = self.v_proj(hidden_states)
query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim) \
.transpose(1, 2)
value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim) \
.transpose(1, 2)

kv_seq_len = key_states.shape[-2]
if past_key_value is not None:
Expand Down

0 comments on commit 887ac64

Please sign in to comment.