[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:
co-authored by
ShenAo1111
zhaochenyang20
parent
ac05310098
commit
e79f7420be
@@ -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")}
|
||||
|
||||
Reference in New Issue
Block a user