mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00

* fix pip version * fix pip version * update (#1522) Co-authored-by: zhulin1 <zhulin1@pjlab.org.cn> * [Feature] Update Models (#1518) * Update Models * Update * Update humanevalx * Update * Update * [Feature] Dataset prompts update for ARC, BoolQ, Race (#1527) add judgerbench and reorg sub add judgerbench and reorg subeval add judgerbench and reorg subeval * add judgerbench and reorg subeval * add judgerbench and reorg subeval * add judgerbench and reorg subeval * add judgerbench and reorg subeval --------- Co-authored-by: zhulinJulia24 <145004780+zhulinJulia24@users.noreply.github.com> Co-authored-by: zhulin1 <zhulin1@pjlab.org.cn> Co-authored-by: Songyang Zhang <tonysy@users.noreply.github.com> Co-authored-by: Linchen Xiao <xxllcc1993@gmail.com>
67 lines
2.1 KiB
Python
67 lines
2.1 KiB
Python
from opencompass.openicl.icl_prompt_template import PromptTemplate
|
|
from opencompass.openicl.icl_retriever import ZeroRetriever
|
|
from opencompass.openicl.icl_inferencer import ChatInferencer, GenInferencer
|
|
from opencompass.openicl.icl_evaluator import LMEvaluator
|
|
from opencompass.datasets import WildBenchDataset, wildbench_postprocess
|
|
from opencompass.summarizers import WildBenchPairSummarizer
|
|
|
|
subjective_reader_cfg = dict(
|
|
input_columns=['dialogue', 'prompt'],
|
|
output_column='judge',
|
|
)
|
|
|
|
|
|
data_path ='./data/subjective/WildBench/wildbench.jsonl'
|
|
|
|
wildbench_datasets = []
|
|
subjective_infer_cfg = dict(
|
|
prompt_template=dict(
|
|
type=PromptTemplate,
|
|
template="""{dialogue}"""
|
|
),
|
|
retriever=dict(type=ZeroRetriever),
|
|
inferencer=dict(type=ChatInferencer, max_seq_len=4096, max_out_len=512, infer_mode='last'),
|
|
)
|
|
|
|
subjective_eval_cfg = dict(
|
|
evaluator=dict(
|
|
type=LMEvaluator,
|
|
prompt_template=dict(
|
|
type=PromptTemplate,
|
|
template="""{prompt}"""
|
|
),
|
|
dict_postprocessor=dict(type=wildbench_postprocess),
|
|
),
|
|
pred_role='BOT',
|
|
)
|
|
gpt4 = dict(
|
|
abbr='gpt4-turbo',
|
|
)
|
|
|
|
claude = dict(
|
|
abbr='HaiKu',
|
|
)
|
|
|
|
llama_2_70b = dict(
|
|
abbr='llama-2-70b-chat-hf',
|
|
)
|
|
|
|
wildbench_datasets.append(
|
|
dict(
|
|
abbr='wildbench',
|
|
type=WildBenchDataset,
|
|
path=data_path,
|
|
eval_mode='pair',
|
|
reader_cfg=subjective_reader_cfg,
|
|
infer_cfg=subjective_infer_cfg,
|
|
eval_cfg=subjective_eval_cfg,
|
|
given_pred = [{'abbr': 'gpt4-turbo', 'path':'./data/subjective/WildBench/gpt4'},
|
|
{'abbr': 'llama-2-70b-chat-hf', 'path':'./data/subjective/WildBench/llama2-70b'},
|
|
{'abbr': 'HaiKu', 'path':'./data/subjective/WildBench/claude'},
|
|
{'abbr': 'llama-2-70b-chat-turbomind', 'path':'./data/subjective/WildBench/llama2-70b'},
|
|
{'abbr': 'llama-2-70b-chat-vllm', 'path':'./data/subjective/WildBench/llama2-70b'}],
|
|
mode='m2n', # m个模型 与 n个模型进行对战
|
|
infer_order='random',
|
|
base_models = [llama_2_70b, gpt4, claude],
|
|
))
|