Fix LoKR refactor bug

This commit is contained in:
Sergey Borisov 2024-08-06 04:16:21 +03:00 committed by Kent Keirsey
parent 6cd40965c4
commit 7da6120b39

View File

@ -218,13 +218,19 @@ class LoKRLayer(LoRALayerBase):
self.w1 = values.get("lokr_w1", None)
if self.w1 is None:
self.w1_a = values["lokr_w1_a"]
self.w1_b = values["lokr_w1_b"]
self.w1_a = values.get("lokr_w1_a", None)
self.w1_b = values.get("lokr_w1_b", None)
else:
self.w1_b = None
self.w1_a = None
self.w2 = values.get("lokr_w2", None)
if self.w2 is None:
self.w2_a = values["lokr_w2_a"]
self.w2_b = values["lokr_w2_b"]
else:
self.w2_a = None
self.w2_b = None
self.t2 = values.get("lokr_t2", None)