The goal of text style transfer is to transform the style of texts while preserving their original meaning, often with only a few examples of the target style. Existing style transfer methods generally rely on the few-shot capabilities of large language models or on complex controllable text generation approaches that are inefficient and underperform on fluency metrics. We introduce TinyStyler, a lightweight but effective approach, which leverages a small language model (800M params) and pre-trained authorship embeddings to perform efficient, few-shot text style transfer. We evaluate on the challenging task of authorship style transfer and find TinyStyler outperforms strong approaches such as GPT-4. We also evaluate TinyStyler's ability to perform text attribute style transfer (formal $\leftrightarrow$ informal) with automatic and human evaluations and find that the approach outperforms recent controllable text generation methods. Our model has been made publicly available at https://huggingface.co/tinystyler/tinystyler .
翻译:文本风格迁移的目标是在保持原文意义的同时转换文本风格,通常仅需少量目标风格的示例。现有的风格迁移方法通常依赖于大型语言模型的小样本能力,或采用复杂且低效的可控文本生成方法,这些方法在流畅性指标上表现欠佳。我们提出了TinyStyler,一种轻量级但高效的方法,它利用小型语言模型(8亿参数)和预训练的作者身份嵌入来实现高效的小样本文本风格迁移。我们在具有挑战性的作者风格迁移任务上进行了评估,发现TinyStyler优于GPT-4等强基线方法。我们还通过自动和人工评估测试了TinyStyler在文本属性风格迁移(正式$\leftrightarrow$非正式)上的能力,结果表明该方法优于近期的可控文本生成方法。我们的模型已在https://huggingface.co/tinystyler/tinystyler 公开提供。