Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
XrayGLM_pytorch
Commits
b9daca86
Unverified
Commit
b9daca86
authored
May 25, 2023
by
MPU王荣胜
Committed by
GitHub
May 25, 2023
Browse files
add scripts
parent
4c497230
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
finetune_XrayGLM.sh
finetune_XrayGLM.sh
+57
-0
No files found.
finetune_XrayGLM.sh
0 → 100644
View file @
b9daca86
#! /bin/bash
NUM_WORKERS
=
1
NUM_GPUS_PER_WORKER
=
4
MP_SIZE
=
1
script_path
=
$(
realpath
$0
)
script_dir
=
$(
dirname
$script_path
)
main_dir
=
$(
dirname
$script_dir
)
MODEL_TYPE
=
"XrayGLM"
MODEL_ARGS
=
"--max_source_length 64
\
--max_target_length 256
\
--lora_rank 10
\
--pre_seq_len 4"
#OPTIONS_SAT="SAT_HOME=$1" #"SAT_HOME=/raid/dm/sat_models"
OPTIONS_NCCL
=
"NCCL_DEBUG=info NCCL_IB_DISABLE=0 NCCL_NET_GDR_LEVEL=2"
HOST_FILE_PATH
=
"hostfile"
HOST_FILE_PATH
=
"hostfile_single"
train_data
=
"./data/Xray/openi-zh.json"
eval_data
=
"./data/Xray/openi-zh.json"
gpt_options
=
"
\
--experiment-name finetune-
$MODEL_TYPE
\
--model-parallel-size
${
MP_SIZE
}
\
--mode finetune
\
--train-iters 300
\
--resume-dataloader
\
$MODEL_ARGS
\
--train-data
${
train_data
}
\
--valid-data
${
eval_data
}
\
--distributed-backend nccl
\
--lr-decay-style cosine
\
--warmup .02
\
--checkpoint-activations
\
--save-interval 3000
\
--eval-interval 10000
\
--save "
./checkpoints
"
\
--split 1
\
--eval-iters 10
\
--eval-batch-size 8
\
--zero-stage 1
\
--lr 0.0001
\
--batch-size 8
\
--skip-init
\
--fp16
\
--use_lora
"
run_cmd
=
"
${
OPTIONS_NCCL
}
${
OPTIONS_SAT
}
deepspeed --master_port 16666 --hostfile
${
HOST_FILE_PATH
}
finetune_XrayGLM.py
${
gpt_options
}
"
echo
${
run_cmd
}
eval
${
run_cmd
}
set
+x
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment