Proofread: Fixes All Errors with One Tap
Renjie Liu, Yanxiang Zhang, Yun Zhu, Haicheng Sun, Yuanbo Zhang, Michael Xuelin Huang, Shanqing Cai, Lei Meng, Shumin Zhai
TL;DR
The paper addresses the challenge of delivering high-quality, long-span proofreading for mobile typing by integrating a server-side LLM into Gboard. It introduces a synthetic data pipeline, a multifaceted metric design, and a two-stage tuning workflow (SFT followed by RL with Global and Direct Rewards) built on PaLM2-XS, followed by deployment optimizations such as quantization and speculative decoding. Empirical results show substantial improvements, achieving around 85% good corrections on a golden set and significant latency reductions, enabling real-time performance on Pixel 8 devices via TPUv5e. The work demonstrates the practical viability of large-language-model–driven proofreading for fast typists and outlines future directions including multilingual support and privacy-preserving on-device solutions.
Abstract
The impressive capabilities in Large Language Models (LLMs) provide a powerful approach to reimagine users' typing experience. This paper demonstrates Proofread, a novel Gboard feature powered by a server-side LLM in Gboard, enabling seamless sentence-level and paragraph-level corrections with a single tap. We describe the complete system in this paper, from data generation, metrics design to model tuning and deployment. To obtain models with sufficient quality, we implement a careful data synthetic pipeline tailored to online use cases, design multifaceted metrics, employ a two-stage tuning approach to acquire the dedicated LLM for the feature: the Supervised Fine Tuning (SFT) for foundational quality, followed by the Reinforcement Learning (RL) tuning approach for targeted refinement. Specifically, we find sequential tuning on Rewrite and proofread tasks yields the best quality in SFT stage, and propose global and direct rewards in the RL tuning stage to seek further improvement. Extensive experiments on a human-labeled golden set showed our tuned PaLM2-XS model achieved 85.56\% good ratio. We launched the feature to Pixel 8 devices by serving the model on TPU v5 in Google Cloud, with thousands of daily active users. Serving latency was significantly reduced by quantization, bucket inference, text segmentation, and speculative decoding. Our demo could be seen in \href{https://youtu.be/4ZdcuiwFU7I}{Youtube}.
