[Fix] Fix bugs and refactor codes in lora for better scalability. (#3652)

Co-authored-by: ShenAo1111 <1377693092@qq.com>
Co-authored-by: zhaochenyang20 <zhaochen20@outlook.com>
This commit is contained in:
aoshen524
2025-02-20 11:51:57 -08:00
committed by GitHub
co-authored by ShenAo1111 zhaochenyang20
parent ac05310098
commit e79f7420be
11 changed files with 459 additions and 200 deletions
+1 -3
View File
@@ -76,9 +76,7 @@ class LoRAManager:
self.hf_target_names: Set[str] = set()
for name, path in self.lora_paths.items():
self.configs[name] = LoRAConfig(path)
self.hf_target_names = set(self.hf_target_names) | set(
self.configs[name].target_modules
)
self.hf_target_names.update(self.configs[name].target_modules)
# Target lora weight names for lora_a and lora_b modules repectively.
# e.g., {("qkv_proj", "q_proj"), ("qkv_proj", "kv_proj")}