mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-16 00:28:10 +08:00
fix freeze tuning
Former-commit-id: e32a1db967da02f502559df59ec6d1ab4554febf
This commit is contained in:
parent
df71d98b37
commit
d659907f34
@ -237,7 +237,7 @@ class FinetuningArguments:
|
||||
self.lora_target = [target.strip() for target in self.lora_target.split(",")]
|
||||
|
||||
if self.num_layer_trainable > 0: # fine-tuning the last n layers if num_layer_trainable > 0
|
||||
trainable_layer_ids = [self.num_hidden_layers - k for k in range(self.num_layer_trainable)]
|
||||
trainable_layer_ids = [self.num_hidden_layers - k - 1 for k in range(self.num_layer_trainable)]
|
||||
else: # fine-tuning the first n layers if num_layer_trainable < 0
|
||||
trainable_layer_ids = [k for k in range(-self.num_layer_trainable)]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user