Skip to content

Commit fb96386

Browse files
committed
unify code.
1 parent 644107c commit fb96386

File tree

4 files changed

+0
-50
lines changed

4 files changed

+0
-50
lines changed

lmdeploy/pytorch/kernels/maca/pagedattention.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def prefill_attention(
3030
value_states,
3131
q_start_loc,
3232
q_seq_len,
33-
kv_seq_len,
3433
max_q_seq_len,
35-
max_kv_seq_len,
3634
num_q_heads,
3735
num_kv_heads,
3836
attn_mask,

lmdeploy/pytorch/models/internlm2.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def __init__(self,
4040
)
4141

4242
# rotary embedding
43-
# import pdb; pdb.set_trace()
4443
self.apply_rotary_pos_emb = ApplyRotaryEmb()
4544

4645
# attention
@@ -75,8 +74,6 @@ def forward(
7574
qkv_states)
7675

7776
# apply rotary embedding
78-
# import pdb; pdb.set_trace()
79-
8077
cos, sin = rotary_pos_emb
8178
query_states, key_states = self.apply_rotary_pos_emb(
8279
query_states,
@@ -85,7 +82,6 @@ def forward(
8582
sin,
8683
inplace=True,
8784
)
88-
# import pdb; pdb.set_trace()
8985

9086
# attention
9187
attn_output = self.attn_fwd(
@@ -97,13 +93,8 @@ def forward(
9793
attn_metadata,
9894
inplace=True,
9995
)
100-
# import pdb; pdb.set_trace()
101-
10296
attn_output = attn_output.reshape(*hidden_states.shape[:-1], -1)
10397

104-
is_decoding = query_states.shape[0] == 1
105-
# if is_decoding:
106-
# import pdb; pdb.set_trace()
10798
# o proj
10899
attn_output = self.wo(attn_output)
109100
return attn_output
@@ -159,7 +150,6 @@ def __init__(self,
159150
super().__init__()
160151
self.layer_idx = layer_idx
161152
quantization_config = getattr(config, 'quantization_config', None)
162-
# import pdb; pdb.set_trace()
163153

164154
# build attention layer
165155
self.attention = InternLM2Attention(config, dtype=dtype, device=device)
@@ -197,8 +187,6 @@ def forward(
197187
hidden_states, residual = self.attention_norm(
198188
hidden_states, residual)
199189

200-
# import pdb; pdb.set_trace()
201-
202190
# Self Attention
203191
hidden_states = self.attention(
204192
hidden_states=hidden_states,

lmdeploy/pytorch/models/patch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ def build_model_from_hf_config(model_config: PretrainedConfig,
188188
if device is None:
189189
device = torch.device('cuda')
190190
model_cls = _get_model_class(model_config, module_map)
191-
# import pdb; pdb.set_trace()
192191
model = model_cls(model_config, ctx_mgr, dtype=dtype, device=device)
193192
return model.eval()
194193

test_qwen.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)