Open luckfu opened 4 months ago
Due to a recent update in OpenCompass, certain datasets for ./configs/eval_gpt3.5.py
are no longer supported. If you wish to test GPT3.5 using a demonstration configuration, please navigate to ./configs/eval_gpt3.5.py
and modify it like:
# Test GSM8k dataset with GPT3.5
from mmengine.config import read_base
from opencompass.models import OpenAI
from opencompass.partitioners import NaivePartitioner
from opencompass.runners import LocalRunner
from opencompass.tasks import OpenICLInferTask
with read_base():
# choose a list of datasets
from .datasets.gsm8k.gsm8k_gen import datasets
api_meta_template = dict(
round=[
dict(role='HUMAN', api_role='HUMAN'),
dict(role='BOT', api_role='BOT', generate=True),
],
)
models = [
dict(abbr='GPT-3.5-turbo-0613',
type=OpenAI, path='gpt-3.5-turbo-0613',
key='ENV', # The key will be obtained from $OPENAI_API_KEY, but you can write down your key here as well
meta_template=api_meta_template,
query_per_second=1,
max_out_len=2048, max_seq_len=4096, batch_size=8),
]
infer = dict(
partitioner=dict(type=NaivePartitioner),
runner=dict(
type=LocalRunner,
max_num_workers=8,
task=dict(type=OpenICLInferTask)),
)
This is a config for test GSM8k dataset with GPT3.5, you can replace the dataset to whatever dataset you want to test.
Due to a recent update in OpenCompass, certain datasets for
./configs/eval_gpt3.5.py
are no longer supported. If you wish to test GPT3.5 using a demonstration configuration, please navigate to./configs/eval_gpt3.5.py
and modify it like:# Test GSM8k dataset with GPT3.5 from mmengine.config import read_base from opencompass.models import OpenAI from opencompass.partitioners import NaivePartitioner from opencompass.runners import LocalRunner from opencompass.tasks import OpenICLInferTask with read_base(): # choose a list of datasets from .datasets.gsm8k.gsm8k_gen import datasets api_meta_template = dict( round=[ dict(role='HUMAN', api_role='HUMAN'), dict(role='BOT', api_role='BOT', generate=True), ], ) models = [ dict(abbr='GPT-3.5-turbo-0613', type=OpenAI, path='gpt-3.5-turbo-0613', key='ENV', # The key will be obtained from $OPENAI_API_KEY, but you can write down your key here as well meta_template=api_meta_template, query_per_second=1, max_out_len=2048, max_seq_len=4096, batch_size=8), ] infer = dict( partitioner=dict(type=NaivePartitioner), runner=dict( type=LocalRunner, max_num_workers=8, task=dict(type=OpenICLInferTask)), )
This is a config for test GSM8k dataset with GPT3.5, you can replace the dataset to whatever dataset you want to test.
When will the documentation be updated? I just came into this library yesterday, and the mismatch between the documentation and the actual behavior made me very confused.
Which section of the documentation allows you to use this configuration for the demo? ./configs/eval_gpt3.5.py
先决条件
问题类型
我正在使用官方支持的任务/模型/数据集进行评估。
环境
重现问题 - 代码/配置示例
重现问题 - 命令或脚本
重现问题 - 错误信息
其他信息
没有改动