File tree 1 file changed +3
-4
lines changed 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(
114
114
is_bias whether the tensor is lora bias.
115
115
"""
116
116
117
- # LoRA weight qualified name usually start with `base_model.model.`,
117
+ # LoRA weight qualified name usually starts with `base_model.model.`,
118
118
# so we remove the prefix `base_model.model.` to make the following
119
119
# mapping correctly.
120
120
if "base_model.model." in name :
@@ -123,9 +123,8 @@ def parse_fine_tuned_lora_name(
123
123
# recover the prefix `base_model.model.`
124
124
name = "base_model.model." + name
125
125
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.
129
128
start_index = 2 if "base_model.model." in name else 0
130
129
131
130
parts = name .split ("." )
You can’t perform that action at this time.
0 commit comments