-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapted megatronlm server implementation for interacting with lm eval… #8
base: main
Are you sure you want to change the base?
Conversation
megatron/tokenizer/tokenizer.py
Outdated
@@ -43,7 +43,8 @@ def build_tokenizer(args): | |||
elif args.tokenizer_type == "OpenGPTX-PretrainedHFTokenizer": | |||
tokenizer = PretrainedHFTokenizer.instantiate_from_file_or_name(model_file_or_name=args.tokenizer_model) | |||
elif args.tokenizer_type == "OpenGPTX-SPTokenizer": | |||
tokenizer = SPTokenizer.instantiate_from_file_or_name(model_file_or_name=args.tokenizer_model) | |||
#tokenizer = SPTokenizer.instantiate_from_file_or_name(model_file_or_name=args.tokenizer_model) | |||
tokenizer = _GPTXSentencePieceTokenizer(args.tokenizer_model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToDo: The _GPTXSentencePieceTokenizer is used for inference.
megatron/text_generation_server.py
Outdated
@@ -164,48 +179,60 @@ def put(self): | |||
if len(prompts) > 1: | |||
return "When doing beam_search, batch size must be 1" | |||
|
|||
stop_token=50256 | |||
stop_token = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting this to a constant 3 is wrong. I haven't tested generation yet, but I guess this should be the ID of the EOD token, so we need to get it from the tokenizer.
Marking as stale. No activity in 60 days. |
… harness client