Skip to content

Commit a5bd107

Browse files
author
Xinyu
committed
update
1 parent ddab3fd commit a5bd107

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

ape/ape_gemma.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def gemma_attention_prefill_prefix(
3939
query_states = query_states.view(bsz, q_len, self.num_heads, self.head_dim).transpose(1, 2)
4040
key_states = key_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
4141
value_states = value_states.view(bsz, q_len, self.num_key_value_heads, self.head_dim).transpose(1, 2)
42-
print(query_states.shape, key_states.shape, value_states.shape)
4342

4443
cos, sin = self.rotary_emb(value_states, position_ids)
4544
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin, position_ids)

demo_ape.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,24 @@ def enable_attention_prefill_prefix(model_name, model):
5858

5959
def enable_attention_prefill_context(model_name, model):
6060
if "llama" in args.model:
61-
from src.ape_llama import enable_llama_attention_prefill_context
61+
from ape.ape_llama import enable_llama_attention_prefill_context
6262
enable_llama_attention_prefill_context(model)
6363
elif "mistral" in model_name:
64-
from src.ape_mistral import enable_mistral_attention_prefill_context
64+
from ape.ape_mistral import enable_mistral_attention_prefill_context
6565
enable_mistral_attention_prefill_context(model)
6666
elif "gemma" in model_name:
67-
from src.ape_gemma import enable_gemma_attention_prefill_context
67+
from ape.ape_gemma import enable_gemma_attention_prefill_context
6868
enable_gemma_attention_prefill_context(model)
6969

7070
def enable_attention_prefill_query(model_name, model, temperature, scale):
7171
if "llama" in args.model:
72-
from src.ape_llama import enable_llama_attention_prefill_query
72+
from ape.ape_llama import enable_llama_attention_prefill_query
7373
enable_llama_attention_prefill_query(model, temperature, scale)
7474
elif "mistral" in model_name:
75-
from src.ape_mistral import enable_mistral_attention_prefill_query
75+
from ape.ape_mistral import enable_mistral_attention_prefill_query
7676
enable_mistral_attention_prefill_query(model, temperature, scale)
7777
elif "gemma" in model_name:
78-
from src.ape_gemma import enable_gemma_attention_prefill_query
78+
from ape.ape_gemma import enable_gemma_attention_prefill_query
7979
enable_gemma_attention_prefill_query(model, temperature, scale)
8080

8181
def seed_everything(seed):

0 commit comments

Comments
 (0)