File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,14 +180,15 @@ def train(
180180 module in (peft_config .target_modules or [])
181181 for module in restricted_modules
182182 )
183+ and fast_moe_config .fast_moe is not None
183184 ):
184185 raise ValueError (
185186 "`--fast_moe` with LoRA does not currently support `all-linear`, as "
186187 "target modules at this time. Please explicitly specify target "
187188 "modules when using `--fast_moe` with LoRA."
188189 )
189190 # If other common non-linear modules, raise warning
190- if peft_config is not None and hasattr (peft_config , "target_modules" ):
191+ if peft_config is not None and hasattr (peft_config , "target_modules" ) and fast_moe_config . fast_moe is not None :
191192 logger .warning (
192193 "You are running lora with the ScatterMoE plugin, please note that "
193194 "passing target modules that are part of the moe module can cause unexpected "
You can’t perform that action at this time.
0 commit comments