eval_internlm_turbomind.py 2.63 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from mmengine.config import read_base
from opencompass.models.turbomind import TurboMindModel


with read_base():
    # choose a list of datasets
    from .datasets.mmlu.mmlu_gen_a484b3 import mmlu_datasets
    from .datasets.ceval.ceval_gen_5f30c7 import ceval_datasets
    from .datasets.SuperGLUE_WiC.SuperGLUE_WiC_gen_d06864 import WiC_datasets
    from .datasets.triviaqa.triviaqa_gen_2121ce import triviaqa_datasets
    from .datasets.gsm8k.gsm8k_gen_1d7fe4 import gsm8k_datasets
    from .datasets.humaneval.humaneval_gen_8e312c import humaneval_datasets
    # and output the results in a choosen format
    from .summarizers.medium import summarizer

datasets = sum((v for k, v in locals().items() if k.endswith('_datasets')), [])

# # config for internlm-7b model
19
20
21
internlm_7b = dict(
        type=TurboMindModel,
        abbr='internlm-7b-turbomind',
22
        path="internlm/internlm-7b",
23
24
25
26
27
28
        max_out_len=100,
        max_seq_len=2048,
        batch_size=32,
        concurrency=32,
        run_cfg=dict(num_gpus=1, num_procs=1),
    )
29
30

# # config for internlm-7b-w4 model
31
32
33
internlm_7b_w4 = dict(
        type=TurboMindModel,
        abbr='internlm-7b-w4-turbomind',
34
        path="internlm/internlm-7b-w4",
35
36
37
38
39
40
        max_out_len=100,
        max_seq_len=2048,
        batch_size=32,
        concurrency=32,
        run_cfg=dict(num_gpus=1, num_procs=1),
    )
41
42

# # config for internlm-7b-w4kv8 model
43
44
45
internlm_7b_w4kv8 = dict(
        type=TurboMindModel,
        abbr='internlm-7b-w4kv8-turbomind',
46
        path="internlm/internlm-7b-w4kv8",
47
48
49
50
51
52
        max_out_len=100,
        max_seq_len=2048,
        batch_size=32,
        concurrency=32,
        run_cfg=dict(num_gpus=1, num_procs=1),
    )
53
54

# config for internlm-20b model
55
internlm_20b = dict(
56
57
        type=TurboMindModel,
        abbr='internlm-20b-turbomind',
58
        path="internlm/internlm-20b",
59
60
61
62
63
64
65
66
        max_out_len=100,
        max_seq_len=2048,
        batch_size=8,
        concurrency=8,
        run_cfg=dict(num_gpus=1, num_procs=1),
    )

# config for internlm-20b-w4 model
67
68
69
internlm_20b_w4 = dict(
        type=TurboMindModel,
        abbr='internlm-20b-w4-turbomind',
70
        path="internlm/internlm-20b-w4",
71
72
73
74
75
76
        max_out_len=100,
        max_seq_len=2048,
        batch_size=16,
        concurrency=16,
        run_cfg=dict(num_gpus=1, num_procs=1),
    )
77
78
79


# config for internlm-20b-w4kv8 model
80
81
82
internlm_20b_w4kv8 = dict(
        type=TurboMindModel,
        abbr='internlm-20b-w4kv8-turbomind',
83
        path="internlm/internlm-20b-w4kv8",
84
85
86
87
88
89
90
91
        max_out_len=100,
        max_seq_len=2048,
        batch_size=16,
        concurrency=16,
        run_cfg=dict(num_gpus=1, num_procs=1),
    )

models = [internlm_20b]