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

Interface with text-generation-inference (TGI) #1

Open
rlouf opened this issue Aug 14, 2024 · 0 comments
Open

Interface with text-generation-inference (TGI) #1

rlouf opened this issue Aug 14, 2024 · 0 comments
Labels
TGI Related to the integration with `text-generation-inference`

Comments

@rlouf
Copy link
Member

rlouf commented Aug 14, 2024

From my understanding of the code in TGI (building the FSM and using the FSM to bias logits) and discussions on the hf-dottxt-outlines-collab TGI interacts with Outlines in the following way:

  1. The FSM is compiled in Python using RegexFSM
  2. The instance of RegexFSM is used to bias logits

While (2) can remain in Python we would like to port the logic necessary to build the FSM (1) to Rust. This means porting:

  • create_fsm_index_tokenizer;
  • The interegular library used to build a DFA from a regular expression;
  • The JSON Schema to Regex translation logic;
  • Ideally we can integrate with the Rust tokenizers directly so we don't have to deal with type conversion.
@rlouf rlouf added the TGI Related to the integration with `text-generation-inference` label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TGI Related to the integration with `text-generation-inference`
Projects
None yet
Development

No branches or pull requests

1 participant