arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.04523cs.CLcs.LG
收藏

Proofread:一键修正所有错误

Proofread: Fixes All Errors with One Tap

Google Inc.(谷歌公司)

Renjie Liu, Yanxiang Zhang, Yun Zhu, Haicheng Sun, Yuanbo Zhang, Michael Xuelin Huang, Shanqing Cai, Lei Meng, Shumin Zhai

AI总结:

本文提出 Gboard 的 Proofread 功能,利用服务端 LLM 结合两阶段调优(SFT 与 RL)实现一键句子级和段落级纠错,并在 Pixel 8 上部署,PaLM2-XS 模型达到 85.56% 良好率。

摘要:

大型语言模型(LLMs)的卓越能力为重新构想用户的输入体验提供了一种强大方法。本文展示了 Proofread,这是一项由 Gboard 中服务端 LLM 驱动的新颖 Gboard 功能,能够通过一次点按实现句子级和段落级的无缝纠错。我们在本文中描述了完整系统,涵盖数据生成、指标设计到模型调优与部署。为获得质量足够的模型,我们实现了一套针对在线使用场景精心设计的数据合成流水线,设计了多维度指标,并采用两阶段调优方法来获取该功能专用的 LLM:首先通过监督微调(Supervised Fine Tuning,SFT)建立基础质量,随后采用强化学习(Reinforcement Learning,RL)调优方法进行针对性优化。具体而言,我们发现在 SFT 阶段对 Rewrite 和 proofread 任务进行顺序调优可获得最佳质量,并在 RL 调优阶段提出全局奖励和直接奖励以寻求进一步改进。在人工标注的黄金测试集上进行的大量实验表明,我们调优后的 PaLM2-XS 模型达到了 85.56% 的良好率。我们通过在 Google Cloud 的 TPU v5 上部署该模型,将此功能发布到 Pixel 8 设备上,拥有数千名日活跃用户。通过量化、分桶推理、文本分割和推测解码,服务延迟显著降低。我们的演示可在 https://youtu.be/4ZdcuiwFU7I 观看。

英文摘要:

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}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑