File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2307,7 +2307,6 @@ def unload_lora_weights(self):
23072307                            in_features ,
23082308                            out_features ,
23092309                            bias = bias ,
2310-                             device = module_weight .device ,
23112310                            dtype = module_weight .dtype ,
23122311                        )
23132312
@@ -2423,6 +2422,8 @@ def _maybe_expand_transformer_param_shape_or_error_(
24232422                    logger .info (f"Set the { attribute_name } { new_value } { old_value }  )
24242423
24252424                    # For `unload_lora_weights()`. 
2425+                     # TODO: this could lead to more memory overhead if the number of overwritten params 
2426+                     # are large. Should be revisited later and tackled through a `discard_original_layers` arg. 
24262427                    overwritten_params [f"{ current_module_name }  ] =  module_weight 
24272428                    if  module_bias  is  not None :
24282429                        overwritten_params [f"{ current_module_name }  ] =  module_bias 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments