Ctrl–G
Adding control to LLMs.

Ctrl-G (1) distills Hidden Markov Models (HMMs) as white-box approximations of LLMs, (2) specify constraints as deterministic finite automata (DFAs), and (3) condition the HMMs on DFAs to provide inference-time guidance for LLMs to satisfy the constraint, with guarantees.
We provide an interface for testing interactive text editing with controllable features. Our platform supports the use of both Ctrl-G and OpenAI models as writing assistants.
Proceedings of NeurIPS 2024.
Code for training Ctrl–G HMMs.
Trained HMM and Llama checkpoints.
Check out our evaluation results on CoAuthor, CommonGen and TextInfilling datasets.