Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
102 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Most Language Models can be Poets too: An AI Writing Assistant and Constrained Text Generation Studio (2306.15926v1)

Published 28 Jun 2023 in cs.CL, cs.AI, and cs.LG

Abstract: Despite rapid advancement in the field of Constrained Natural Language Generation, little time has been spent on exploring the potential of LLMs which have had their vocabularies lexically, semantically, and/or phonetically constrained. We find that most LLMs generate compelling text even under significant constraints. We present a simple and universally applicable technique for modifying the output of a LLM by compositionally applying filter functions to the LLMs vocabulary before a unit of text is generated. This approach is plug-and-play and requires no modification to the model. To showcase the value of this technique, we present an easy to use AI writing assistant called Constrained Text Generation Studio (CTGS). CTGS allows users to generate or choose from text with any combination of a wide variety of constraints, such as banning a particular letter, forcing the generated words to have a certain number of syllables, and/or forcing the words to be partial anagrams of another word. We introduce a novel dataset of prose that omits the letter e. We show that our method results in strictly superior performance compared to fine-tuning alone on this dataset. We also present a Huggingface space web-app presenting this technique called Gadsby. The code is available to the public here: https://github.com/Hellisotherpeople/Constrained-Text-Generation-Studio

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Allen Roush (7 papers)
  2. Sanjay Basu (5 papers)
  3. Akshay Moorthy (1 paper)
  4. Dmitry Dubovoy (1 paper)
Citations (4)