From 5b8fcab58f36610e78b144f9477094251f53ebff Mon Sep 17 00:00:00 2001 From: SuperSecureHuman Date: Fri, 17 Feb 2023 22:51:52 +0530 Subject: [PATCH 1/2] Fix port number in cifar model compression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The port number under the CIFAR Model Compression example exceeded the allowed range, possibly a typo—a fix. --- model_compression/cifar/run_compress.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model_compression/cifar/run_compress.sh b/model_compression/cifar/run_compress.sh index 8a4a7a71b..11dac36ed 100644 --- a/model_compression/cifar/run_compress.sh +++ b/model_compression/cifar/run_compress.sh @@ -11,7 +11,7 @@ python -m torch.distributed.launch --nproc_per_node=1 \ ### Step 2: compress: channel pruning ### you may enbale other compression methods, see ds_config.json or our compression tutorial python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66665 \ + --master_port 6665 \ train.py \ --deepspeed_config config/ds_config_channel_prune.json \ --deepspeed \ @@ -32,7 +32,7 @@ python -m torch.distributed.launch --nproc_per_node=1 \ #### Step 2: compress: channel pruning #### you may enbale other compression methods, see ds_config.json or our compression tutorial # python -m torch.distributed.launch --nproc_per_node=1 \ -# --master_port 66665 \ +# --master_port 6665 \ # train.py \ # --deepspeed_config config/ds_config_channel_prune.json \ # --deepspeed \ From 57c064b3dd6e12f08a7d42edc1ed45795976697f Mon Sep 17 00:00:00 2001 From: SuperSecureHuman Date: Fri, 17 Feb 2023 23:00:47 +0530 Subject: [PATCH 2/2] Fix port numbers under Model Compression --- model_compression/bert/bash_script/XTC/layer_reduction.sh | 4 ++-- .../bert/bash_script/XTC/layer_reduction_1bit.sh | 2 +- model_compression/bert/bash_script/XTC/quant_1bit.sh | 4 ++-- model_compression/bert/bash_script/ZeroQuant/zero_quant.sh | 4 ++-- .../bert/bash_script/ZeroQuant/zero_quant_lkd.sh | 2 +- model_compression/bert/bash_script/layer_reduction.sh | 2 +- model_compression/bert/bash_script/pruning_row.sh | 2 +- model_compression/bert/bash_script/pruning_sparse.sh | 2 +- model_compression/bert/bash_script/quant_activation.sh | 2 +- model_compression/bert/bash_script/quant_weight.sh | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/model_compression/bert/bash_script/XTC/layer_reduction.sh b/model_compression/bert/bash_script/XTC/layer_reduction.sh index b8af70200..dc68db445 100644 --- a/model_compression/bert/bash_script/XTC/layer_reduction.sh +++ b/model_compression/bert/bash_script/XTC/layer_reduction.sh @@ -18,7 +18,7 @@ mkdir -p ${SAVE_PATH} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66665 \ + --master_port 6665 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \ @@ -47,7 +47,7 @@ python -m torch.distributed.launch --nproc_per_node=1 \ # MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher # student_model=./out/XTC/layer_reduction/best/pytorch_model.bin # <====================================================================Need student model # python -m torch.distributed.launch --nproc_per_node=1 \ -# --master_port 66665 \ +# --master_port 6665 \ # run_glue_no_trainer.py \ # --pretrained_dir_student ${student_model} \ # --seed 42 \ diff --git a/model_compression/bert/bash_script/XTC/layer_reduction_1bit.sh b/model_compression/bert/bash_script/XTC/layer_reduction_1bit.sh index 12a40e05b..3ed8038b0 100644 --- a/model_compression/bert/bash_script/XTC/layer_reduction_1bit.sh +++ b/model_compression/bert/bash_script/XTC/layer_reduction_1bit.sh @@ -19,7 +19,7 @@ mkdir -p ${SAVE_PATH} MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher student_model=./out/XTC/layer_reduction/best/pytorch_model.bin # <====================================================================Need student model python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66664 \ + --master_port 6664 \ run_glue_no_trainer.py \ --pretrained_dir_student ${student_model} \ --seed 42 \ diff --git a/model_compression/bert/bash_script/XTC/quant_1bit.sh b/model_compression/bert/bash_script/XTC/quant_1bit.sh index b6c17861e..3f0a89aab 100644 --- a/model_compression/bert/bash_script/XTC/quant_1bit.sh +++ b/model_compression/bert/bash_script/XTC/quant_1bit.sh @@ -18,7 +18,7 @@ mkdir -p ${SAVE_PATH} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66664 \ + --master_port 6664 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \ @@ -43,7 +43,7 @@ python -m torch.distributed.launch --nproc_per_node=1 \ # TEACHER=/blob/users/xwu/compression/huggingface_models/bert-base-uncased-${TASK_NAME}/pytorch_model.bin # STUDENT=${TEACHER} # python -m torch.distributed.launch --nproc_per_node=1 \ -# --master_port 66667 \ +# --master_port 6667 \ # run_glue_no_trainer_clean.py \ # --seed 42 \ # --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/ZeroQuant/zero_quant.sh b/model_compression/bert/bash_script/ZeroQuant/zero_quant.sh index 71c638e0f..539fb60d7 100644 --- a/model_compression/bert/bash_script/ZeroQuant/zero_quant.sh +++ b/model_compression/bert/bash_script/ZeroQuant/zero_quant.sh @@ -14,7 +14,7 @@ mkdir -p ${SAVE_PATH} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66664 \ + --master_port 6664 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method one_stage \ @@ -37,7 +37,7 @@ python -m torch.distributed.launch --nproc_per_node=1 \ # TEACHER=/blob/users/xwu/compression/huggingface_models/bert-base-uncased-${TASK_NAME}/pytorch_model.bin # STUDENT=${TEACHER} # python -m torch.distributed.launch --nproc_per_node=1 \ -# --master_port 66667 \ +# --master_port 6667 \ # run_glue_no_trainer_clean.py \ # --seed 42 \ # --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/ZeroQuant/zero_quant_lkd.sh b/model_compression/bert/bash_script/ZeroQuant/zero_quant_lkd.sh index 528226952..e9005260f 100644 --- a/model_compression/bert/bash_script/ZeroQuant/zero_quant_lkd.sh +++ b/model_compression/bert/bash_script/ZeroQuant/zero_quant_lkd.sh @@ -39,7 +39,7 @@ python -m torch.distributed.launch --nproc_per_node=1 \ # TEACHER=/blob/users/xwu/compression/huggingface_models/bert-base-uncased-${TASK_NAME}/pytorch_model.bin # STUDENT=${TEACHER} # python -m torch.distributed.launch --nproc_per_node=1 \ -# --master_port 66667 \ +# --master_port 6667 \ # run_glue_no_trainer_clean.py \ # --seed 42 \ # --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/layer_reduction.sh b/model_compression/bert/bash_script/layer_reduction.sh index 31e01b210..c5df728d9 100644 --- a/model_compression/bert/bash_script/layer_reduction.sh +++ b/model_compression/bert/bash_script/layer_reduction.sh @@ -65,7 +65,7 @@ CONFIG=${config_json} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher run_cmd="python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66664 \ + --master_port 6664 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/pruning_row.sh b/model_compression/bert/bash_script/pruning_row.sh index 8836b201b..4114f3d09 100644 --- a/model_compression/bert/bash_script/pruning_row.sh +++ b/model_compression/bert/bash_script/pruning_row.sh @@ -67,7 +67,7 @@ CONFIG=${config_json} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher run_cmd="python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66669 \ + --master_port 6669 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/pruning_sparse.sh b/model_compression/bert/bash_script/pruning_sparse.sh index e6b916f52..a1813fe67 100644 --- a/model_compression/bert/bash_script/pruning_sparse.sh +++ b/model_compression/bert/bash_script/pruning_sparse.sh @@ -67,7 +67,7 @@ CONFIG=${config_json} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher run_cmd="python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66668 \ + --master_port 6668 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/quant_activation.sh b/model_compression/bert/bash_script/quant_activation.sh index 9f308cd4c..4330d3e29 100644 --- a/model_compression/bert/bash_script/quant_activation.sh +++ b/model_compression/bert/bash_script/quant_activation.sh @@ -67,7 +67,7 @@ CONFIG=${config_json} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher run_cmd="python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66666 \ + --master_port 6666 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \ diff --git a/model_compression/bert/bash_script/quant_weight.sh b/model_compression/bert/bash_script/quant_weight.sh index e08311d26..de2afe9ff 100644 --- a/model_compression/bert/bash_script/quant_weight.sh +++ b/model_compression/bert/bash_script/quant_weight.sh @@ -66,7 +66,7 @@ CONFIG=${config_json} # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% the following command will first download huggingface models and then compress %%%%%%% MODEL=yoshitomo-matsubara/bert-base-uncased-${TASK_NAME} ## for both student and teacher run_cmd="python -m torch.distributed.launch --nproc_per_node=1 \ - --master_port 66665 \ + --master_port 6665 \ run_glue_no_trainer.py \ --seed 42 \ --distill_method ${STAGE} \