MMBENCH.md 1.35 KB
Newer Older
wanglch's avatar
wanglch committed
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# MMBench Evaluation

## Data

```bash
/cpfs01/shared/public/shusheng.yss/workspace/23082502_qwenvl_eval_test/eval_mm/data/mmbench
```

## Dev

```bash
checkpoint=/PATH/TO/CHECKPOINT
ds=mmbench_dev_20230712
python -m torch.distributed.launch --use-env \
    --nproc_per_node ${NPROC_PER_NODE:-8} \
    --nnodes ${WORLD_SIZE:-1} \
    --node_rank ${RANK:-0} \
    --master_addr ${MASTER_ADDR:-127.0.0.1} \
    --master_port ${MASTER_PORT:-12345} \
    evaluate_multiple_choice_mmbench.py \
    --checkpoint $checkpoint \
    --dataset $ds \
    --batch-size 2 \
    --num-workers 2

# the results will be saved to mmbench_dev_20230712.json

# without consistency constrain

python mmbench_evaluation.py

# with consistency constrain

python mmbench_evaluation_tricky.py

```

## Test

```bash
checkpoint=/PATH/TO/CHECKPOINT
ds=mmbench_test_20230712
python -m torch.distributed.launch --use-env \
    --nproc_per_node ${NPROC_PER_NODE:-8} \
    --nnodes ${WORLD_SIZE:-1} \
    --node_rank ${RANK:-0} \
    --master_addr ${MASTER_ADDR:-127.0.0.1} \
    --master_port ${MASTER_PORT:-12345} \
    evaluate_multiple_choice_mmbench.py \
    --checkpoint $checkpoint \
    --dataset $ds \
    --batch-size 2 \
    --num-workers 2

# the results will be saved to mmbench_test_20230712.json

# convert to submission format with consistency constrain

python mmbench_predict_to_submission.py

```