2023-07-04 22:11:33 +08:00
|
|
|
from opencompass.models import HuggingFaceCausalLM
|
|
|
|
|
2023-07-06 16:02:39 +08:00
|
|
|
|
2023-07-04 22:11:33 +08:00
|
|
|
_meta_template = dict(
|
|
|
|
round=[
|
2023-07-06 16:02:39 +08:00
|
|
|
dict(role='HUMAN', begin='<|User|>:', end='<eoh>\n'),
|
|
|
|
dict(role='BOT', begin='<|Bot|>:', end='<eoa>\n', generate=True),
|
2023-07-04 22:11:33 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
models = [
|
|
|
|
dict(
|
|
|
|
type=HuggingFaceCausalLM,
|
2023-07-06 16:02:39 +08:00
|
|
|
abbr='internlm-chat-7b-hf',
|
2023-07-11 10:51:49 +08:00
|
|
|
path="internlm/internlm-chat-7b",
|
|
|
|
tokenizer_path='internlm/internlm-chat-7b',
|
2023-11-13 15:15:34 +08:00
|
|
|
model_kwargs=dict(
|
|
|
|
trust_remote_code=True,
|
|
|
|
device_map='auto',
|
|
|
|
),
|
2023-07-04 22:11:33 +08:00
|
|
|
tokenizer_kwargs=dict(
|
|
|
|
padding_side='left',
|
|
|
|
truncation_side='left',
|
2023-07-06 16:02:39 +08:00
|
|
|
use_fast=False,
|
2023-07-11 10:51:49 +08:00
|
|
|
trust_remote_code=True,
|
2023-07-04 22:11:33 +08:00
|
|
|
),
|
|
|
|
max_out_len=100,
|
|
|
|
max_seq_len=2048,
|
|
|
|
batch_size=8,
|
|
|
|
meta_template=_meta_template,
|
|
|
|
run_cfg=dict(num_gpus=1, num_procs=1),
|
|
|
|
)
|
|
|
|
]
|