Skip to content

Commit

Permalink
[hotfix] fix typo s/get_defualt_parser /get_default_parser (#5548)
Browse files Browse the repository at this point in the history
  • Loading branch information
digger-yu authored Apr 7, 2024
1 parent a799ca3 commit 341263d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/language/grok-1/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from utils import get_defualt_parser, inference, print_output
from utils import get_default_parser, inference, print_output

if __name__ == "__main__":
parser = get_defualt_parser()
parser = get_default_parser()
args = parser.parse_args()
start = time.time()
torch.set_default_dtype(torch.bfloat16)
Expand Down
4 changes: 2 additions & 2 deletions examples/language/grok-1/inference_tp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch
from grok1_policy import Grok1ForCausalLMPolicy
from transformers import AutoModelForCausalLM, AutoTokenizer
from utils import get_defualt_parser, inference, print_output
from utils import get_default_parser, inference, print_output

import colossalai
from colossalai.booster import Booster
Expand All @@ -13,7 +13,7 @@
from colossalai.utils import get_current_device

if __name__ == "__main__":
parser = get_defualt_parser()
parser = get_default_parser()
args = parser.parse_args()
start = time.time()
colossalai.launch_from_torch({})
Expand Down
2 changes: 1 addition & 1 deletion examples/language/grok-1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def inference(model, tokenizer, text, **generate_kwargs):
return outputs[0].tolist()


def get_defualt_parser():
def get_default_parser():
parser = argparse.ArgumentParser()
parser.add_argument("--pretrained", type=str, default="hpcaitech/grok-1")
parser.add_argument("--tokenizer", type=str, default="tokenizer.model")
Expand Down

0 comments on commit 341263d

Please sign in to comment.