czczup commited on
Commit
54ef5b6
·
verified ·
1 Parent(s): faa8fea

Delete test_long_niah.sh

Browse files
Files changed (1) hide show
  1. test_long_niah.sh +0 -77
test_long_niah.sh DELETED
@@ -1,77 +0,0 @@
1
- PARTITION=${PARTITION:-"Intern5"}
2
- GPUS=${GPUS:-16}
3
- GPUS_PER_NODE=${GPUS_PER_NODE:-8}
4
- GPUS_PER_TASK=${GPUS_PER_TASK:-1}
5
- QUOTA_TYPE=${QUOTA_TYPE:-"reserved"}
6
-
7
-
8
- set -x
9
-
10
- CHECKPOINT=${1}
11
-
12
- JOB_FOLDER=$(dirname "$CHECKPOINT")
13
- files=(
14
- "$JOB_FOLDER/configuration_intern_vit.py"
15
- "$JOB_FOLDER/configuration_internlm2.py"
16
- "$JOB_FOLDER/configuration_internvl_chat.py"
17
- "$JOB_FOLDER/conversation.py"
18
- "$JOB_FOLDER/modeling_intern_vit.py"
19
- "$JOB_FOLDER/modeling_internlm2.py"
20
- "$JOB_FOLDER/modeling_internvl_chat.py"
21
- "$JOB_FOLDER/tokenization_internlm2_fast.py"
22
- "$JOB_FOLDER/tokenization_internlm2.py"
23
- "test_long_niah.sh"
24
- )
25
- for file in "${files[@]}"; do
26
- dest_file="$CHECKPOINT/$(basename "$file")"
27
- if [ ! -f "$dest_file" ]; then
28
- cp "$file" "$CHECKPOINT"
29
- fi
30
- done
31
- ARGS=("$@")
32
-
33
- declare -a tasks=( \
34
- 'retrieval-image-test-long-subset' \
35
- 'retrieval-image-test-long-128k' \
36
- )
37
-
38
- # declare -a tasks=(\
39
- # 'retrieval-image-test-long-1M'\
40
- # )
41
- declare -a tasks=(\
42
- 'retrieval-image-test-long-800k' \
43
- 'retrieval-image-test-long-512k' \
44
- )
45
-
46
- model_name="internvl"
47
- for STRIDE in 1; do
48
- LOG_DIR=$CHECKPOINT/eval_mm_niah_ring_attn_$STRIDE
49
- mkdir -p $LOG_DIR
50
-
51
- for ((j=0; j<${#tasks[@]}; j++)); do
52
- task=${tasks[j]}
53
-
54
- echo "$(date) ${model_name}_${task}_stride_${STRIDE}"
55
-
56
- srun -p ${PARTITION} \
57
- --gres=gpu:${GPUS_PER_NODE} \
58
- --ntasks=$((GPUS / GPUS_PER_TASK)) \
59
- --ntasks-per-node=$((GPUS_PER_NODE / GPUS_PER_TASK)) \
60
- --quotatype=${QUOTA_TYPE} \
61
- --job-name="${STRIDE}${task}" \
62
- -o "${LOG_DIR}/${task}_stride_${STRIDE}.log" \
63
- -e "${LOG_DIR}/${task}_stride_${STRIDE}.log" \
64
- --async \
65
- python -u eval/mm_niah/eval_mm_niah_long.py \
66
- --checkpoint $CHECKPOINT \
67
- --outputs-dir $LOG_DIR \
68
- --task $task \
69
- --num-gpus-per-rank ${GPUS_PER_TASK} "${ARGS[@]:1}" \
70
- --rope_pos_id_version 'v5' \
71
- --ring_attn \
72
- --rope_pos_id_stride $STRIDE \
73
-
74
-
75
- sleep 0.2
76
- done
77
- done