-
Notifications
You must be signed in to change notification settings - Fork 125
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
Llama2 handler #425
Llama2 handler #425
Conversation
|
||
import deepspeed | ||
import torch | ||
from transformers import (AutoModelForCausalLM, AutoTokenizer, |
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.
I don't see AutoModel or AutoTokenizer used anywhere.
|
||
INPUT_KEY = 'input' | ||
PARAMETERS_KEY = 'parameters' | ||
MODEL_DTYPE = 'fp16' |
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.
Unused?
def __init__( | ||
self, | ||
model_name_or_path: str, | ||
): |
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.
Could we add a max_output_tokens
parameter here, or in the go server? We'd then clip user max_length
values in requests to this.
This is a slow model and we'll probably need to limit it to globally to 128 tokens. Otherwise someone could send a super long request and tie up the entire server for >30 sec.
No description provided.