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

Generalized streaming control stop_sequences #14782

Closed

Conversation

ArthurBook
Copy link

  • Description:
    Introduces StopSequenceAwareStreamer that enhances streaming control by allowing end users to specify arbitrary stop sequences spanning multiple tokens, without knowledge of the tokenizer. This generalizes current functionality, adding capabilities without changing API. End users' current implementations will work the same while allowing longer stop sequences.
  • Issue: -
  • Dependencies: None
  • Twitter handle: https://twitter.com/TheRealABook

Happy Friday <:)
This is still a draft in the sense that I would welcome your thoughts on: 1) where this logic would best be centralized. 2) which LLMs that we want to implement this for.
I've tested this out locally but will happily add unit tests for the components once we firm up the above two points!

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 15, 2023
Copy link

vercel bot commented Dec 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2024 4:46pm

@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels Dec 15, 2023
@ArthurBook ArthurBook changed the title Enhanced Generalized Streaming Control of stop_sequences Generalized streaming control stop_sequences Dec 15, 2023
@ArthurBook
Copy link
Author

Hi @hwchase17 ! Happy new year!

I think this feature could be useful while providing a convenient layer of abstraction that centralizes the streaming logic. Who would be best suited for giving it a look?

Many thanks in advance.

@ArthurBook
Copy link
Author

Hi @baskaryan, @eyurtsev, @hwchase17.
Following up on this - let me know if there is any more clarifying examples that I would provide to speed up the review.

In a nutshell, this PR enables arbitrary stop_sequences to be passed and centralizes the streaming logic into Streamer(ABC).

@hwchase17 hwchase17 closed this Jan 30, 2024
@ArthurBook
Copy link
Author

@hwchase17 Hi! Noticed that you closed this PR.
Do you have any feedback on why? Think this could be useful both as a feature and centralization of streaming logic.

@baskaryan
Copy link
Collaborator

not intentional, we can't reopen at the moment but will do so as soon as we can :/ See #16796

@baskaryan baskaryan reopened this Jan 30, 2024
@ArthurBook
Copy link
Author

Hi! @hwchase17 @baskaryan
Wanted to bump this back up.

@ccurme ccurme added the community Related to langchain-community label Jun 18, 2024
@efriis
Copy link
Member

efriis commented Aug 30, 2024

howdy! This is in the deprecated huggingface community integration - could you confirm this is still an issue in the partner package, and if so, submit an issue and/or PR against that?

@efriis efriis closed this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Related to langchain-community 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features Ɑ: models Related to LLMs or chat model modules size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants