From 30c75e6d41ec5e817c0020e6193fc42eab2cf98d Mon Sep 17 00:00:00 2001 From: sshah229 Date: Wed, 21 Jan 2026 02:40:25 -0700 Subject: [PATCH] fixed parameters (finetune language, vision, attention layers, and mlp_modules) not updating --- cli/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/config.py b/cli/config.py index 42169019ed..b6bc8dc999 100644 --- a/cli/config.py +++ b/cli/config.py @@ -77,9 +77,11 @@ class Config(BaseModel): """Return kwargs for trainer.prepare_model_for_training().""" # Determine target modules based on model type if use_lora and is_vision: - target_modules = "all-linear" if self.lora.vision_all_linear else [] + # Vision models expect a string (e.g., "all-linear"); fall back to None to use trainer defaults + target_modules = "all-linear" if self.lora.vision_all_linear else None else: - target_modules = [m.strip() for m in self.lora.target_modules.split(",") if m.strip()] + parsed = [m.strip() for m in str(self.lora.target_modules).split(",") if m and m.strip()] + target_modules = parsed or None return { "use_lora": use_lora,