2024-01-17 13:48:12 +08:00
|
|
|
from opencompass.models import HuggingFaceCausalLM
|
|
|
|
|
|
|
|
|
|
|
|
_meta_template = dict(
|
|
|
|
round=[
|
2024-05-14 15:35:58 +08:00
|
|
|
dict(role='HUMAN', begin='<_user>'),
|
|
|
|
dict(role='BOT', begin='<_bot>', end='<_end>', generate=True),
|
2024-01-17 13:48:12 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
models = [
|
|
|
|
dict(
|
2024-06-28 14:16:34 +08:00
|
|
|
abbr='telechat-7b-hf',
|
2024-01-17 13:48:12 +08:00
|
|
|
type=HuggingFaceCausalLM,
|
|
|
|
path='Tele-AI/telechat-7B',
|
2024-06-28 14:16:34 +08:00
|
|
|
model_kwargs=dict(device_map='auto', trust_remote_code=True),
|
|
|
|
tokenizer_kwargs=dict(padding_side='left', truncation_side='left', trust_remote_code=True),
|
2024-01-17 13:48:12 +08:00
|
|
|
meta_template=_meta_template,
|
|
|
|
max_out_len=100,
|
|
|
|
max_seq_len=2048,
|
|
|
|
batch_size=8,
|
|
|
|
run_cfg=dict(num_gpus=1, num_procs=1),
|
|
|
|
end_str='<_end>',
|
|
|
|
)
|
|
|
|
]
|