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

Support streaming for lookup generation #11922

Merged

Conversation

Oscilloscope98
Copy link
Contributor

@Oscilloscope98 Oscilloscope98 commented Aug 26, 2024

Description

https://github.com/analytics-zoo/nano/issues/1589#issuecomment-2309918037

  • Support streaming for lookup generation
  • Add fallback to original generate behavior for batch inference and beam search
  • Support input threshold judgement for inputs through inputs = tokenizer([input_str], return_tensors="pt"), and generate through generate(**inputs, ...)

TODO: Further optimize lookup stream generation speed if possible

@Oscilloscope98 Oscilloscope98 changed the title Lookup streaming support Support streaming for lookup generation Aug 26, 2024
Copy link
Contributor

@cyita cyita left a comment

Choose a reason for hiding this comment

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

LGTM

@Oscilloscope98
Copy link
Contributor Author

Oscilloscope98 commented Aug 26, 2024

Copy link
Contributor

@jason-dai jason-dai left a comment

Choose a reason for hiding this comment

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

LGTM

@Oscilloscope98 Oscilloscope98 merged commit c1d07bc into intel-analytics:main Aug 26, 2024
1 check passed
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