Recently, the development of open-source large language models (LLMs) has advanced rapidly. Nevertheless, due to data constraints, the capabilities of most open-source LLMs are primarily focused on English. To address this issue, we introduce the concept of chat vector to equip pre-trained language models with instruction following and human value alignment via simple model arithmetic. The chat vector is derived by subtracting the weights of a pre-trained base model (e.g. LLaMA2) from those of its corresponding chat model (e.g. LLaMA2-chat). By simply adding the chat vector to a continual pre-trained model's weights, we can endow the model with chat capabilities in new languages without the need for further training. Our empirical studies demonstrate the superior efficacy of the chat vector from three different aspects: instruction following, toxicity mitigation, and multi-turn dialogue. Moreover, to showcase the adaptability of our approach, we extend our experiments to encompass various languages, base models, and chat vectors. The results underscore the chat vector's simplicity, effectiveness, and wide applicability, making it a compelling solution for efficiently enabling conversational capabilities in pre-trained language models.
翻译:近期,开源大语言模型(LLMs)发展迅速。然而,受数据限制,多数开源LLMs的能力主要集中于英语。为解决此问题,我们引入聊天向量概念,通过简单的模型算术运算赋予预训练语言模型指令遵循与人类价值对齐能力。聊天向量通过从预训练基础模型(如LLaMA2)的权重中减去其对应聊天模型(如LLaMA2-chat)的权重得到。只需将聊天向量添加到持续预训练模型的权重中,即可无需进一步训练便赋予模型在新语言中的聊天能力。我们的实证研究从指令遵循、毒性缓解和多轮对话三个不同方面证明了聊天向量的卓越有效性。此外,为展示该方法的适应性,我们将实验扩展至多种语言、基座模型及聊天向量。结果凸显了聊天向量的简洁性、有效性和广泛适用性,使其成为高效赋予预训练语言模型对话能力的引人瞩目的解决方案。