File tree Expand file tree Collapse file tree
PyTorch/LanguageModeling/BERT/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ throughput=`cat $LOGFILE | grep Iteration | tail -1 | awk -F'it/s' '{print $1}'
158158loss=` cat $LOGFILE | grep ' Average Loss' | tail -1 | awk -F' Average Loss =' ' {print $2}' | awk -F' ' ' {print $1}' | egrep -o [0-9.]+`
159159final_loss=` cat $LOGFILE | grep ' Total Steps' | tail -1 | awk -F' Final Loss =' ' {print $2}' | awk -F' ' ' {print $1}' | egrep -o [0-9.]+`
160160
161- train_perf=$( awk ' BEGIN {print (' $throughput ' * ' $num_gpus ' * ' $train_batch_size ' )}' )
161+ train_perf=$( awk ' BEGIN {print (' $throughput ' * ' $num_gpus ' * ' $train_batch_size ' / ' $gradient_accumulation_steps ' )}' )
162162echo " training throughput phase1: $train_perf sequences/second"
163163echo " average loss: $loss "
164164echo " final loss: $final_loss "
@@ -252,7 +252,8 @@ throughput=`cat $LOGFILE | grep Iteration | tail -1 | awk -F'it/s' '{print $1}'
252252loss=` cat $LOGFILE | grep ' Average Loss' | tail -1 | awk -F' Average Loss =' ' {print $2}' | awk -F' ' ' {print $1}' | egrep -o [0-9.]+`
253253final_loss=` cat $LOGFILE | grep ' Total Steps' | tail -1 | awk -F' Final Loss =' ' {print $2}' | awk -F' ' ' {print $1}' | egrep -o [0-9.]+`
254254
255- train_perf=$( awk ' BEGIN {print (' $throughput ' * ' $num_gpus ' * ' $train_batch_size_phase2 ' )}' )
255+ train_perf=$( awk ' BEGIN {print (' $throughput ' * ' $num_gpus ' * ' $train_batch_size_phase2 ' / ' $gradient_accumulation_steps_phase2 ' )}' )
256+
256257echo " training throughput phase2: $train_perf sequences/second"
257258echo " average loss: $loss "
258259echo " final loss: $final_loss "
You can’t perform that action at this time.
0 commit comments