-
Notifications
You must be signed in to change notification settings - Fork 493
Add token streaming for text generation #130
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
Conversation
You can run |
Oh i missed that! We don't use it from Node in moon-landing, @SBrandeis? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this PR @vvmnnnkv !
There's a big refacto request (streams => async generators), it's maybe more than you bargained for when opening the PR ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! 🤗
cc @radames @TimMikeladze :)
A demo is live with the feature: https://huggingface.co/spaces/huggingfacejs/streaming-text-generation It's released in version 1.7.1. Thanks again :) |
nice demo! |
An attempt to fix #78 :-)
Added a separate method
textGenerationStream
(similar to python client).Not using
fetch-event-source
because it doesn't play well with nodejs (Azure/fetch-event-source#20).But should be easy to replace in the future.