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

[TextGeneration] Add Streaming Functionality #1246

Merged
merged 13 commits into from
Sep 21, 2023
Prev Previous commit
Next Next commit
remove print
  • Loading branch information
dsikka committed Sep 21, 2023
commit c0c7e37338a33742ec22a8eb1f68c34efd0a1002
2 changes: 0 additions & 2 deletions src/deepsparse/transformers/pipelines/text_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,6 @@ def _create_generated_text_output(
finished_reason[0],
logits,
)
print(generation)
generations.append(generation)

return TextGenerationOutput(
Expand Down Expand Up @@ -676,7 +675,6 @@ def engine_forward(
finished_reason.append(FinishReason.STOP)
break

# TODO: Add any generic callback reason?
if callback is not None and callback(token) is False:
_LOGGER.debug(
"callback %s returned False, stopping generation."
Expand Down