diff --git a/configs/eval_claude.py b/configs/eval_claude.py index d3dcabf86..6b93ee7b7 100644 --- a/configs/eval_claude.py +++ b/configs/eval_claude.py @@ -8,7 +8,7 @@ from .datasets.collections.chat_medium import datasets # and output the results in a choosen format from .summarizers.medium import summarizer - from .models.claude import models + from .models.claude.claude import models infer = dict( partitioner=dict(type=NaivePartitioner), diff --git a/configs/eval_codegeex2.py b/configs/eval_codegeex2.py index c0a65e8d4..610e3eabc 100644 --- a/configs/eval_codegeex2.py +++ b/configs/eval_codegeex2.py @@ -2,6 +2,6 @@ with read_base(): from .datasets.humanevalx.humanevalx_gen import humanevalx_datasets - from .models.hf_codegeex2_6b import models + from .models.codegeex2.hf_codegeex2_6b import models -datasets = humanevalx_datasets \ No newline at end of file +datasets = humanevalx_datasets diff --git a/configs/eval_demo.py b/configs/eval_demo.py index a6206f48e..ea5def4c9 100644 --- a/configs/eval_demo.py +++ b/configs/eval_demo.py @@ -3,8 +3,8 @@ with read_base(): from .datasets.siqa.siqa_gen import siqa_datasets from .datasets.winograd.winograd_ppl import winograd_datasets - from .models.hf_opt_125m import opt125m - from .models.hf_opt_350m import opt350m + from .models.opt.hf_opt_125m import opt125m + from .models.opt.hf_opt_350m import opt350m datasets = [*siqa_datasets, *winograd_datasets] models = [opt125m, opt350m] diff --git a/configs/eval_hf_llama_7b.py b/configs/eval_hf_llama_7b.py index 8f70891fc..e4087e5af 100644 --- a/configs/eval_hf_llama_7b.py +++ b/configs/eval_hf_llama_7b.py @@ -2,7 +2,7 @@ with read_base(): from .datasets.collections.base_medium_llama import piqa_datasets, siqa_datasets - from .models.hf_llama_7b import models + from .models.hf_llama.hf_llama_7b import models datasets = [*piqa_datasets, *siqa_datasets] diff --git a/configs/eval_internLM.py b/configs/eval_internLM.py index c6fa425ce..bd3ef0e33 100644 --- a/configs/eval_internLM.py +++ b/configs/eval_internLM.py @@ -4,6 +4,6 @@ # choose a list of datasets from .datasets.collections.base_medium import datasets # choose a model of interest - from .models.internlm_7b import models + from .models.internlm.internlm_7b import models # and output the results in a choosen format - from .summarizers.medium import summarizer \ No newline at end of file + from .summarizers.medium import summarizer diff --git a/configs/eval_internlm_7b.py b/configs/eval_internlm_7b.py index 539a3ff94..5dcf60cf8 100644 --- a/configs/eval_internlm_7b.py +++ b/configs/eval_internlm_7b.py @@ -4,6 +4,6 @@ # choose a list of datasets from .datasets.collections.base_medium import datasets # choose a model of interest - from .models.hf_internlm_7b import models + from .models.hf_internlm.hf_internlm_7b import models # and output the results in a choosen format from .summarizers.medium import summarizer diff --git a/configs/eval_llama2_7b.py b/configs/eval_llama2_7b.py index 0ad2fa899..2daa293bf 100644 --- a/configs/eval_llama2_7b.py +++ b/configs/eval_llama2_7b.py @@ -2,7 +2,7 @@ with read_base(): from .datasets.collections.base_medium_llama import piqa_datasets, siqa_datasets - from .models.llama2_7b import models + from .models.llama.llama2_7b import models datasets = [*piqa_datasets, *siqa_datasets] diff --git a/configs/eval_qwen_7b.py b/configs/eval_qwen_7b.py index ba465fa6e..7b647b680 100644 --- a/configs/eval_qwen_7b.py +++ b/configs/eval_qwen_7b.py @@ -1,7 +1,7 @@ from mmengine.config import read_base with read_base(): - from .models.hf_qwen_7b import models + from .models.qwen.hf_qwen_7b import models from .datasets.collections.leaderboard.qwen import datasets from .summarizers.leaderboard import summarizer diff --git a/configs/eval_qwen_7b_chat.py b/configs/eval_qwen_7b_chat.py index 28b861137..dce6634fc 100644 --- a/configs/eval_qwen_7b_chat.py +++ b/configs/eval_qwen_7b_chat.py @@ -1,7 +1,7 @@ from mmengine.config import read_base with read_base(): - from .models.hf_qwen_7b_chat import models + from .models.qwen.hf_qwen_7b_chat import models from .datasets.collections.leaderboard.qwen_chat import datasets from .summarizers.leaderboard import summarizer diff --git a/configs/models/baichuan/hf_baichuan2_13b_base.py b/configs/models/baichuan/hf_baichuan2_13b_base.py new file mode 100644 index 000000000..39651a24e --- /dev/null +++ b/configs/models/baichuan/hf_baichuan2_13b_base.py @@ -0,0 +1,21 @@ +from opencompass.models import HuggingFaceCausalLM + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='baichuan2-13b-base-hf', + path="baichuan-inc/Baichuan2-13B-Base", + tokenizer_path='baichuan-inc/Baichuan2-13B-Base', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + use_fast=False, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(device_map='auto', trust_remote_code=True), + run_cfg=dict(num_gpus=2, num_procs=1), + ) +] diff --git a/configs/models/baichuan/hf_baichuan2_13b_chat.py b/configs/models/baichuan/hf_baichuan2_13b_chat.py new file mode 100644 index 000000000..6dbc0d9ef --- /dev/null +++ b/configs/models/baichuan/hf_baichuan2_13b_chat.py @@ -0,0 +1,29 @@ +from opencompass.models import HuggingFaceCausalLM + +_meta_template = dict( + round=[ + dict(role='HUMAN', begin=''), + dict(role='BOT', begin='', generate=True), + ], +) + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='baichuan2-13b-chat-hf', + path="baichuan-inc/Baichuan2-13B-Chat", + tokenizer_path='baichuan-inc/Baichuan2-13B-Chat', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + use_fast=False, + ), + meta_template=_meta_template, + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(device_map='auto', trust_remote_code=True), + run_cfg=dict(num_gpus=2, num_procs=1), + ) +] diff --git a/configs/models/baichuan/hf_baichuan2_7b_base.py b/configs/models/baichuan/hf_baichuan2_7b_base.py new file mode 100644 index 000000000..f351c870a --- /dev/null +++ b/configs/models/baichuan/hf_baichuan2_7b_base.py @@ -0,0 +1,21 @@ +from opencompass.models import HuggingFaceCausalLM + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='baichuan2-7b-base-hf', + path="baichuan-inc/Baichuan2-7B-Base", + tokenizer_path='baichuan-inc/Baichuan2-7B-Base', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + use_fast=False, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(device_map='auto', trust_remote_code=True), + run_cfg=dict(num_gpus=1, num_procs=1), + ) +] diff --git a/configs/models/baichuan/hf_baichuan2_7b_chat.py b/configs/models/baichuan/hf_baichuan2_7b_chat.py new file mode 100644 index 000000000..41ea40cf2 --- /dev/null +++ b/configs/models/baichuan/hf_baichuan2_7b_chat.py @@ -0,0 +1,29 @@ +from opencompass.models import HuggingFaceCausalLM + +_meta_template = dict( + round=[ + dict(role='HUMAN', begin=''), + dict(role='BOT', begin='', generate=True), + ], +) + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='baichuan2-7b-chat-hf', + path="baichuan-inc/Baichuan2-7B-Chat", + tokenizer_path='baichuan-inc/Baichuan2-7B-Chat', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + use_fast=False, + ), + meta_template=_meta_template, + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(device_map='auto', trust_remote_code=True), + run_cfg=dict(num_gpus=1, num_procs=1), + ) +] diff --git a/configs/models/hf_baichuan_13b_base.py b/configs/models/baichuan/hf_baichuan_13b_base.py similarity index 100% rename from configs/models/hf_baichuan_13b_base.py rename to configs/models/baichuan/hf_baichuan_13b_base.py diff --git a/configs/models/hf_baichuan_13b_chat.py b/configs/models/baichuan/hf_baichuan_13b_chat.py similarity index 100% rename from configs/models/hf_baichuan_13b_chat.py rename to configs/models/baichuan/hf_baichuan_13b_chat.py diff --git a/configs/models/hf_baichuan_7b.py b/configs/models/baichuan/hf_baichuan_7b.py similarity index 100% rename from configs/models/hf_baichuan_7b.py rename to configs/models/baichuan/hf_baichuan_7b.py diff --git a/configs/models/hf_chatglm2_6b.py b/configs/models/chatglm/hf_chatglm2_6b.py similarity index 100% rename from configs/models/hf_chatglm2_6b.py rename to configs/models/chatglm/hf_chatglm2_6b.py diff --git a/configs/models/hf_chatglm_6b.py b/configs/models/chatglm/hf_chatglm_6b.py similarity index 100% rename from configs/models/hf_chatglm_6b.py rename to configs/models/chatglm/hf_chatglm_6b.py diff --git a/configs/models/claude.py b/configs/models/claude/claude.py similarity index 100% rename from configs/models/claude.py rename to configs/models/claude/claude.py diff --git a/configs/models/claude2.py b/configs/models/claude/claude2.py similarity index 100% rename from configs/models/claude2.py rename to configs/models/claude/claude2.py diff --git a/configs/models/hf_codegeex2_6b.py b/configs/models/codegeex2/hf_codegeex2_6b.py similarity index 100% rename from configs/models/hf_codegeex2_6b.py rename to configs/models/codegeex2/hf_codegeex2_6b.py diff --git a/configs/models/hf_falcon_40b.py b/configs/models/falcon/hf_falcon_40b.py similarity index 100% rename from configs/models/hf_falcon_40b.py rename to configs/models/falcon/hf_falcon_40b.py diff --git a/configs/models/hf_falcon_7b.py b/configs/models/falcon/hf_falcon_7b.py similarity index 100% rename from configs/models/hf_falcon_7b.py rename to configs/models/falcon/hf_falcon_7b.py diff --git a/configs/models/hf_internlm_7b.py b/configs/models/hf_internlm/hf_internlm_7b.py similarity index 100% rename from configs/models/hf_internlm_7b.py rename to configs/models/hf_internlm/hf_internlm_7b.py diff --git a/configs/models/hf_internlm_chat_7b.py b/configs/models/hf_internlm/hf_internlm_chat_7b.py similarity index 100% rename from configs/models/hf_internlm_chat_7b.py rename to configs/models/hf_internlm/hf_internlm_chat_7b.py diff --git a/configs/models/hf_internlm_chat_7b_8k.py b/configs/models/hf_internlm/hf_internlm_chat_7b_8k.py similarity index 100% rename from configs/models/hf_internlm_chat_7b_8k.py rename to configs/models/hf_internlm/hf_internlm_chat_7b_8k.py diff --git a/configs/models/hf_llama2_13b.py b/configs/models/hf_llama/hf_llama2_13b.py similarity index 100% rename from configs/models/hf_llama2_13b.py rename to configs/models/hf_llama/hf_llama2_13b.py diff --git a/configs/models/hf_llama2_70b.py b/configs/models/hf_llama/hf_llama2_70b.py similarity index 100% rename from configs/models/hf_llama2_70b.py rename to configs/models/hf_llama/hf_llama2_70b.py diff --git a/configs/models/hf_llama2_7b.py b/configs/models/hf_llama/hf_llama2_7b.py similarity index 100% rename from configs/models/hf_llama2_7b.py rename to configs/models/hf_llama/hf_llama2_7b.py diff --git a/configs/models/hf_llama_13b.py b/configs/models/hf_llama/hf_llama_13b.py similarity index 100% rename from configs/models/hf_llama_13b.py rename to configs/models/hf_llama/hf_llama_13b.py diff --git a/configs/models/hf_llama_30b.py b/configs/models/hf_llama/hf_llama_30b.py similarity index 100% rename from configs/models/hf_llama_30b.py rename to configs/models/hf_llama/hf_llama_30b.py diff --git a/configs/models/hf_llama_65b.py b/configs/models/hf_llama/hf_llama_65b.py similarity index 100% rename from configs/models/hf_llama_65b.py rename to configs/models/hf_llama/hf_llama_65b.py diff --git a/configs/models/hf_llama_7b.py b/configs/models/hf_llama/hf_llama_7b.py similarity index 100% rename from configs/models/hf_llama_7b.py rename to configs/models/hf_llama/hf_llama_7b.py diff --git a/configs/models/internlm_7b.py b/configs/models/internlm/internlm_7b.py similarity index 100% rename from configs/models/internlm_7b.py rename to configs/models/internlm/internlm_7b.py diff --git a/configs/models/llama2_13b.py b/configs/models/llama/llama2_13b.py similarity index 100% rename from configs/models/llama2_13b.py rename to configs/models/llama/llama2_13b.py diff --git a/configs/models/llama2_13b_chat.py b/configs/models/llama/llama2_13b_chat.py similarity index 100% rename from configs/models/llama2_13b_chat.py rename to configs/models/llama/llama2_13b_chat.py diff --git a/configs/models/llama2_70b.py b/configs/models/llama/llama2_70b.py similarity index 100% rename from configs/models/llama2_70b.py rename to configs/models/llama/llama2_70b.py diff --git a/configs/models/llama2_70b_chat.py b/configs/models/llama/llama2_70b_chat.py similarity index 100% rename from configs/models/llama2_70b_chat.py rename to configs/models/llama/llama2_70b_chat.py diff --git a/configs/models/llama2_7b.py b/configs/models/llama/llama2_7b.py similarity index 100% rename from configs/models/llama2_7b.py rename to configs/models/llama/llama2_7b.py diff --git a/configs/models/llama2_7b_chat.py b/configs/models/llama/llama2_7b_chat.py similarity index 100% rename from configs/models/llama2_7b_chat.py rename to configs/models/llama/llama2_7b_chat.py diff --git a/configs/models/llama_13b.py b/configs/models/llama/llama_13b.py similarity index 100% rename from configs/models/llama_13b.py rename to configs/models/llama/llama_13b.py diff --git a/configs/models/llama_30b.py b/configs/models/llama/llama_30b.py similarity index 100% rename from configs/models/llama_30b.py rename to configs/models/llama/llama_30b.py diff --git a/configs/models/llama_65b.py b/configs/models/llama/llama_65b.py similarity index 100% rename from configs/models/llama_65b.py rename to configs/models/llama/llama_65b.py diff --git a/configs/models/llama_7b.py b/configs/models/llama/llama_7b.py similarity index 100% rename from configs/models/llama_7b.py rename to configs/models/llama/llama_7b.py diff --git a/configs/models/hf_moss_moon_003_base.py b/configs/models/moss/hf_moss_moon_003_base.py similarity index 100% rename from configs/models/hf_moss_moon_003_base.py rename to configs/models/moss/hf_moss_moon_003_base.py diff --git a/configs/models/hf_moss_moon_003_sft.py b/configs/models/moss/hf_moss_moon_003_sft.py similarity index 100% rename from configs/models/hf_moss_moon_003_sft.py rename to configs/models/moss/hf_moss_moon_003_sft.py diff --git a/configs/models/hf_mpt_7b.py b/configs/models/mpt/hf_mpt_7b.py similarity index 100% rename from configs/models/hf_mpt_7b.py rename to configs/models/mpt/hf_mpt_7b.py diff --git a/configs/models/hf_mpt_instruct_7b.py b/configs/models/mpt/hf_mpt_instruct_7b.py similarity index 100% rename from configs/models/hf_mpt_instruct_7b.py rename to configs/models/mpt/hf_mpt_instruct_7b.py diff --git a/configs/models/gpt_3.5_turbo.py b/configs/models/openai/gpt_3.5_turbo.py similarity index 100% rename from configs/models/gpt_3.5_turbo.py rename to configs/models/openai/gpt_3.5_turbo.py diff --git a/configs/models/hf_opt_125m.py b/configs/models/opt/hf_opt_125m.py similarity index 100% rename from configs/models/hf_opt_125m.py rename to configs/models/opt/hf_opt_125m.py diff --git a/configs/models/hf_opt_350m.py b/configs/models/opt/hf_opt_350m.py similarity index 100% rename from configs/models/hf_opt_350m.py rename to configs/models/opt/hf_opt_350m.py diff --git a/configs/models/hf_qwen_7b.py b/configs/models/qwen/hf_qwen_7b.py similarity index 100% rename from configs/models/hf_qwen_7b.py rename to configs/models/qwen/hf_qwen_7b.py diff --git a/configs/models/hf_qwen_7b_chat.py b/configs/models/qwen/hf_qwen_7b_chat.py similarity index 100% rename from configs/models/hf_qwen_7b_chat.py rename to configs/models/qwen/hf_qwen_7b_chat.py diff --git a/configs/models/tigerbot/hf_tigerbot_13b_base_v1.py b/configs/models/tigerbot/hf_tigerbot_13b_base_v1.py new file mode 100644 index 000000000..12566f695 --- /dev/null +++ b/configs/models/tigerbot/hf_tigerbot_13b_base_v1.py @@ -0,0 +1,21 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='tigerbot-13b-base-v1-hf', + path='TigerResearch/tigerbot-13b-base-v1', + tokenizer_path='TigerResearch/tigerbot-13b-base-v1', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(trust_remote_code=True, device_map='auto'), + run_cfg=dict(num_gpus=2, num_procs=1), + ), +] diff --git a/configs/models/tigerbot/hf_tigerbot_13b_base_v2.py b/configs/models/tigerbot/hf_tigerbot_13b_base_v2.py new file mode 100644 index 000000000..ebd2ca582 --- /dev/null +++ b/configs/models/tigerbot/hf_tigerbot_13b_base_v2.py @@ -0,0 +1,21 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='tigerbot-13b-base-v2-hf', + path='TigerResearch/tigerbot-13b-base', + tokenizer_path='TigerResearch/tigerbot-13b-base', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(trust_remote_code=True, device_map='auto'), + run_cfg=dict(num_gpus=2, num_procs=1), + ), +] diff --git a/configs/models/tigerbot/hf_tigerbot_13b_chat_v1.py b/configs/models/tigerbot/hf_tigerbot_13b_chat_v1.py new file mode 100644 index 000000000..7b8c6f633 --- /dev/null +++ b/configs/models/tigerbot/hf_tigerbot_13b_chat_v1.py @@ -0,0 +1,29 @@ +from opencompass.models import HuggingFaceCausalLM + + +_meta_template = dict( + round=[ + dict(role='HUMAN', begin='\n\n### Instruction:\n'), + dict(role='BOT', begin='\n\n### Response:\n', generate=True), + ], +) + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='tigerbot-13b-chat-v1-hf', + path="TigerResearch/tigerbot-13b-chat-v1", + tokenizer_path='TigerResearch/tigerbot-13b-chat-v1', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + meta_template=_meta_template, + model_kwargs=dict(trust_remote_code=True, device_map='auto'), + run_cfg=dict(num_gpus=2, num_procs=1), + ) +] diff --git a/configs/models/tigerbot/hf_tigerbot_13b_chat_v2.py b/configs/models/tigerbot/hf_tigerbot_13b_chat_v2.py new file mode 100644 index 000000000..9c1237e78 --- /dev/null +++ b/configs/models/tigerbot/hf_tigerbot_13b_chat_v2.py @@ -0,0 +1,29 @@ +from opencompass.models import HuggingFaceCausalLM + + +_meta_template = dict( + round=[ + dict(role='HUMAN', begin='\n\n### Instruction:\n'), + dict(role='BOT', begin='\n\n### Response:\n', generate=True), + ], +) + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='tigerbot-13b-chat-v2-hf', + path="TigerResearch/tigerbot-13b-chat", + tokenizer_path='TigerResearch/tigerbot-13b-chat', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + meta_template=_meta_template, + model_kwargs=dict(trust_remote_code=True, device_map='auto'), + run_cfg=dict(num_gpus=2, num_procs=1), + ) +] diff --git a/configs/models/hf_tigerbot_7b_base.py b/configs/models/tigerbot/hf_tigerbot_7b_base.py similarity index 90% rename from configs/models/hf_tigerbot_7b_base.py rename to configs/models/tigerbot/hf_tigerbot_7b_base.py index b3d5c0285..7bebf108d 100644 --- a/configs/models/hf_tigerbot_7b_base.py +++ b/configs/models/tigerbot/hf_tigerbot_7b_base.py @@ -15,7 +15,7 @@ max_out_len=100, max_seq_len=2048, batch_size=8, - model_kwargs=dict(trust_remote_code=True, device_map='auto', revision='5f34fd223586e9efb8eb0e3bc667f03581886992'), + model_kwargs=dict(trust_remote_code=True, device_map='auto'), run_cfg=dict(num_gpus=1, num_procs=1), ), ] diff --git a/configs/models/tigerbot/hf_tigerbot_7b_base_v3.py b/configs/models/tigerbot/hf_tigerbot_7b_base_v3.py new file mode 100644 index 000000000..65f5130d3 --- /dev/null +++ b/configs/models/tigerbot/hf_tigerbot_7b_base_v3.py @@ -0,0 +1,21 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='tigerbot-7b-base-v3-hf', + path='TigerResearch/tigerbot-7b-base', + tokenizer_path='TigerResearch/tigerbot-7b-base', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(trust_remote_code=True, device_map='auto'), + run_cfg=dict(num_gpus=1, num_procs=1), + ), +] diff --git a/configs/models/tigerbot/hf_tigerbot_7b_chat_v3.py b/configs/models/tigerbot/hf_tigerbot_7b_chat_v3.py new file mode 100644 index 000000000..549f62ad9 --- /dev/null +++ b/configs/models/tigerbot/hf_tigerbot_7b_chat_v3.py @@ -0,0 +1,29 @@ +from opencompass.models import HuggingFaceCausalLM + + +_meta_template = dict( + round=[ + dict(role='HUMAN', begin='\n\n### Instruction:\n'), + dict(role='BOT', begin='\n\n### Response:\n', generate=True), + ], +) + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='tigerbot-7b-chat-v3-hf', + path="TigerResearch/tigerbot-7b-chat", + tokenizer_path='TigerResearch/tigerbot-7b-chat', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + trust_remote_code=True, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + meta_template=_meta_template, + model_kwargs=dict(trust_remote_code=True, device_map='auto'), + run_cfg=dict(num_gpus=1, num_procs=1), + ) +] diff --git a/configs/models/hf_tigerbot_7b_sft.py b/configs/models/tigerbot/hf_tigerbot_7b_sft.py similarity index 93% rename from configs/models/hf_tigerbot_7b_sft.py rename to configs/models/tigerbot/hf_tigerbot_7b_sft.py index d4a792d79..110904ef2 100644 --- a/configs/models/hf_tigerbot_7b_sft.py +++ b/configs/models/tigerbot/hf_tigerbot_7b_sft.py @@ -23,7 +23,7 @@ max_seq_len=2048, batch_size=8, meta_template=_meta_template, - model_kwargs=dict(trust_remote_code=True, device_map='auto', revision='0ba4d6fc479bdedd6a3f8d4d3425025c5f501800'), + model_kwargs=dict(trust_remote_code=True, device_map='auto'), run_cfg=dict(num_gpus=1, num_procs=1), ) ] diff --git a/configs/models/hf_vicuna_13b.py b/configs/models/vicuna/hf_vicuna_13b_v13.py similarity index 94% rename from configs/models/hf_vicuna_13b.py rename to configs/models/vicuna/hf_vicuna_13b_v13.py index bc3a6e015..97eb4401a 100644 --- a/configs/models/hf_vicuna_13b.py +++ b/configs/models/vicuna/hf_vicuna_13b_v13.py @@ -4,7 +4,7 @@ models = [ dict( type=HuggingFaceCausalLM, - abbr='vicuna-13b-hf', + abbr='vicuna-13b-v1.3-hf', path="lmsys/vicuna-13b-v1.3", tokenizer_path='lmsys/vicuna-13b-v1.3', tokenizer_kwargs=dict( diff --git a/configs/models/vicuna/hf_vicuna_13b_v15.py b/configs/models/vicuna/hf_vicuna_13b_v15.py new file mode 100644 index 000000000..958e9101f --- /dev/null +++ b/configs/models/vicuna/hf_vicuna_13b_v15.py @@ -0,0 +1,22 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='vicuna-13b-v1.5-hf', + path="lmsys/vicuna-13b-v1.5", + tokenizer_path='lmsys/vicuna-13b-v1.5', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + use_fast=False, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(device_map='auto'), + batch_padding=False, # if false, inference with for-loop without batch padding + run_cfg=dict(num_gpus=2, num_procs=1) + ) +] diff --git a/configs/models/vicuna/hf_vicuna_13b_v15_16k.py b/configs/models/vicuna/hf_vicuna_13b_v15_16k.py new file mode 100644 index 000000000..794084d63 --- /dev/null +++ b/configs/models/vicuna/hf_vicuna_13b_v15_16k.py @@ -0,0 +1,22 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='vicuna-13b-v1.5-16k-hf', + path="lmsys/vicuna-13b-v1.5-16k", + tokenizer_path='lmsys/vicuna-13b-v1.5-16k', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + use_fast=False, + ), + max_out_len=100, + max_seq_len=8192, + batch_size=8, + model_kwargs=dict(device_map='auto'), + batch_padding=False, # if false, inference with for-loop without batch padding + run_cfg=dict(num_gpus=2, num_procs=1) + ) +] diff --git a/configs/models/hf_vicuna_33b.py b/configs/models/vicuna/hf_vicuna_33b_v13.py similarity index 94% rename from configs/models/hf_vicuna_33b.py rename to configs/models/vicuna/hf_vicuna_33b_v13.py index c29e38391..32f553659 100644 --- a/configs/models/hf_vicuna_33b.py +++ b/configs/models/vicuna/hf_vicuna_33b_v13.py @@ -4,7 +4,7 @@ models = [ dict( type=HuggingFaceCausalLM, - abbr='vicuna-33b-hf', + abbr='vicuna-33b-v1.3-hf', path="lmsys/vicuna-33b-v1.3", tokenizer_path='lmsys/vicuna-33b-v1.3', tokenizer_kwargs=dict( diff --git a/configs/models/hf_vicuna_7b.py b/configs/models/vicuna/hf_vicuna_7b_v13.py similarity index 94% rename from configs/models/hf_vicuna_7b.py rename to configs/models/vicuna/hf_vicuna_7b_v13.py index 005f0760f..6b25db0d7 100644 --- a/configs/models/hf_vicuna_7b.py +++ b/configs/models/vicuna/hf_vicuna_7b_v13.py @@ -4,7 +4,7 @@ models = [ dict( type=HuggingFaceCausalLM, - abbr='vicuna-7b-hf', + abbr='vicuna-7b-v1.3-hf', path="lmsys/vicuna-7b-v1.3", tokenizer_path='lmsys/vicuna-7b-v1.3', tokenizer_kwargs=dict( diff --git a/configs/models/vicuna/hf_vicuna_7b_v15.py b/configs/models/vicuna/hf_vicuna_7b_v15.py new file mode 100644 index 000000000..76d3486a8 --- /dev/null +++ b/configs/models/vicuna/hf_vicuna_7b_v15.py @@ -0,0 +1,22 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='vicuna-7b-v1.5-hf', + path="lmsys/vicuna-7b-v1.5", + tokenizer_path='lmsys/vicuna-7b-v1.5', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + use_fast=False, + ), + max_out_len=100, + max_seq_len=2048, + batch_size=8, + model_kwargs=dict(device_map='auto'), + batch_padding=False, # if false, inference with for-loop without batch padding + run_cfg=dict(num_gpus=1, num_procs=1) + ) +] diff --git a/configs/models/vicuna/hf_vicuna_7b_v15_16k.py b/configs/models/vicuna/hf_vicuna_7b_v15_16k.py new file mode 100644 index 000000000..45d93b6d8 --- /dev/null +++ b/configs/models/vicuna/hf_vicuna_7b_v15_16k.py @@ -0,0 +1,22 @@ +from opencompass.models import HuggingFaceCausalLM + + +models = [ + dict( + type=HuggingFaceCausalLM, + abbr='vicuna-7b-v1.5-16k-hf', + path="lmsys/vicuna-7b-v1.5-16k", + tokenizer_path='lmsys/vicuna-7b-v1.5-16k', + tokenizer_kwargs=dict( + padding_side='left', + truncation_side='left', + use_fast=False, + ), + max_out_len=100, + max_seq_len=8192, + batch_size=8, + model_kwargs=dict(device_map='auto'), + batch_padding=False, # if false, inference with for-loop without batch padding + run_cfg=dict(num_gpus=1, num_procs=1) + ) +] diff --git a/configs/models/hf_wizardlm_7b.py b/configs/models/wizardlm/hf_wizardlm_7b.py similarity index 100% rename from configs/models/hf_wizardlm_7b.py rename to configs/models/wizardlm/hf_wizardlm_7b.py diff --git a/docs/en/get_started.md b/docs/en/get_started.md index 11b8ddfea..b913b5851 100644 --- a/docs/en/get_started.md +++ b/docs/en/get_started.md @@ -155,8 +155,8 @@ from mmengine.config import read_base with read_base(): from .datasets.siqa.siqa_gen import siqa_datasets from .datasets.winograd.winograd_ppl import winograd_datasets - from .models.hf_opt_125m import opt125m - from .models.hf_opt_350m import opt350m + from .models.opt.hf_opt_125m import opt125m + from .models.opt.hf_opt_350m import opt350m datasets = [*siqa_datasets, *winograd_datasets] models = [opt125m, opt350m] diff --git a/docs/zh_cn/get_started.md b/docs/zh_cn/get_started.md index a0ca8b0a7..b8d9a6496 100644 --- a/docs/zh_cn/get_started.md +++ b/docs/zh_cn/get_started.md @@ -154,8 +154,8 @@ from mmengine.config import read_base with read_base(): from .datasets.siqa.siqa_gen import siqa_datasets from .datasets.winograd.winograd_ppl import winograd_datasets - from .models.hf_opt_125m import opt125m - from .models.hf_opt_350m import opt350m + from .models.opt.hf_opt_125m import opt125m + from .models.opt.hf_opt_350m import opt350m datasets = [*siqa_datasets, *winograd_datasets] models = [opt125m, opt350m]