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

[Stream] use huggingface standard generation for tnx #778

Merged
merged 1 commit into from
May 31, 2023

Conversation

lanking520
Copy link
Contributor

Description

Add TNX streaming generation for HuggingFace No-KV interface

@lanking520 lanking520 requested review from zachgk, frankfliu and a team as code owners May 30, 2023 20:06
@@ -23,10 +23,10 @@ def get_stream_generator(execution_engine: str):
## execution_engine passed to this function is not the same engine specified in serving.properties
## in djl-serving. For e.g Accelerate and neuronx use Python as the engine serving.properties
## The engine here refers to backend model parallel framework.
if execution_engine in {"DeepSpeed", "Accelerate"}:
if execution_engine in {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a list ["DeepSpeed", "Accelerate", "transformers-neuronx"] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A set will be better?

engines/python/setup/djl_python/streaming_utils.py Outdated Show resolved Hide resolved
engines/python/setup/djl_python/streaming_utils.py Outdated Show resolved Hide resolved
tests/integration/llm/sagemaker-endpoint-tests.py Outdated Show resolved Hide resolved
@lanking520 lanking520 merged commit b1105f7 into deepjavalibrary:master May 31, 2023
KexinFeng pushed a commit to KexinFeng/djl-serving-forked that referenced this pull request Aug 16, 2023
KexinFeng pushed a commit to KexinFeng/djl-serving-forked that referenced this pull request Aug 16, 2023
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.

2 participants