BlueSourceJY commited on
Commit
4136ef6
·
verified ·
1 Parent(s): 8ea4401

Upload inference_rot_head.sh with huggingface_hub

Browse files
Files changed (1) hide show
  1. inference_rot_head.sh +19 -0
inference_rot_head.sh ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CONFIG_PATH=$1
2
+
3
+ GPUS_PER_NODE=${GPUS_PER_NODE:-8}
4
+ NNODES=${WORLD_SIZE:-1}
5
+ NODE_RANK=${RANK:-0}
6
+ MASTER_ADDR=${MASTER_ADDR:-127.0.0.1}
7
+ MASTER_PORT=${MASTER_PORT:-1235}
8
+ WORLD_SIZE=$(($GPUS_PER_NODE*$NNODES))
9
+ PRECISION=${PRECISION:-bf16}
10
+
11
+ accelerate launch \
12
+ --main_process_ip $MASTER_ADDR \
13
+ --main_process_port $MASTER_PORT \
14
+ --machine_rank $NODE_RANK \
15
+ --num_processes $(($GPUS_PER_NODE*$NNODES)) \
16
+ --num_machines $NNODES \
17
+ --mixed_precision $PRECISION \
18
+ inference_rot_head.py \
19
+ --config $CONFIG_PATH