This paper proposes a simple method for controllable text generation based on weighting logits with a free-form classifier, namely CAIF sampling. Using an arbitrary text classifier, we adjust a small part of a language model's logits and guide text generation towards or away from classifier prediction. We experimented with toxicity avoidance and sentiment control tasks and showed that the proposed method significantly outperforms recent PPLM, GeDi, and DExperts on PPL and task accuracy metrics based on the external classifier of generated texts. In addition, compared to other approaches, it is easier to implement and tune and has significantly fewer restrictions and requirements.
翻译:本文提出一种简单的控制文本生成方法,其依据是带有自由格式分类器的加权记录,即CAIF抽样。我们使用任意的文本分类器,对语言模型的一小部分登录器进行调整,并指导文本生成,使之与分类器的预测一致。我们试验了避免毒性和情绪控制任务,并表明拟议方法大大优于最近的PPLM、Gedi和DExpert,以及基于生成文本外部分类器的任务精确度指标。此外,与其他方法相比,执行和调整更容易,限制和要求也少得多。