File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ def parse_fine_tuned_lora_name(
114114            is_bias whether the tensor is lora bias. 
115115    """ 
116116
117-     # LoRA weight qualified name usually start  with `base_model.model.`, 
117+     # LoRA weight qualified name usually starts  with `base_model.model.`, 
118118    # so we remove the prefix `base_model.model.` to make the following 
119119    # mapping correctly. 
120120    if  "base_model.model."  in  name :
@@ -123,9 +123,8 @@ def parse_fine_tuned_lora_name(
123123        # recover the prefix `base_model.model.` 
124124        name  =  "base_model.model."  +  name 
125125
126-     # In some situations, we may not start with `base_model.model.`, depending 
127-     # on if the model is intended to be loaded through the transformers peft 
128-     # integration; if it's the latter, we should take the whole prefix. 
126+     # In some situations, we may not start with `base_model.model.`. 
127+     # If we don't, we should keep the prefix intact. 
129128    start_index  =  2  if  "base_model.model."  in  name  else  0 
130129
131130    parts  =  name .split ("." )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments