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
OpenDAS
ColossalAI
Commits
cc1eec2f
Unverified
Commit
cc1eec2f
authored
Apr 17, 2023
by
binmakeswell
Committed by
GitHub
Apr 17, 2023
Browse files
[chat] update reward model sh (#3578)
parent
e3551443
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
applications/Chat/examples/train_rm.sh
applications/Chat/examples/train_rm.sh
+23
-7
No files found.
applications/Chat/examples/train_rm.sh
View file @
cc1eec2f
set_n_least_used_CUDA_VISIBLE_DEVICES 1
set_n_least_used_CUDA_VISIBLE_DEVICES
()
{
local
n
=
${
1
:-
"9999"
}
echo
"GPU Memory Usage:"
local
FIRST_N_GPU_IDS
=
$(
nvidia-smi
--query-gpu
=
memory.used
--format
=
csv
\
|
tail
-n
+2
\
|
nl
-v
0
\
|
tee
/dev/tty
\
|
sort
-g
-k
2
\
|
awk
'{print $1}'
\
|
head
-n
$n
)
export
CUDA_VISIBLE_DEVICES
=
$(
echo
$FIRST_N_GPU_IDS
|
sed
's/ /,/g'
)
echo
"Now CUDA_VISIBLE_DEVICES is set to:"
echo
"CUDA_VISIBLE_DEVICES=
$CUDA_VISIBLE_DEVICES
"
}
python train_reward_model.py
--pretrain
'microsoft/deberta-v3-large'
\
set_n_least_used_CUDA_VISIBLE_DEVICES 2
--model
'deberta'
\
--strategy
naive
\
torchrun
--standalone
--nproc_per_node
=
2 train_reward_model.py
\
--loss_fn
'log_exp'
\
--pretrain
<your pretrain path>
\
--save_path
'rmstatic.pt'
\
--model
'bloom'
\
--test
True
--strategy
colossalai_zero2
\
--loss_fn
'log_sig'
\
--save_path
<your model saving path>
\
--dataset
'Anthropic/hh-rlhf'
\
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