Update fast_lora.py

This commit is contained in:
Daniel Han-Chen 2024-01-26 20:06:52 +11:00
commit 694da2dba3

View file

@ -125,6 +125,7 @@ class LoRA_MLP(torch.autograd.Function):
DW = matmul_lora(dY, downW.t(), downW_quant, downB, downA, downS)
se = torch.nn.functional.sigmoid(e)
f = torch.nn.functional.silu(e)
h = f * g
DW_f = DW * f
DW_dfg = DW * se * g * (1 + f * (1 - se))
# f = e * se