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

[Feat] Add streaming to chatbot #1272

Merged
merged 11 commits into from
Oct 16, 2023
Merged

[Feat] Add streaming to chatbot #1272

merged 11 commits into from
Oct 16, 2023

Conversation

rahul-tuli
Copy link
Member

@rahul-tuli rahul-tuli commented Sep 25, 2023

This PR adds streaming mode to deepsparse.infer chatbot

Test Command:

deepsparse.infer /home/rahul/.cache/sparsezoo/neuralmagic/codegen_mono-350m-bigpython_bigquery_thepile-base/deployment \
    --stream 

Output:

2023-09-26 11:56:38 deepsparse.transformers WARNING  The neuralmagic fork of transformers may not be installed. It can be installed via `pip install nm_transformers`
Using pad_token, but it is not set yet.
2023-09-26 11:56:41 deepsparse.transformers.pipelines.text_generation INFO     Compiling an auxiliary engine to process a prompt with a larger processing length. This improves performance, but may result in additional memory consumption.
2023-09-26 11:56:42 deepsparse.utils.onnx INFO     Overwriting in-place the input shapes of the transformer model at /home/rahul/.cache/sparsezoo/neuralmagic/codegen_mono-350m-bigpython_bigquery_thepile-base/deployment/model.onnx
DeepSparse, Copyright 2021-present / Neuralmagic, Inc. version: 1.6.0.20230910 COMMUNITY | (c66b57da) (release) (optimized) (system=avx512, binary=avx512)
2023-09-26 11:56:51 deepsparse.utils.onnx INFO     Overwriting in-place the input shapes of the transformer model at /home/rahul/.cache/sparsezoo/neuralmagic/codegen_mono-350m-bigpython_bigquery_thepile-base/deployment/model.onnx
User: def fact(
Bot: n):
    if n == 0:
        return 1
    else:
        return n * fact(n-1)

def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

def factorial_recursive(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive(n-1)

def factorial_recursive_2(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_2(n-1)

def factorial_recursive_3(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_3(n-1)

def factorial_recursive_4(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_4(n-1)

def factorial_recursive_5(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_5(n-1)

def factorial_recursive_6(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_6(n-1)

def factorial_recursive_7(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_7(n-1)

def factorial_recursive_8(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_8(n-1)

def factorial_recursive_9(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_9(n-1)

def factorial_recursive_10(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_10(n-1)

def factorial_recursive_11(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_11(n-1)

def factorial_recursive_12(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_12(n-1)

def factorial_recursive_13(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_13(n-1)

def factorial_recursive_14(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_14(n-1)

def factorial_recursive_15(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_15(n-1)

def factorial_recursive_16(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_16(n-1)

def factorial_recursive_17(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_17(n-1)

def factorial_recursive_18(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_18(n-1)

def factorial_recursive_19(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_19(n-1)

def factorial_recursive_20(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_20(n-1)

def factorial_recursive_21(n):
    if n == 0:
        return 1
    else:
        return n * factorial_recursive_21(n-1)

def factorial_recursive_22(n):
    if n == 0:

dbogunowicz
dbogunowicz previously approved these changes Sep 25, 2023
Base automatically changed from chat_demo_prod to main September 25, 2023 20:13
@bfineran bfineran dismissed dbogunowicz’s stale review September 25, 2023 20:13

The base branch was changed.

@rahul-tuli rahul-tuli changed the title [BugFix] Add streaming to chatbot [Feat] Add streaming to chatbot Sep 26, 2023
@rahul-tuli rahul-tuli changed the base branch from main to bugfix-chat-pipeline-streaming-mode September 26, 2023 16:17
Base automatically changed from bugfix-chat-pipeline-streaming-mode to main September 29, 2023 16:09
@rahul-tuli rahul-tuli merged commit e7ec235 into main Oct 16, 2023
17 of 26 checks passed
@rahul-tuli rahul-tuli deleted the add-streaming-to-chatbot branch October 16, 2023 14:06
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.

None yet

4 participants