arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.04335cs.CL
收藏

ReTok:替换分词器以提升大语言模型的表征效率

ReTok: Replacing Tokenizer to Enhance Representation Efficiency in Large Language Model

Data Research Team, BAAI(北京智源人工智能研究院数据研究团队)

Shuhao Gu, Mengdi Zhao, Bowen Zhang, Liangdong Wang, Jijie Li, Guang Liu

AI总结:

本研究针对大语言模型分词器压缩率不稳定导致成本升高的问题,提出ReTok方法,通过替换分词器并仅微调输入输出层参数,在保持模型性能的同时显著提升长文本解码效率。

摘要:

分词器是大语言模型(LLM)的核心组件,高压缩率的分词器能够提升模型的表征与处理效率。但分词器无法在所有场景下都保证高压缩率,输入输出平均长度的增加会提升模型的训练与推理成本。因此,在维持模型性能的前提下,以最低成本提升模型效率至关重要。本研究提出一种通过替换LLM分词器来提升模型表征与处理效率的方法。我们提出用原模型的参数替换并重新初始化模型的输入层与输出层参数,在固定其他参数的情况下训练这些层的参数。我们在不同LLM上开展了实验,结果表明,该方法在替换分词器后能够维持模型性能,同时显著提升长文本的解码速度。

英文摘要:

Tokenizer is an essential component for large language models (LLMs), and a tokenizer with a high compression rate can improve the model's representation and processing efficiency. However, the tokenizer cannot ensure high compression rate in all scenarios, and an increase in the average input and output lengths will increases the training and inference costs of the model. Therefore, it is crucial to find ways to improve the model's efficiency with minimal cost while maintaining the model's performance. In this work, we propose a method to improve model representation and processing efficiency by replacing the tokenizers of LLMs. We propose replacing and reinitializing the parameters of the model's input and output layers with the parameters of the original model, and training these parameters while keeping other parameters fixed. We conducted experiments on different LLMs, and the results show that our method can maintain the performance of the model after replacing the tokenizer, while significantly improving the decoding speed for long texts.

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

↑