Skip to content

Commit

Permalink
update chatglm loss0 #125
Browse files Browse the repository at this point in the history
  • Loading branch information
shibing624 committed Jul 28, 2023
1 parent 8404c07 commit 94cc017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pretraining.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ def main():
model.print_trainable_parameters()
else:
logger.info("Full parameters training")
if model_args.model_type in ['chatglm']:
model = model.half()
model = model.float()
print_trainable_parameters(model)

# Preprocessing the datasets.
Expand Down
3 changes: 1 addition & 2 deletions supervised_finetuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,7 @@ def preprocess_function(examples):
model.print_trainable_parameters()
else:
logger.info("Fine-tuning method: Full parameters training")
if model_args.model_type in ['chatglm']:
model = model.half()
model = model.float()
print_trainable_parameters(model)
logger.debug(f"Model: {model}")

Expand Down

0 comments on commit 94cc017

Please sign in to comment.