(self, **kwargs)
| 297 | ) |
| 298 | proxy_module.weight = target_param |
| 299 | module_obj = cls("", proxy_module, *args, **kwargs) |
| 300 | module_obj.forward = module_obj.parametrize_forward |
| 301 | module_obj.to(target_param) |
| 302 | parametrize.register_parametrization(org_module, attr, module_obj) |
| 303 | return module_obj |
| 304 | |
| 305 | @classmethod |
| 306 | def algo_check(cls, state_dict, lora_name): |
| 307 | return any(f"{lora_name}.{k}" in state_dict for k in cls.weight_list_det) |
| 308 | |
| 309 | @classmethod |
| 310 | def extract_state_dict(cls, state_dict, lora_name): |
| 311 | return [state_dict.get(f"{lora_name}.{k}", None) for k in cls.weight_list] |
| 312 | |
| 313 | @classmethod |
| 314 | def make_module_from_state_dict(cls, lora_name, orig_module, *weights): |
| 315 | raise NotImplementedError |
| 316 | |
| 317 | @property |
| 318 | def dtype(self): |
nothing calls this directly
no outgoing calls
no test coverage detected