内存受限条件下,小型字符模型在自动补全中可媲美大型词模型
Small Character Models Match Large Word Models for Autocomplete Under Memory Constraints
AI总结:
本文针对内存受限的开放域自动补全,证明控制模型规模时小型字符模型可媲美大型词模型,并通过组合归纳偏置与词模型表示迁移进一步提升性能。
摘要:
自动补全是指用户输入一段称为提示(prompt)的文本,模型以其为条件生成语义连贯续写内容的任务。现有针对该任务的工作主要聚焦于具有高频用户提示模式(或聚焦型提示)的数据集(如电子邮件、聊天),在这些场景中基于词的语言模型相当有效。本文研究更具挑战性的开放域设置,其中包含低频用户提示模式(或宽泛型提示,例如关于第93届奥斯卡金像奖的提示),并证明基于字符的语言模型的有效性。我们在内存受限设置(如边缘设备和智能手机)下研究该问题,此时基于字符的表示能有效降低整体模型规模(以参数量计)。我们使用WikiText-103基准模拟宽泛型提示,并证明在控制模型规模时,字符模型在自动补全任务的精确匹配准确率上可与词模型匹敌。例如,我们表明在普通设置下,一个2000万参数的字符模型表现与8000万参数的词模型相近。我们进一步提出通过以组合信息形式融入归纳偏置以及从大型词模型进行表示迁移来改进字符模型的新方法。本工作使用的数据集和代码可在https://github.com/UBC-NLP/char_autocomplete获取。
英文摘要:
Autocomplete is a task where the user inputs a piece of text, termed prompt, which is conditioned by the model to generate semantically coherent continuation. Existing works for this task have primarily focused on datasets (e.g., email, chat) with high frequency user prompt patterns (or focused prompts) where word-based language models have been quite effective. In this work, we study the more challenging open-domain setting consisting of low frequency user prompt patterns (or broad prompts, e.g., prompt about 93rd academy awards) and demonstrate the effectiveness of character-based language models. We study this problem under memory-constrained settings (e.g., edge devices and smartphones), where character-based representation is effective in reducing the overall model size (in terms of parameters). We use WikiText-103 benchmark to simulate broad prompts and demonstrate that character models rival word models in exact match accuracy for the autocomplete task, when controlled for the model size. For instance, we show that a 20M parameter character model performs similar to an 80M parameter word model in the vanilla setting. We further propose novel methods to improve character models by incorporating inductive bias in the form of compositional information and representation transfer from large word models. Datasets and code used in this work are available at https://github.com/UBC-NLP/char_autocomplete.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。