通过消除子词元增强字符级文本填充
Empowering Character-level Text Infilling by Eliminating Sub-Tokens
AI总结:
针对字符级文本填充中边界子词元导致推理困惑度高的问题,本文提出 FIM-SE,通过行级格式和特殊词元避免预测子词元并增强约束,实验显著优于已有方法。
摘要:
在填充任务中,子词元表示完整词元被切分成两部分的情况,常出现在前缀、中间部分和后缀的边界处。传统方法侧重于在词元层面训练模型,导致推理阶段字符级填充任务性能欠佳。另一些方法考虑了字符级填充,但它们在推理时依赖预测子词元;由于模型在子词元上的困惑度较高,这种策略削弱了字符级填充任务的能力。本文提出 FIM-SE,即同时具有起始和结束字符约束的 Fill-In-the-Middle(中间填充)。该方法利用行级格式处理字符级填充任务,从而在推理时避免预测任何子词元。此外,我们引入两个特殊词元来表示不完整行的剩余部分,以增强生成引导。大量实验表明,所提方法优于以往方法,具有显著优势。代码位于 https://github.com/SenseLLM/FIM-SE。
英文摘要:
In infilling tasks, sub-tokens, representing instances where a complete token is segmented into two parts, often emerge at the boundaries of prefixes, middles, and suffixes. Traditional methods focused on training models at the token level, leading to sub-optimal performance in character-level infilling tasks during the inference stage. Alternately, some approaches considered character-level infilling, but they relied on predicting sub-tokens in inference, yet this strategy diminished ability in character-level infilling tasks due to the large perplexity of the model on sub-tokens. In this paper, we introduce FIM-SE, which stands for Fill-In-the-Middle with both Starting and Ending character constraints. The proposed method addresses character-level infilling tasks by utilizing a line-level format to avoid predicting any sub-token in inference. In addition, we incorporate two special tokens to signify the rest of the incomplete lines, thereby enhancing generation guidance. Extensive experiments demonstrate that our proposed approach surpasses previous methods, offering a significant advantage. Code is available at https://github.com/SenseLLM/FIM-SE.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。