Update llama.py
This commit is contained in:
parent
83a2d4282c
commit
083ee86d89
1 changed files with 1 additions and 0 deletions
|
|
@ -449,6 +449,7 @@ def LlamaAttention_fast_forward(
|
|||
else:
|
||||
# Grouped query attention
|
||||
if SDPA_HAS_GQA:
|
||||
print("=====================")
|
||||
# Needs (batch_size, n_heads, seq_len, head_dim)
|
||||
# is_casual and attention_mask must not be both set!
|
||||
A = scaled_dot_product_attention(Q, K, V, attn_mask = attention_mask, is_causal = False, enable_gqa = n_groups != 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue