Update fast_lora.py
This commit is contained in:
parent
b8de6b6a9b
commit
259097bc61
1 changed files with 5 additions and 0 deletions
|
|
@ -178,6 +178,11 @@ pass
|
|||
|
||||
|
||||
def apply_lora_mlp(self, X):
|
||||
gate = self.gate_proj(X)
|
||||
up = self. up_proj(X)
|
||||
h = torch.nn.functional.silu(gate) * up
|
||||
down = self.down_proj(h)
|
||||
return down
|
||||
gateW, gateW_quant, gateA, gateB, gateS = get_lora_parameters(self.gate_proj)
|
||||
upW, upW_quant, upA, upB, upS = get_lora_parameters(self. up_proj)
|
||||
downW, downW_quant, downA, downB, downS = get_lora_parameters(self.down_proj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue