Hi, thanks for your work. I'm trying your fa2-cm but it raises error because of the following assertion:
assert do.is_contiguous()
assert q.stride() == k.stride() == v.stride() == o.stride() == do.stride()
I solve this problem by using .contiguous() as follows:
q = q.contiguous()
k = k.contiguous()
v = v.contiguous()
o = o.contiguous()
do = do.contiguous()
Another error is, it only supports fp16 inputs, so I convert q/k/v from fp32 to fp16, and convert the out from fp16 to fp32 after fa2.
After these corrections, I can run fa2-cm normally.
However, the results seem bad, because the gradients explode.
I want to ask the possible reasons. It's because of my aforementioned modifications?
Looking forward to your reply~
Hi, thanks for your work. I'm trying your fa2-cm but it raises error because of the following assertion:
I solve this problem by using
.contiguous()as follows:Another error is, it only supports fp16 inputs, so I convert q/k/v from fp32 to fp16, and convert the out from fp16 to fp32 after fa2.
After these corrections, I can run fa2-cm normally.
However, the results seem bad, because the gradients explode.
I want to ask the possible reasons. It's because of my aforementioned modifications?
Looking forward to your reply~