2023-11-21 19:18:40 +08:00
|
|
|
from mmengine.config import read_base
|
|
|
|
from opencompass.models import LightllmAPI
|
|
|
|
from opencompass.partitioners import NaivePartitioner
|
|
|
|
from opencompass.runners import LocalRunner
|
|
|
|
from opencompass.tasks import OpenICLInferTask
|
|
|
|
|
|
|
|
with read_base():
|
|
|
|
from .datasets.humaneval.humaneval_gen import humaneval_datasets
|
|
|
|
|
|
|
|
datasets = [*humaneval_datasets]
|
|
|
|
|
|
|
|
models = [
|
|
|
|
dict(
|
|
|
|
abbr='LightllmAPI',
|
|
|
|
type=LightllmAPI,
|
|
|
|
url='http://localhost:8080/generate',
|
2024-02-19 10:02:59 +08:00
|
|
|
input_format='<input_text_to_replace>',
|
2023-12-27 13:49:08 +08:00
|
|
|
max_seq_len=2048,
|
|
|
|
batch_size=32,
|
2023-11-21 19:18:40 +08:00
|
|
|
generation_kwargs=dict(
|
|
|
|
do_sample=False,
|
|
|
|
ignore_eos=False,
|
2023-12-27 13:49:08 +08:00
|
|
|
max_new_tokens=1024
|
2023-11-21 19:18:40 +08:00
|
|
|
),
|
|
|
|
),
|
|
|
|
]
|
|
|
|
|
|
|
|
infer = dict(
|
|
|
|
partitioner=dict(type=NaivePartitioner),
|
|
|
|
runner=dict(
|
|
|
|
type=LocalRunner,
|
2023-12-27 13:49:08 +08:00
|
|
|
max_num_workers=32,
|
2023-11-21 19:18:40 +08:00
|
|
|
task=dict(type=OpenICLInferTask),
|
|
|
|
),
|
|
|
|
)
|