TLDRocket
Sign in

Controllable Neural Text Generation

Lilian Weng

This article surveys methods for controlling the output of language models during text generation, covering decoding strategies like beam search and nucleus sampling, guided decoding approaches that incorporate feature discriminators, and regularized decoding frameworks that optimize for properties like uniform information density. Key concrete techniques include top-k sampling, nucleus sampling with cumulative probability thresholds, penalized sampling with repetition penalties around theta=1.2, and regularized beam search with lambda parameters optimized between 2 and 5 for translation tasks. These approaches enable users to steer unconditioned language models toward desired attributes such as topic, style, and sentiment without modifying model weights, making them applicable to controlled generation tasks like creating age-appropriate content.

Why it matters

[Updated on 2021-02-01: Updated to version 2.0 with several work added and many typos fixed.] [Updated on 2021-05-26: Add P-tuning and Prompt Tuning in the “prompt design” section.] [Updated on 2021-09-19: Add “unlikelihood training”.]

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads 60+ sources, removes duplicate coverage, and summarises the day in two minutes. Free, no spam, unsubscribe anytime.