-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'gitee/lyh-merge2' into lyh-merge2
- Loading branch information
Showing
4 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
from mmengine.config import read_base | ||
from opencompass.partitioners import SizePartitioner, NaivePartitioner | ||
from opencompass.runners import LocalRunner | ||
from opencompass.tasks import OpenICLInferTask, OpenICLEvalTask | ||
|
||
with read_base(): | ||
# Datasets | ||
from ..datasets.opseval.datasets import zte_mc, oracle_mc, owl_mc, owl_qa, network_mc, company_mc, rzy_qa | ||
# Models | ||
from ..models.gpt_3dot5_turbo_peiqi import models as chatgpt | ||
from ..local_models.zhipu.chatglm import chatglm3_6b | ||
from ..local_models.internlm.internlm import internlm2_chat_20b, internlm2_chat_7b | ||
from ..local_models.google.gemma import gemma_2b, gemma_7b | ||
from ..local_models.qwen.qwen import qwen1_5_0_5b_base, qwen1_5_0_5b_chat | ||
from ..local_models.baichuan.baichuan import baichuan2_turbo, baichuan3 | ||
from ..local_models.zhipu.zhipu import glm_3_turbo, glm_4 | ||
from ..paths import ROOT_DIR | ||
|
||
datasets = [ | ||
*zte_mc | ||
] | ||
|
||
models = [ | ||
qwen1_5_0_5b_base | ||
] | ||
|
||
for model in models: | ||
model['run_cfg'] = dict(num_gpus=1, num_procs=1) | ||
pass | ||
|
||
for dataset in datasets: | ||
dataset['sample_setting'] = dict() | ||
dataset['infer_cfg']['inferencer']['save_every'] = 8 | ||
dataset['infer_cfg']['inferencer']['sc_size'] = 2 | ||
dataset['eval_cfg']['sc_size'] = 2 | ||
dataset['sample_setting'] = dict(sample_size=2) # !!!WARNING: Use for testing only!!! | ||
|
||
|
||
model_dataset_combinations = [ | ||
dict(models=[model for model in models if 'chat' not in model['abbr']], | ||
datasets=[dataset for dataset in datasets if 'ppl' in dataset['abbr']]), | ||
dict(models=[model for model in models if 'chat' in model['abbr']], | ||
datasets=[dataset for dataset in datasets if 'gen' in dataset['abbr']]) | ||
] | ||
|
||
|
||
infer = dict( | ||
partitioner=dict( | ||
# type=SizePartitioner, | ||
# max_task_size=100, | ||
# gen_task_coef=1, | ||
type=NaivePartitioner | ||
), | ||
runner=dict( | ||
type=LocalRunner, | ||
max_num_workers=16, | ||
max_workers_per_gpu=1, | ||
task=dict(type=OpenICLInferTask), | ||
), | ||
) | ||
|
||
eval = dict( | ||
partitioner=dict(type=NaivePartitioner), | ||
runner=dict( | ||
type=LocalRunner, | ||
max_num_workers=32, | ||
task=dict(type=OpenICLEvalTask)), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters