RewriteLM: An Instruction-Tuned Large Language Model for Text Rewriting

Lei Shu, Liangchen Luo, Jayakumar Hoskere, Yun Zhu, Yinxiao Liu +3 more
5/25/2023
cs.CLcs.AI

Official code: google-research/google-research (39,000 stars, Apache-2.0, last commit 2026-04-30).

Abstract

Large Language Models (LLMs) have demonstrated impressive capabilities in creative tasks such as storytelling and E-mail generation. However, as LLMs are primarily trained on final text results rather than intermediate revisions, it might be challenging for them to perform text rewriting tasks. Most studies in the rewriting tasks focus on a particular transformation type within the boundaries of single sentences. In this work, we develop new strategies for instruction tuning and reinforcement learning to better align LLMs for cross-sentence rewriting tasks using diverse wording and structures expressed through natural languages including 1) generating rewriting instruction data from Wiki edits and public corpus through instruction generation and chain-of-thought prompting; 2) collecting comparison data for reward model training through a new ranking function. To facilitate this research, we introduce OpenRewriteEval, a novel benchmark covers a wide variety of rewriting types expressed through natural language instructions. Our results show significant improvements over a variety of baselines. The public repository is available on GitHub under Google Research (https://github.com/google-research/google-research/tree/master/rewritelm).

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Google Research

39,0008,488C, ROct 4, 20185 months agoApache-2.0
aimachine-learningresearch

Similar Papers

Cite this paper

@article{shu2023rewritelm,
  title  = {RewriteLM: An Instruction-Tuned Large Language Model for Text Rewriting},
  author = {Lei Shu and Liangchen Luo and Jayakumar Hoskere and Yun Zhu and Yinxiao Liu and Simon Tong and Jindong Chen and Lei Meng},
  year   = {2023},
  eprint = {2305.15685},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.15685v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.15685.svg)](https://codeofpaper.com/paper/2305.15685)

Discussion