2023-11-21 20:25:47 +08:00
|
|
|
|
from mmengine.config import read_base
|
2023-11-23 15:06:20 +08:00
|
|
|
|
from opencompass.models import MoonShot
|
2023-11-21 20:25:47 +08:00
|
|
|
|
from opencompass.partitioners import NaivePartitioner
|
|
|
|
|
from opencompass.runners.local_api import LocalAPIRunner
|
|
|
|
|
from opencompass.tasks import OpenICLInferTask
|
|
|
|
|
|
|
|
|
|
with read_base():
|
2023-11-23 15:06:20 +08:00
|
|
|
|
from ..summarizers.medium import summarizer
|
|
|
|
|
from ..datasets.ceval.ceval_gen import ceval_datasets
|
2023-11-21 20:25:47 +08:00
|
|
|
|
|
|
|
|
|
datasets = [
|
|
|
|
|
*ceval_datasets,
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
models = [
|
|
|
|
|
dict(
|
2023-11-23 15:06:20 +08:00
|
|
|
|
abbr='moonshot-v1-32k',
|
|
|
|
|
type=MoonShot,
|
|
|
|
|
path='moonshot-v1-32k',
|
|
|
|
|
key='xxxxxxx',
|
|
|
|
|
url= 'xxxxxxxx',
|
2023-12-10 13:29:26 +08:00
|
|
|
|
system_prompt= '你是 Kimi,由 Moonshot AI 提供的人工智能助手,你更擅长中文和英文的对话。'
|
|
|
|
|
'你会为用户提供安全,有帮助,准确的回答。同时,你会拒绝一些涉及恐怖主义,种族歧视,'
|
|
|
|
|
'黄色暴力等问题的回答。Moonshot AI 为专有名词,不可翻译成其他语言。',
|
2023-11-21 20:25:47 +08:00
|
|
|
|
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,
|
2023-11-23 15:06:20 +08:00
|
|
|
|
max_num_workers=4,
|
|
|
|
|
concurrent_users=4,
|
2023-11-21 20:25:47 +08:00
|
|
|
|
task=dict(type=OpenICLInferTask)),
|
|
|
|
|
)
|
|
|
|
|
|
2024-05-14 15:35:58 +08:00
|
|
|
|
work_dir = 'outputs/api_moonshot/'
|