Skip to content
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

Closed
wants to merge 7 commits into from
Closed

Llama2 handler #425

wants to merge 7 commits into from

Conversation

margaretqian
Copy link
Contributor

No description provided.

@margaretqian margaretqian changed the title [WIP] Llama2 handler Llama2 handler Jul 29, 2023
@margaretqian margaretqian marked this pull request as ready for review July 29, 2023 07:29

import deepspeed
import torch
from transformers import (AutoModelForCausalLM, AutoTokenizer,
Copy link
Contributor

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'
Copy link
Contributor

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,
):
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants