fix
This commit is contained in:
parent
c2297b89d3
commit
ef5dac7786
@ -27,9 +27,6 @@ class NetworkModuleHada(network_lyco.NetworkModuleLyco):
|
|||||||
self.t1 = weights.w.get("hada_t1")
|
self.t1 = weights.w.get("hada_t1")
|
||||||
self.t2 = weights.w.get("hada_t2")
|
self.t2 = weights.w.get("hada_t2")
|
||||||
|
|
||||||
self.alpha = weights.w["alpha"].item() if "alpha" in weights.w else None
|
|
||||||
self.scale = weights.w["scale"].item() if "scale" in weights.w else None
|
|
||||||
|
|
||||||
def calc_updown(self, orig_weight):
|
def calc_updown(self, orig_weight):
|
||||||
w1a = self.w1a.to(orig_weight.device, dtype=orig_weight.dtype)
|
w1a = self.w1a.to(orig_weight.device, dtype=orig_weight.dtype)
|
||||||
w1b = self.w1b.to(orig_weight.device, dtype=orig_weight.dtype)
|
w1b = self.w1b.to(orig_weight.device, dtype=orig_weight.dtype)
|
||||||
|
@ -271,6 +271,7 @@ def network_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn
|
|||||||
updown = torch.nn.functional.pad(updown, (0, 0, 0, 0, 0, 5))
|
updown = torch.nn.functional.pad(updown, (0, 0, 0, 0, 0, 5))
|
||||||
|
|
||||||
self.weight += updown
|
self.weight += updown
|
||||||
|
continue
|
||||||
|
|
||||||
module_q = net.modules.get(network_layer_name + "_q_proj", None)
|
module_q = net.modules.get(network_layer_name + "_q_proj", None)
|
||||||
module_k = net.modules.get(network_layer_name + "_k_proj", None)
|
module_k = net.modules.get(network_layer_name + "_k_proj", None)
|
||||||
|
Loading…
Reference in New Issue
Block a user