-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_pruning.sh
More file actions
31 lines (27 loc) · 793 Bytes
/
run_pruning.sh
File metadata and controls
31 lines (27 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Enable the "set -e" option to exit on error
set -e
# Prompt the user for a single argument
echo "Enter Trained Model path:"
read arg
# Check if an argument was provided
if [ -z "$arg" ]; then
echo "No argument provided. Exiting."
exit 1
fi
python3 prune.py \
--model_name_or_path "$arg" \
--num_warmup_steps 500 \
--num_train_epochs 3 \
--cooldown_epochs 1 \
--train_file ../data/train_processed.csv \
--validation_file ../data/valid_processed.csv \
--output_dir "../sparse-T5-QA" \
--per_device_train_batch_size 16 \
--per_device_eval_batch_size 16 \
--checkpointing_steps 'epoch' \
--weight_decay 5e-04 \
--target_sparsity 0.8 \
--pruning_pattern "4x1" \
--pruning_frequency 50000 \
--learning_rate 1e-03