pull/475/head
artek0chumak 10 months ago
parent 8c4523c1d1
commit e194bf34b4

@ -154,20 +154,18 @@ class AdapterContextMixin:
assert value == self.ADAPTER_NOT_SET, "active adapter can only be changed via .using_adapter" ""
BaseTunerLayer.active_adapter = AdapterContextMixin.active_adapter
using_adapter = AdapterContextMixin.using_adapter
class LoraLinear(lora.Linear, AdapterContextMixin):
class LoraLinear(AdapterContextMixin, lora.Linear):
"""LoRA linear layer that uses adapter selected via using_adapter"""
class LoraLinear8bitLt(lora.Linear8bitLt, AdapterContextMixin):
class LoraLinear8bitLt(AdapterContextMixin, lora.Linear8bitLt):
"""LoRA linear 8-bit with outliers that uses adapter selected via using_adapter"""
class LoraLinear4bit(lora.Linear4bit, AdapterContextMixin):
class LoraLinear4bit(AdapterContextMixin, lora.Linear4bit):
"""LoRA linear 4-bit that uses adapter selected via using_adapter"""

Loading…
Cancel
Save