MCPcopy Create free account
hub / github.com/kyegomez/BitNet / merge

Method merge

bitnet/bit_lora.py:93–100  ·  view source on GitHub ↗

Merge the LoRa regularization with the weight matrix.

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected