用小模型+可换内存实现游戏角色长期对话,本地运行不卡顿
Fixed-Persona SLMs with Modular Memory: Scalable NPC Dialogue on Consumer Hardware
- 小模型搭配可动态切换的记忆模块,保持角色个性
- 三款开源小模型实测,消费级硬件上流畅运行
- 适合需要长期记忆的虚拟助手、客服机器人等场景
大型语言模型虽能生成类人文本,但在游戏对话系统中受限于硬件需求、延迟和知识边界。本文提出一种模块化非玩家角色(NPC)对话系统,采用微调后的小语言模型(SLMs)承载特定角色人格,并结合运行时可替换的记忆模块,保存角色专属对话上下文与世界知识,实现富有表现力的互动与长期记忆,无需重训或重启模型。我们使用三个开源小模型——DistilGPT-2、TinyLlama-1.1B-Chat 和 Mistral-7B-Instruct——在合成的人格对齐数据上训练,并在消费级硬件上进行综合评估。该方法不仅适用于游戏,其模块化设计与人格驱动的记忆架构也具备向虚拟助手、客户服务机器人及互动教育系统等领域的扩展潜力。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated remarkable capabilities in generating human-like text, yet their applicability to dialogue systems in computer games remains limited. This limitation arises from their substantial hardware requirements, latency constraints, and the necessity to maintain clearly defined knowledge boundaries within a game setting. In this paper, we propose a modular NPC dialogue system that leverages Small Language Models (SLMs), fine-tuned to encode specific NPC personas and integrated with runtime-swappable memory modules. These memory modules preserve character-specific conversational context and world knowledge, enabling expressive interactions and long-term memory without retraining or model reloading during gameplay. We comprehensively evaluate our system using three open-source SLMs: DistilGPT-2, TinyLlama-1.1B-Chat, and Mistral-7B-Instruct, trained on synthetic persona-aligned data and benchmarked on consumer-grade hardware. While our approach is motivated by applications in gaming, its modular design and persona-driven memory architecture hold significant potential for broader adoption in domains requiring expressive, scalable, and memory-rich conversational agents, such as virtual assistants, customer support bots, or interactive educational systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。