Merge the LoRa regularization with the weight matrix.
(self)
| 91 | return output * scale |
| 92 | |
| 93 | def merge(self): |
| 94 | """ |
| 95 | Merge the LoRa regularization with the weight matrix. |
| 96 | |
| 97 | """ |
| 98 | if not self.merged and self.rank > 0: |
| 99 | self.weight.data += (self.lora_b @ self.lora_a) * self.scaling |
| 100 | self.merged = True |
nothing calls this directly
no outgoing calls
no test coverage detected