Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 请问使用API评测如何支持自定义数据集? #1718

Open
1 task
Jimmy-L99 opened this issue Nov 28, 2024 · 1 comment
Open
1 task

[Feature] 请问使用API评测如何支持自定义数据集? #1718

Jimmy-L99 opened this issue Nov 28, 2024 · 1 comment
Assignees

Comments

@Jimmy-L99
Copy link

Describe the feature

command:

(opencompass) root@node1:~/user/OpenCompass/opencompass# python run.py configs/vllm-glm4-9b-chat-custom.py

vllm-glm4-9b-chat-custom.py

from opencompass.models import OpenAISDK
from mmengine.config import read_base

with read_base():
    from .datasets.cmmlu.cmmlu_gen import cmmlu_datasets

datasets = []
datasets = cmmlu_datasets

api_meta_template = dict(
    round=[
        dict(role='HUMAN', api_role='HUMAN'),
        dict(role='BOT', api_role='BOT', generate=True),
    ],
    reserved_roles=[dict(role='SYSTEM', api_role='SYSTEM')],
)

models = [
    dict(
        abbr='glm-4-9b-chat-vllm-API',
        type=OpenAISDK,
        key='EMPTY',
        openai_api_base='http://localhost:port/v1', 
        path='glm-4-9b-chat',
        tokenizer_path='/root/user/models/glm-4-9b-chat',
        rpm_verbose=True, 
        meta_template=api_meta_template, 
        query_per_second=10, 
        max_out_len=1024,
        max_seq_len=4096,
        temperature=0.01,
        batch_size=8,
        retry=3,
    )
]

想在不更改OpenCompass代码的情况下实现,但是文档示例只有以下用法:

python run.py \
    --models hf_llama2_7b \
    --custom-dataset-path xxx/test_qa.jsonl \
    --custom-dataset-data-type qa \
    --custom-dataset-infer-method gen

Will you implement it?

  • I would like to implement this feature and create a PR!
@tonysy
Copy link
Collaborator

tonysy commented Dec 5, 2024

You can change the models with the API models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants