-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs] Update docs for new entry script (#246)
* update docs * update docs * update * update en docs * update * update --------- Co-authored-by: Leymore <zfz-960727@163.com>
- Loading branch information
1 parent
a4d6840
commit 166022f
Showing
11 changed files
with
593 additions
and
155 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,10 @@ | ||
from mmengine.config import read_base | ||
|
||
with read_base(): | ||
from .datasets.winograd.winograd_ppl import winograd_datasets | ||
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 | ||
|
||
datasets = [*siqa_datasets, *winograd_datasets] | ||
|
||
from opencompass.models import HuggingFaceCausalLM | ||
|
||
# OPT-350M | ||
opt350m = dict( | ||
type=HuggingFaceCausalLM, | ||
# the folowing are HuggingFaceCausalLM init parameters | ||
path='facebook/opt-350m', | ||
tokenizer_path='facebook/opt-350m', | ||
tokenizer_kwargs=dict( | ||
padding_side='left', | ||
truncation_side='left', | ||
proxies=None, | ||
trust_remote_code=True), | ||
model_kwargs=dict(device_map='auto'), | ||
max_seq_len=2048, | ||
# the folowing are not HuggingFaceCausalLM init parameters | ||
abbr='opt350m', # Model abbreviation | ||
max_out_len=100, # Maximum number of generated tokens | ||
batch_size=64, | ||
run_cfg=dict(num_gpus=1), # Run configuration for specifying resource requirements | ||
) | ||
|
||
# OPT-125M | ||
opt125m = dict( | ||
type=HuggingFaceCausalLM, | ||
# the folowing are HuggingFaceCausalLM init parameters | ||
path='facebook/opt-125m', | ||
tokenizer_path='facebook/opt-125m', | ||
tokenizer_kwargs=dict( | ||
padding_side='left', | ||
truncation_side='left', | ||
proxies=None, | ||
trust_remote_code=True), | ||
model_kwargs=dict(device_map='auto'), | ||
max_seq_len=2048, | ||
# the folowing are not HuggingFaceCausalLM init parameters | ||
abbr='opt125m', # Model abbreviation | ||
max_out_len=100, # Maximum number of generated tokens | ||
batch_size=128, | ||
run_cfg=dict(num_gpus=1), # Run configuration for specifying resource requirements | ||
) | ||
|
||
models = [opt350m, opt125m] | ||
models = [opt125m, opt350m] |
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 | ||
|
||
# OPT-125M | ||
opt125m = dict( | ||
type=HuggingFaceCausalLM, | ||
# the folowing are HuggingFaceCausalLM init parameters | ||
path='facebook/opt-125m', | ||
tokenizer_path='facebook/opt-125m', | ||
tokenizer_kwargs=dict( | ||
padding_side='left', | ||
truncation_side='left', | ||
proxies=None, | ||
trust_remote_code=True), | ||
model_kwargs=dict(device_map='auto'), | ||
max_seq_len=2048, | ||
# the folowing are not HuggingFaceCausalLM init parameters | ||
abbr='opt125m', # Model abbreviation | ||
max_out_len=100, # Maximum number of generated tokens | ||
batch_size=128, | ||
run_cfg=dict(num_gpus=1), # Run configuration for specifying resource requirements | ||
) |
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 | ||
|
||
# OPT-350M | ||
opt350m = dict( | ||
type=HuggingFaceCausalLM, | ||
# the folowing are HuggingFaceCausalLM init parameters | ||
path='facebook/opt-350m', | ||
tokenizer_path='facebook/opt-350m', | ||
tokenizer_kwargs=dict( | ||
padding_side='left', | ||
truncation_side='left', | ||
proxies=None, | ||
trust_remote_code=True), | ||
model_kwargs=dict(device_map='auto'), | ||
max_seq_len=2048, | ||
# the folowing are not HuggingFaceCausalLM init parameters | ||
abbr='opt350m', # Model abbreviation | ||
max_out_len=100, # Maximum number of generated tokens | ||
batch_size=64, | ||
run_cfg=dict(num_gpus=1), # Run configuration for specifying resource requirements | ||
) |
Oops, something went wrong.