Skip to content

Commit

Permalink
Finetune support continue_training (#8615)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianhaodongbd committed Jun 18, 2024
1 parent 307960c commit cbd0ab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions llm/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ class ModelArgument:
attention_probs_dropout_prob: float = field(default=0.1, metadata={"help": "The attention hidden dropout prob."})

continue_training: bool = field(
default=False,
default=True,
metadata={
"help": "Pre-training from existing paddlenlp model weights. Default False and model will train from scratch. If set True, the model_name_or_path argument must exist in the paddlenlp models."
"help": "Whether to train from existing paddlenlp model weights. If set True, the model_name_or_path argument must exist in the paddlenlp models."
},
)
weight_quantize_algo: str = field(
Expand Down
2 changes: 1 addition & 1 deletion llm/finetune_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def main():

model_class = AutoModelForCausalLMPipe

if not training_args.autotuner_benchmark:
if model_args.continue_training and not training_args.autotuner_benchmark:
model = model_class.from_pretrained(
model_args.model_name_or_path,
config=model_config,
Expand Down

0 comments on commit cbd0ab3

Please sign in to comment.