Fix NameError and typo in ApplyRotaryEmbQKV_ (#569)
This commit is contained in:
parent
0a1d03c7ea
commit
4c8ff9154e
@ -193,16 +193,16 @@ class ApplyRotaryEmbQKV_(torch.autograd.Function):
|
|||||||
sin_k = sin if sin_k is None else sin_k
|
sin_k = sin if sin_k is None else sin_k
|
||||||
dq, dk = dqkv[:, :, 0], dqkv[:, :, 1]
|
dq, dk = dqkv[:, :, 0], dqkv[:, :, 1]
|
||||||
apply_rotary(
|
apply_rotary(
|
||||||
dq, cos, sin, seqlen_offsets, interleaved=interleaved, inplace=True, conjugate=True
|
dq, cos, sin, seqlen_offsets, interleaved=ctx.interleaved, inplace=True, conjugate=True
|
||||||
)
|
)
|
||||||
apply_rotary(
|
apply_rotary(
|
||||||
dk,
|
dk,
|
||||||
cos_k,
|
cos_k,
|
||||||
sin_k,
|
sin_k,
|
||||||
seqlen_offsets,
|
seqlen_offsets,
|
||||||
interleaved=interleaved,
|
interleaved=ctx.interleaved,
|
||||||
inplace=True,
|
inplace=True,
|
||||||
conjudate=True,
|
conjugate=True,
|
||||||
)
|
)
|
||||||
return dqkv, None, None, None, None, None, None
|
return dqkv, None, None, None, None, None, None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user