OpenCompass/configs/api_examples/eval_api_moonshot.py
Songyang Zhang 5202456b4c
[API] Update API (#624)
* update api

* update generation_kwargs impl

* update api

* refactor

---------

Co-authored-by: Leymore <zfz-960727@163.com>
2023-11-23 15:06:20 +08:00

37 lines
901 B
Python

from mmengine.config import read_base
from opencompass.models import MoonShot
from opencompass.partitioners import NaivePartitioner
from opencompass.runners.local_api import LocalAPIRunner
from opencompass.tasks import OpenICLInferTask
with read_base():
from ..summarizers.medium import summarizer
from ..datasets.ceval.ceval_gen import ceval_datasets
datasets = [
*ceval_datasets,
]
models = [
dict(
abbr='moonshot-v1-32k',
type=MoonShot,
path='moonshot-v1-32k',
key='xxxxxxx',
url= 'xxxxxxxx',
query_per_second=1,
max_out_len=2048,
max_seq_len=2048,
batch_size=8),
]
infer = dict(
partitioner=dict(type=NaivePartitioner),
runner=dict(
type=LocalAPIRunner,
max_num_workers=4,
concurrent_users=4,
task=dict(type=OpenICLInferTask)),
)
work_dir = "outputs/api_moonshot/"