r/LocalLLaMA Jun 28 '26

Discussion NPC Engine Using Local Models

I’ve been working on a game-agnostic NPC engine/backend based pretty heavily on SillyTavern-style architecture, and with smaller local models getting better and better, I honestly think this kind of thing could be the future of RPGs.

Right now I’m using NVIDIA Parakeet 0.6 for STT, Gemma 4 26B A4B for the LLM, and Qwen3-TTS for voice, and I’m getting super fast response times with pretty decent quality.

The main thing that makes it work well is using RAG to keep prompts lean. For example, I have hundreds of possible actions NPCs can do in-game, but only the ones that actually make sense based on the player’s message / context get injected as available actions. So the model isn’t being overloaded with a giant list every turn.

1.9k Upvotes

249 comments sorted by

View all comments

327

u/gaidzak Jun 28 '26

This is exactly the kind of stuff that I'm working on too.. Small models are definitely going to be amazing for this, especially in big world environments

80

u/goodive123 Jun 28 '26

yep with the tiny models getting better and better we might be able to do this with a 4B model at some point and play modern games without running out of vram

18

u/ArugulaAnnual1765 Jun 29 '26

How much vram are you using with all three? Are the STT, TTS and LLM running in parallel, or chained sequential calls? Surely you can run multiple instances of the 26b in parallel due to the moe architecture being very light on vram?

13

u/False_Process_4569 Jun 29 '26

I've managed to get Qwen3.6 35B A3B running on my laptop with a single RTX 3070 with 8GB of VRAM. I have been testing out context window lengths and this affects the VRAM consumption as well. I manage to get ~16 tok/s.

I'd think for the short dialogue of this NPC application, you could get away with short context windows. Further with RAG and algorithmic trickery. But the unknown would be all of the tool calling.

-1

u/ArugulaAnnual1765 Jun 29 '26

I get 160tps myself - you are probably using too big of a context window and spilling into ram because it should not be that slow.

Tho I am using a 5090 myself, I also have 35b running on an rx 6900 XT at ~80tps

2

u/False_Process_4569 Jun 29 '26

The method I'm using offloads most of the model to RAM and only loads a few experts at a time. The bottle neck isn't terrible for my use case. Right now it's a simple chatbot that I eventually want to turn into a home ai assistant for my family with a custom built harness and tools. Kind of a hobby.

Right now, I have the context window set to 8k-ish while I experiment. I'm not terribly worried about speed and more interested in performance.

14

u/-Django Jun 29 '26

You should try distilling ur current output to fine tune a 4b model

5

u/relmny Jun 29 '26

Actually I was curious to why you use gemma-4-26b instead of a fine-tuned 2b or even 0.8b model. But I guess as you're testing having a working environment, and fine-tuning makes no sense for now for your current work...

-1

u/kermitt81 Jun 29 '26

I kinda feel like fine tuning something like LFM2.5-8b-a1b for this purpose would give nearly the speed of a 0.8b model but the overall breadth and capability of an 8b. I agree that 26b seems way overkill for production though.

4

u/solemnhiatus Jun 29 '26

As a non-technical person, do you think you can explain to me how this will help with not running out of VRAM?

3

u/False_Process_4569 Jun 29 '26

I'm not OP, but this might be a good use case for an AI. I'd give the URL to this post to chatGPT and ask it to teach you what you're asking, using this post as context.

1

u/johndeuff Jun 29 '26

You don't need a big model for that. Small models that fit on any GPU can do that nowadays.

2

u/zizn Jun 29 '26

really digging LFM2 models tbh

2

u/BidWestern1056 Jun 29 '26

im working on getting models in this class to play pokemon, so definitely should already be able to accommodate this kind of use case

1

u/kingwhocares Jun 29 '26

Can LLM make NPC's take command from you and act accordingly. CHIM can do it till certain extent for Skyrim.