Scalable Local Characters using Fine-Tuned Small Language Models
Open Access DepositedLarge Language Models (LLMs) have significantly improved the realism of AI-driven Non-Player Characters (NPCs) in video games, enabling more natural and context-aware interactions. However, deploying these models often requires substantial computational resources, limiting their practical use to cloud-based systems. This research presents a locally deployable solution using Small Language Models (SLMs), fine-tuned via Quantized Low-Rank Adaptation (QLoRA). Embedding character specific tone and personality into adapter layers enables rapid runtime personality swapping across hundreds of characters using a single quantized base model. The system is built on a Quantized Phi-3.5-mini-instruct model which fits within 2.125 GB of VRAM, making it compatible with at least 83.56% of gaming PCs according to the April 2025 Steam Hardware Survey. The model delivers over 34 tokens per second on average consumer hardware, higher than typical in-game scripted dialogue text speeds. This is also faster than the silent reading speed of an average human.We used the PingPong benchmark, an LLM-as-a-judge evaluation method to compare the base model and LoRA fine-tuned models across different characters for character consistency, entertainment value, and language fluency. The LoRA models show an average improvement of 13.36% in character consistency and a 12.49% improvement in entertainment value with no significant change in fluency. We also used emotion classification to compare the generated responses from the models against the real scripted dialogue and saw an average improvement of 27.51% in similarity to the scripted dialogues. This research establishes that fine-tuned, Quantized SLMs can deliver believable and responsive AI NPCs without requiring cloud infrastructure, thus expanding accessibility and scalability for modern game development.
- All rights reserved
Notice to Authors
If you are the author of this work and you have any questions about the information on this page, please use the Contact form to get in touch with us.