don't automatically enable lora kernels for RL training (#2600)

This commit is contained in:
Wing Lian
2025-04-30 11:06:50 -04:00
committed by GitHub
parent fc79606b6d
commit 8446b4ad28

View File

@@ -1319,6 +1319,9 @@ class AxolotlConfigWCapabilities(AxolotlInputConfig):
@classmethod
def check_auto_enable_lora_kernels(cls, data):
# Only proceed if using LoRA or QLoRA adapter
if data.get("rl"):
# RL trainers not tested so don't enable kernels by default
return data
if data.get("adapter") in ["lora", "qlora"]:
# Skip if already set, using unsloth optimizations, or using 8-bit
unsloth_fields = ["unsloth_lora_mlp", "unsloth_lora_qkv", "unsloth_lora_o"]