-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feaure] Add new models: baichuan2, tigerbot, vicuna v1.5 (#373)
* add bag of new models: baichuan2, tigerbot, vicuna v1.5 * update * re-organize models * update readme * update
- Loading branch information
Leymore
authored
Sep 8, 2023
1 parent
b48d084
commit 2c91521
Showing
71 changed files
with
359 additions
and
21 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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), | ||
) | ||
] |
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,29 @@ | ||
from opencompass.models import HuggingFaceCausalLM | ||
|
||
_meta_template = dict( | ||
round=[ | ||
dict(role='HUMAN', begin='<reserved_106>'), | ||
dict(role='BOT', begin='<reserved_107>', 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), | ||
) | ||
] |
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,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), | ||
) | ||
] |
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,29 @@ | ||
from opencompass.models import HuggingFaceCausalLM | ||
|
||
_meta_template = dict( | ||
round=[ | ||
dict(role='HUMAN', begin='<reserved_106>'), | ||
dict(role='BOT', begin='<reserved_107>', 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), | ||
) | ||
] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,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), | ||
), | ||
] |
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,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), | ||
), | ||
] |
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,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), | ||
) | ||
] |
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,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), | ||
) | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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), | ||
), | ||
] |
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,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), | ||
) | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
) | ||
] |
Oops, something went wrong.