Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix port number in cifar model compression #237

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions model_compression/bert/bash_script/XTC/layer_reduction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down Expand Up @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions model_compression/bert/bash_script/XTC/quant_1bit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand All @@ -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} \
Expand Down
4 changes: 2 additions & 2 deletions model_compression/bert/bash_script/ZeroQuant/zero_quant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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} \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion model_compression/bert/bash_script/layer_reduction.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion model_compression/bert/bash_script/pruning_row.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion model_compression/bert/bash_script/pruning_sparse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion model_compression/bert/bash_script/quant_activation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion model_compression/bert/bash_script/quant_weight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
4 changes: 2 additions & 2 deletions model_compression/cifar/run_compress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down