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

06/28/2023
by   Allen Roush, et al.
0

Despite rapid advancement in the field of Constrained Natural Language Generation, little time has been spent on exploring the potential of language models which have had their vocabularies lexically, semantically, and/or phonetically constrained. We find that most language models generate compelling text even under significant constraints. We present a simple and universally applicable technique for modifying the output of a language model by compositionally applying filter functions to the language models 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

READ FULL TEXT
research
05/03/2022

Learning to Transfer Prompts for Text Generation

Pretrained language models (PLMs) have made remarkable progress in text ...
research
07/17/2023

COLLIE: Systematic Construction of Constrained Text Generation Tasks

Text generation under constraints have seen increasing interests in natu...
research
07/19/2023

On the Origin of LLMs: An Evolutionary Tree and Graph for 15,821 Large Language Models

Since late 2022, Large Language Models (LLMs) have become very prominent...
research
12/29/2020

A Theoretical Analysis of the Repetition Problem in Text Generation

Text generation tasks, including translation, summarization, language mo...
research
10/28/2021

BERTian Poetics: Constrained Composition with Masked LMs

Masked language models have recently been interpreted as energy-based se...
research
08/15/2023

Teach LLMs to Personalize – An Approach inspired by Writing Education

Personalized text generation is an emerging research area that has attra...
research
03/08/2023

Cost-Effective Hyperparameter Optimization for Large Language Model Generation Inference

Large Language Models (LLMs) like GPT-3 have sparked significant interes...

Please sign up or login with your details

Forgot password? Click here to reset