Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
POI-WX committed Mar 14, 2024
1 parent 21698b1 commit 204bd1b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions deeplink_ext/internlm_ops/mha/mha.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ def forward(
self.softmax_scale,
causal if causal is not None else self.causal,
)
else:
# unpadded
return DeepLinkMultiHeadAttentionVarLenKVPackedFunc.apply(
q,
kv,
cu_seqlens,
cu_seqlens_k,
max_seqlen,
max_seqlen_k,
self.dropout_p if self.training else 0.0,
self.softmax_scale,
causal if causal is not None else self.causal,
False,
)
# else:
# # unpadded
# return DeepLinkMultiHeadAttentionVarLenKVPackedFunc.apply(
# q,
# kv,
# cu_seqlens,
# cu_seqlens_k,
# max_seqlen,
# max_seqlen_k,
# self.dropout_p if self.training else 0.0,
# self.softmax_scale,
# causal if causal is not None else self.causal,
# False,
# )

0 comments on commit 204bd1b

Please sign in to comment.