mirror of
https://github.com/wassname/peft.git
synced 2026-09-09 11:28:32 +08:00
Update src/peft/mapping.py
Co-authored-by: Sourab Mangrulkar <13534540+pacman100@users.noreply.github.com>
This commit is contained in:
co-authored by
Sourab Mangrulkar
parent
9a534d047c
commit
d892beb0e7
@@ -150,9 +150,6 @@ def _prepare_adalora_config(peft_config, model_config):
|
||||
if model_config["model_type"] not in TRANSFORMERS_MODELS_TO_ADALORA_TARGET_MODULES_MAPPING:
|
||||
raise ValueError("Please specify `target_modules` in `peft_config`")
|
||||
peft_config.target_modules = TRANSFORMERS_MODELS_TO_ADALORA_TARGET_MODULES_MAPPING[model_config["model_type"]]
|
||||
if len(peft_config.target_modules) == 1:
|
||||
peft_config.fan_in_fan_out = True
|
||||
# peft_config.enable_lora = [True, False, True]
|
||||
if peft_config.inference_mode:
|
||||
peft_config.merge_weights = True
|
||||
return peft_config
|
||||
|
||||
Reference in New Issue
Block a user