-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix_generate
- Loading branch information
Showing
18 changed files
with
559 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=tr11b_move_to_tar # job name | ||
#SBATCH --ntasks=1 # number of MP tasks | ||
#SBATCH --nodes=1 | ||
#SBATCH --cpus-per-task=4 # number of cores per tasks | ||
#SBATCH --hint=nomultithread # we get physical cores not logical | ||
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | ||
#SBATCH --output=logs/%x-%j.out # output file name | ||
#SBATCH --account=six@cpu | ||
#SBATCH --array=0-1362%1 | ||
#SBATCH --partition=cpu_p1 | ||
|
||
# DEBUG | ||
# SLURM_ARRAY_TASK_ID=0 # 0-6549 | ||
|
||
pushd $six_ALL_CCFRWORK/checkpoints | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11[a-z].*/global_step[0-9]*') | ||
# DEBUG regex to test out only on tr11e-350 | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*') | ||
# batch size 512 -> one out of 4 checkpoints for 1B tokens | ||
readarray CHECKPOINTS < <(find . -regex '\./tr11b-1B3-ml/.*/global_step[0-9]*000') | ||
|
||
echo "Total number of checkpoints to tar: ${#CHECKPOINTS[@]}" | ||
|
||
CHECKPOINT_TO_TAR=${CHECKPOINTS[$SLURM_ARRAY_TASK_ID]} | ||
echo "Checkpoint to tar: $CHECKPOINT_TO_TAR" | ||
|
||
TEMPNAME=$(dirname $CHECKPOINT_TO_TAR) | ||
DIRNAME=${TEMPNAME:2} | ||
BASENAME=$(basename $CHECKPOINT_TO_TAR) | ||
|
||
CHECKPOINT_TO_TAR=$DIRNAME/$BASENAME | ||
CHECKPOINT_TAR_TO_FOLDER=$six_ALL_CCFRSTORE/checkpoints/$DIRNAME | ||
CHECKPOINT_TAR_TO=$CHECKPOINT_TAR_TO_FOLDER/$BASENAME.tar | ||
|
||
mkdir -p $CHECKPOINT_TAR_TO_FOLDER | ||
echo $CHECKPOINT_TO_TAR | ||
echo $CHECKPOINT_TAR_TO_FOLDER | ||
|
||
# cvfj for bz2 compression; won't change much | ||
tar cvf $CHECKPOINT_TAR_TO $CHECKPOINT_TO_TAR | ||
|
||
popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=tr11c_move_to_tar # job name | ||
#SBATCH --ntasks=1 # number of MP tasks | ||
#SBATCH --nodes=1 | ||
#SBATCH --cpus-per-task=4 # number of cores per tasks | ||
#SBATCH --hint=nomultithread # we get physical cores not logical | ||
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | ||
#SBATCH --output=logs/%x-%j.out # output file name | ||
#SBATCH --account=six@cpu | ||
#SBATCH --array=0-239%1 | ||
#SBATCH --partition=cpu_p1 | ||
|
||
# DEBUG | ||
# SLURM_ARRAY_TASK_ID=0 # 0-6549 | ||
|
||
pushd $six_ALL_CCFRWORK/checkpoints | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11[a-z].*/global_step[0-9]*') | ||
# DEBUG regex to test out only on tr11e-350 | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*') | ||
# batch size 512 -> one out of 4 checkpoints for 1B tokens | ||
readarray CHECKPOINTS < <(find . -regex '\./tr11c-2B5-ml/.*/global_step[0-9]*000') | ||
|
||
echo "Total number of checkpoints to tar: ${#CHECKPOINTS[@]}" | ||
|
||
CHECKPOINT_TO_TAR=${CHECKPOINTS[$SLURM_ARRAY_TASK_ID]} | ||
echo "Checkpoint to tar: $CHECKPOINT_TO_TAR" | ||
|
||
TEMPNAME=$(dirname $CHECKPOINT_TO_TAR) | ||
DIRNAME=${TEMPNAME:2} | ||
BASENAME=$(basename $CHECKPOINT_TO_TAR) | ||
|
||
CHECKPOINT_TO_TAR=$DIRNAME/$BASENAME | ||
CHECKPOINT_TAR_TO_FOLDER=$six_ALL_CCFRSTORE/checkpoints/$DIRNAME | ||
CHECKPOINT_TAR_TO=$CHECKPOINT_TAR_TO_FOLDER/$BASENAME.tar | ||
|
||
mkdir -p $CHECKPOINT_TAR_TO_FOLDER | ||
echo $CHECKPOINT_TO_TAR | ||
echo $CHECKPOINT_TAR_TO | ||
|
||
# cvfj for bz2 compression; won't change much | ||
tar cvf $CHECKPOINT_TAR_TO $CHECKPOINT_TO_TAR | ||
|
||
popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=tr11d_move_to_tar # job name | ||
#SBATCH --ntasks=1 # number of MP tasks | ||
#SBATCH --nodes=1 | ||
#SBATCH --cpus-per-task=4 # number of cores per tasks | ||
#SBATCH --hint=nomultithread # we get physical cores not logical | ||
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | ||
#SBATCH --output=logs/%x-%j.out # output file name | ||
#SBATCH --account=six@cpu | ||
#SBATCH --array=0-166%1 | ||
#SBATCH --partition=cpu_p1 | ||
|
||
# DEBUG | ||
# SLURM_ARRAY_TASK_ID=0 # 0-6549 | ||
|
||
pushd $six_ALL_CCFRWORK/checkpoints | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11[a-z].*/global_step[0-9]*') | ||
# DEBUG regex to test out only on tr11e-350 | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*') | ||
# batch size 256 -> one out of 8 checkpoints for 1B tokens | ||
readarray CHECKPOINTS < <(find . -regex '\./tr11d-760M-ml/.*/global_step[0-9]*[02468]000') | ||
|
||
echo "Total number of checkpoints to tar: ${#CHECKPOINTS[@]}" | ||
|
||
CHECKPOINT_TO_TAR=${CHECKPOINTS[$SLURM_ARRAY_TASK_ID]} | ||
echo "Checkpoint to tar: $CHECKPOINT_TO_TAR" | ||
|
||
TEMPNAME=$(dirname $CHECKPOINT_TO_TAR) | ||
DIRNAME=${TEMPNAME:2} | ||
BASENAME=$(basename $CHECKPOINT_TO_TAR) | ||
|
||
CHECKPOINT_TO_TAR=$DIRNAME/$BASENAME | ||
CHECKPOINT_TAR_TO_FOLDER=$six_ALL_CCFRSTORE/checkpoints/$DIRNAME | ||
CHECKPOINT_TAR_TO=$CHECKPOINT_TAR_TO_FOLDER/$BASENAME.tar | ||
|
||
mkdir -p $CHECKPOINT_TAR_TO_FOLDER | ||
echo $CHECKPOINT_TO_TAR | ||
echo $CHECKPOINT_TAR_TO | ||
|
||
# cvfj for bz2 compression; won't change much | ||
tar cvf $CHECKPOINT_TAR_TO $CHECKPOINT_TO_TAR | ||
|
||
popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=move_to_tar # job name | ||
#SBATCH --ntasks=1 # number of MP tasks | ||
#SBATCH --nodes=1 | ||
#SBATCH --cpus-per-task=4 # number of cores per tasks | ||
#SBATCH --hint=nomultithread # we get physical cores not logical | ||
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | ||
#SBATCH --output=logs/%x-%j.out # output file name | ||
#SBATCH --account=six@cpu | ||
#SBATCH --array=0-276%1 | ||
#SBATCH --partition=cpu_p1 | ||
|
||
# DEBUG | ||
# SLURM_ARRAY_TASK_ID=0 # 0-6549 | ||
|
||
pushd $six_ALL_CCFRWORK/checkpoints | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11[a-z].*/global_step[0-9]*') | ||
# DEBUG regex to test out only on tr11e-350 | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*') | ||
# batch size 256 -> one out of 8 checkpoints for 1B tokens | ||
readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*[02468]000') | ||
|
||
echo "Total number of checkpoints to tar: ${#CHECKPOINTS[@]}" | ||
|
||
CHECKPOINT_TO_TAR=${CHECKPOINTS[$SLURM_ARRAY_TASK_ID]} | ||
echo "Checkpoint to tar: $CHECKPOINT_TO_TAR" | ||
|
||
TEMPNAME=$(dirname $CHECKPOINT_TO_TAR) | ||
DIRNAME=${TEMPNAME:2} | ||
BASENAME=$(basename $CHECKPOINT_TO_TAR) | ||
|
||
CHECKPOINT_TO_TAR=$DIRNAME/$BASENAME | ||
CHECKPOINT_TAR_TO_FOLDER=$six_ALL_CCFRSTORE/checkpoints/$DIRNAME | ||
CHECKPOINT_TAR_TO=$CHECKPOINT_TAR_TO_FOLDER/$BASENAME.tar | ||
|
||
mkdir -p $CHECKPOINT_TAR_TO_FOLDER | ||
echo $CHECKPOINT_TO_TAR | ||
echo $CHECKPOINT_TAR_TO | ||
|
||
# cvfj for bz2 compression; won't change much | ||
tar cvf $CHECKPOINT_TAR_TO $CHECKPOINT_TO_TAR | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=tr11f_move_to_tar # job name | ||
#SBATCH --ntasks=1 # number of MP tasks | ||
#SBATCH --nodes=1 | ||
#SBATCH --cpus-per-task=4 # number of cores per tasks | ||
#SBATCH --hint=nomultithread # we get physical cores not logical | ||
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | ||
#SBATCH --output=logs/%x-%j.out # output file name | ||
#SBATCH --account=six@cpu | ||
#SBATCH --array=0-155%1 | ||
#SBATCH --partition=cpu_p1 | ||
|
||
# DEBUG | ||
# SLURM_ARRAY_TASK_ID=0 # 0-6549 | ||
|
||
pushd $six_ALL_CCFRWORK/checkpoints | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11[a-z].*/global_step[0-9]*') | ||
# DEBUG regex to test out only on tr11e-350 | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*') | ||
# batch size 512 -> one out of 4 checkpoints for 1B tokens | ||
readarray CHECKPOINTS < <(find . -regex '\./tr11f-6B3-ml/.*/global_step[0-9]*000') | ||
|
||
echo "Total number of checkpoints to tar: ${#CHECKPOINTS[@]}" | ||
|
||
CHECKPOINT_TO_TAR=${CHECKPOINTS[$SLURM_ARRAY_TASK_ID]} | ||
echo "Checkpoint to tar: $CHECKPOINT_TO_TAR" | ||
|
||
TEMPNAME=$(dirname $CHECKPOINT_TO_TAR) | ||
DIRNAME=${TEMPNAME:2} | ||
BASENAME=$(basename $CHECKPOINT_TO_TAR) | ||
|
||
CHECKPOINT_TO_TAR=$DIRNAME/$BASENAME | ||
CHECKPOINT_TAR_TO_FOLDER=$six_ALL_CCFRSTORE/checkpoints/$DIRNAME | ||
CHECKPOINT_TAR_TO=$CHECKPOINT_TAR_TO_FOLDER/$BASENAME.tar | ||
|
||
mkdir -p $CHECKPOINT_TAR_TO_FOLDER | ||
echo $CHECKPOINT_TO_TAR | ||
echo $CHECKPOINT_TAR_TO | ||
|
||
# cvfj for bz2 compression; won't change much | ||
tar cvf $CHECKPOINT_TAR_TO $CHECKPOINT_TO_TAR | ||
|
||
popd | ||
|
45 changes: 45 additions & 0 deletions
45
jz/model_storage/move_first_150_checkpoints_to_store.slurm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=move_first_checkpoints_to_tar # job name | ||
#SBATCH --ntasks=1 # number of MP tasks | ||
#SBATCH --nodes=1 | ||
#SBATCH --cpus-per-task=4 # number of cores per tasks | ||
#SBATCH --hint=nomultithread # we get physical cores not logical | ||
#SBATCH --time=20:00:00 # maximum execution time (HH:MM:SS) | ||
#SBATCH --output=logs/%x-%j.out # output file name | ||
#SBATCH --account=six@cpu | ||
#SBATCH --partition=cpu_p1 | ||
|
||
# DEBUG | ||
# SLURM_ARRAY_TASK_ID=0 # 0-149 | ||
|
||
|
||
# you have to also pass --array=0-<desired_number>%1 as an sbatch flag to compress everything, eg sbatch --array=0-149%1 move_first_150_checkpoints_to_store.slurm tr11b-1B3-ml 150 | ||
|
||
pushd $six_ALL_CCFRWORK/checkpoints | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11[a-z].*/global_step[0-9]*') | ||
# DEBUG regex to test out only on tr11e-350 | ||
# readarray CHECKPOINTS < <(find . -regex '\./tr11e-350M-ml/.*/global_step[0-9]*') | ||
# batch size 512 -> first 150 checkpoints for 39B tokens, batch size 256 -> 300 | ||
readarray CHECKPOINTS < <(ls -v ./"${1}"/checkpoints/main/ | head -"${2}") | ||
|
||
echo "Total number of checkpoints to tar: ${#CHECKPOINTS[@]}" | ||
|
||
CHECKPOINT_TO_TAR="./${1}/checkpoints/main/${CHECKPOINTS[$SLURM_ARRAY_TASK_ID]}" | ||
echo "Checkpoint to tar: $CHECKPOINT_TO_TAR" | ||
|
||
TEMPNAME=$(dirname $CHECKPOINT_TO_TAR) | ||
DIRNAME=${TEMPNAME:2} | ||
BASENAME=$(basename $CHECKPOINT_TO_TAR) | ||
|
||
CHECKPOINT_TO_TAR=$DIRNAME/$BASENAME | ||
CHECKPOINT_TAR_TO_FOLDER=$six_ALL_CCFRSTORE/checkpoints/$DIRNAME | ||
CHECKPOINT_TAR_TO=$CHECKPOINT_TAR_TO_FOLDER/$BASENAME.tar | ||
|
||
mkdir -p $CHECKPOINT_TAR_TO_FOLDER | ||
echo $CHECKPOINT_TO_TAR | ||
echo $CHECKPOINT_TAR_TO_FOLDER | ||
|
||
# cvfj for bz2 compression; won't change much | ||
tar cvf $CHECKPOINT_TAR_TO $CHECKPOINT_TO_TAR | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.