Unverified Commit 0b59ecde authored by regisss's avatar regisss Committed by GitHub
Browse files

Display the number of trainable parameters when lauching a training (#19835)

parent 536f3384
...@@ -1611,6 +1611,9 @@ class Trainer: ...@@ -1611,6 +1611,9 @@ class Trainer:
logger.info(f" Total train batch size (w. parallel, distributed & accumulation) = {total_train_batch_size}") logger.info(f" Total train batch size (w. parallel, distributed & accumulation) = {total_train_batch_size}")
logger.info(f" Gradient Accumulation steps = {args.gradient_accumulation_steps}") logger.info(f" Gradient Accumulation steps = {args.gradient_accumulation_steps}")
logger.info(f" Total optimization steps = {max_steps}") logger.info(f" Total optimization steps = {max_steps}")
logger.info(
f" Number of trainable parameters = {sum(p.numel() for p in model.parameters() if p.requires_grad)}"
)
self.state.epoch = 0 self.state.epoch = 0
start_time = time.time() start_time = time.time()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment