Rustformers API is synchronous and doesn't directly support streaming responses. As it's quite hard to build anything usable on top of the callback API, I wrote a little example to get streaming response out of rustformers. The solution leverages std::sync::mpsc
channels. This also works with actix
however only producers can be cloned so the consumer (inference response sender) still needs to be static.
-
Notifications
You must be signed in to change notification settings - Fork 0
Wrap Rustformers' LLM inference in a stream.
License
tauseefk/streamformers
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Wrap Rustformers' LLM inference in a stream.
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published