fix: normalize target_modules [all-linear] list to string for Unsloth/PEFT compatibility
This commit is contained in:
parent
d2332622d1
commit
0d8b67b706
1 changed files with 6 additions and 0 deletions
|
|
@ -254,6 +254,12 @@ class UnslothTrainer:
|
|||
print(f"Configuring LoRA adapters (r={lora_r}, alpha={lora_alpha})...\n")
|
||||
print(f"Gradient checkpointing: {use_gradient_checkpointing} (type: {type(use_gradient_checkpointing).__name__})\n")
|
||||
|
||||
# Normalize ["all-linear"] (list from frontend/YAML) → "all-linear" (string)
|
||||
# Unsloth/PEFT expect the string form for this shorthand
|
||||
if target_modules == ["all-linear"]:
|
||||
target_modules = "all-linear"
|
||||
print(f" Normalized target_modules from list to string: '{target_modules}'")
|
||||
|
||||
# Branch based on vision vs text
|
||||
if self.is_vlm:
|
||||
# Vision model LoRA
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue