mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
fix llm judge evaluator import and docs
This commit is contained in:
parent
8c74e6a39e
commit
7b47afb757
@ -194,6 +194,8 @@ eval_cfg = dict(
|
|||||||
dict_postprocessor=dict(type=generic_llmjudge_postprocess),
|
dict_postprocessor=dict(type=generic_llmjudge_postprocess),
|
||||||
),
|
),
|
||||||
pred_role='BOT',
|
pred_role='BOT',
|
||||||
|
#num_gpus=1
|
||||||
|
#Add this in case of use local model as judge, adjust to the number of GPUs you wish to use for evaluation.
|
||||||
)
|
)
|
||||||
|
|
||||||
# Dataset configuration
|
# Dataset configuration
|
||||||
|
@ -194,6 +194,8 @@ eval_cfg = dict(
|
|||||||
dict_postprocessor=dict(type=generic_llmjudge_postprocess),
|
dict_postprocessor=dict(type=generic_llmjudge_postprocess),
|
||||||
),
|
),
|
||||||
pred_role='BOT',
|
pred_role='BOT',
|
||||||
|
#num_gpus=1
|
||||||
|
#使用本地模型评估时,设置num_gpus为希望在评估阶段使用的GPU数量
|
||||||
)
|
)
|
||||||
|
|
||||||
# 数据集配置
|
# 数据集配置
|
||||||
|
@ -92,6 +92,7 @@ math_eval_cfg = dict(
|
|||||||
judge_cfg=lmdeploy_qwen2_5_14b_instruct_model[0],
|
judge_cfg=lmdeploy_qwen2_5_14b_instruct_model[0],
|
||||||
dict_postprocessor=dict(type=generic_llmjudge_postprocess),
|
dict_postprocessor=dict(type=generic_llmjudge_postprocess),
|
||||||
),
|
),
|
||||||
|
num_gpus=1 # The amount of GPU used for LLM as judge evaluation
|
||||||
)
|
)
|
||||||
|
|
||||||
# Dataset configuration
|
# Dataset configuration
|
||||||
|
@ -10,11 +10,11 @@ from opencompass.openicl.icl_evaluator import BaseEvaluator
|
|||||||
from opencompass.openicl.icl_inferencer import GenInferencer
|
from opencompass.openicl.icl_inferencer import GenInferencer
|
||||||
from opencompass.openicl.icl_retriever import ZeroRetriever
|
from opencompass.openicl.icl_retriever import ZeroRetriever
|
||||||
from opencompass.registry import (DICT_POSTPROCESSORS, ICL_PROMPT_TEMPLATES,
|
from opencompass.registry import (DICT_POSTPROCESSORS, ICL_PROMPT_TEMPLATES,
|
||||||
TEXT_POSTPROCESSORS)
|
TEXT_POSTPROCESSORS, ICL_EVALUATORS)
|
||||||
from opencompass.utils import build_dataset_from_cfg, build_model_from_cfg
|
from opencompass.utils import build_dataset_from_cfg, build_model_from_cfg
|
||||||
from opencompass.utils.logging import get_logger
|
from opencompass.utils.logging import get_logger
|
||||||
|
|
||||||
|
@ICL_EVALUATORS.register_module()
|
||||||
class GenericLLMEvaluator(BaseEvaluator):
|
class GenericLLMEvaluator(BaseEvaluator):
|
||||||
"""Generic LLM evaluator.
|
"""Generic LLM evaluator.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user