Bläddra i källkod

Update utils_llama.py

Allen 1 år sedan
förälder
incheckning
0832c0620c
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      research/long-context-llama/H2O/utils_llama.py

+ 2 - 2
research/long-context-llama/H2O/utils_llama.py

@@ -193,8 +193,8 @@ class H2OLlamaAttention(nn.Module):
             if self.layer_idx == 0:
                 print(kv_seq_len, query_position_ids, key_position_ids)
 
-            query_states = apply_rotary_pos_emb_single(query_states, cos, sin, query_position_ids)
-            key_states = apply_rotary_pos_emb_single(key_states, cos, sin, key_position_ids)
+            query_states = apply_rotary_pos_emb_single(query_states, query_cos, query_sin, query_position_ids)
+            key_states = apply_rotary_pos_emb_single(key_states, key_cos, key_sin, key_position_ids)
 
         key_states = repeat_kv(key_states, self.num_key_value_groups)
         value_states = repeat_kv(value_states, self.num_key_value_groups)