{"slug": "how-to-evaluate-deceptive-dialogue-in-llm-based-npcs", "title": "How to evaluate deceptive dialogue in LLM-based NPCs?", "summary": "A practitioner guide recommends fine-tuning small language models such as LFM2.5 230M/350M or Qwen3.5 800M with QLoRA at rank 16-32 and alpha 32-64, then applying DPO with a larger model's answers as the accepted outputs, to build deceptive-dialogue NPCs in a 3D game. The guide warns that quantized small models fall into repetition loops and advises keeping system prompts near 1k tokens within roughly 6k of context to limit VRAM use, using the Unsloth library or its free open-source Unsloth Studio GUI for training. It also suggests testing existing weights and cloud models like DeepSeek V4.1 Flash and GPT-6.1 SOL before committing to a fine-tune, and notes TTFT and compute must be managed so the model does not crash the game.", "body_md": "For a game I assume that its a 3d game. So you already have about 1GB+ dependancies and frameworks you import, so we have to save up on RAM/VRAM\n\none more assumption. I will assume you make this game for GPU users (anytype of accelrator for matrix multiplications)\n\nThen here is my plan:\n\nIf I were you, I would go for one of these models: LFM2.5 230m or the 350m model (the 350M is good). if you want to focus a lot on the model generalization capabiltiies, there are other options like qwen3.5 800M and qwen3 600M.\n\nIf you game has features where your playable character can show the NPCs pictures (eg: maps or tools the character collect) then the qwen3.5 800M model will com in clutch bcs its a native vision model.\n\nfirst, i recommend you to try using the existing weights provided by qwen or lfm and evaluate if they perform howver you want the NPCs to perform.\n\nif they dont, try several cloud models like deepseek v4.1 flash (new), GPT-6.1 SOL, etc. then se if there is something which match the vibe of the NPC. then if on does (also you can make the system prompt better as well). anyways, if a model worksout for you, make a system where you store conversations witht NPCs you do for a lot of times (you can get help from your friends for this) and store it as user/assistant turns in preferably a JSONL file.\n\nthen u can finetune a small model like LFM2.5 350M using QLoRA (or LoRA if you have the VRAM) at r16-32 (~20 is good) at A32-64 (usually 2x the rank).\n\nPersonally I like the “unsloth zoo” library. but they also have something called unsloth studio (it is free and opensource): [GitHub - unslothai/unsloth: Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4, MiniMax-H3, Gemma 4, FLUX and more. · GitHub](https://github.com/unslothai/unsloth)\n\nyou can use their GUI and train the models on top of the existing instruct model (use chatml)\n\nalso make sure the system prompt is about 1k ish or lower bcs we hav to preserve enough context length to not bloat the VRAM and also have enough for the player to talk with the NPC (so about 6k would be nice considering many edge cases). and when you are trainig make sure to use the same system prompt for the system prompt of the corresponding row.\n\nand one more thing. you usually quantize these models (q6 for this experiment would make sense), but the problem is that these models will enter something called a “repitition loop”. these small models will find that repeating the same last token is “cheaper” so they keps repeaing. eg: the capital of france is is is is is is is is is… [till it reach the context lngth limit or max new token limit]\n\nso once you are done doing some basic SFT, you have to make another dtaaset. for this dataset carry on a conversation with the NPC, and then you have to make a copy of that conversation and give it the same prompt (and get two outputs). one output is from you rSFT model, and one is from a big model like gpt-6.1 sol or any bg model in general. then put your model’s output as rejected and the big model’s answer as accepted.\n\nusing this dataset you can do DPO. its a preference optimization training technique. so the model will learn to mimick the accepted answers and try not to output rejected answers (it will generalize as well. just want to clear that fog, incase my wording is too vague)\n\nthen you will have a fairly decent model. but obviously you should try several techniques like prompt engineering, system prompts, finetuning, DPO, etc.\n\nTBF, DPO alone can be enough for these models. if doing SFT AND DPO is too much for you, try doing a DPO only run!\n\nonce you have the model you have to worry about things like TTFT and the compute requirement to run the models without crashing the game.", "url": "https://wpnews.pro/news/how-to-evaluate-deceptive-dialogue-in-llm-based-npcs", "canonical_source": "https://discuss.huggingface.co/t/how-to-evaluate-deceptive-dialogue-in-llm-based-npcs/190842#post_2", "published_at": "2026-10-20 23:13:19+00:00", "updated_at": "2026-10-20 23:20:42.066306+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "ai-agents", "mlops", "ai-research"], "entities": ["LFM2.5", "Qwen3.5", "DeepSeek V4.1 Flash", "GPT-6.1 SOL", "Unsloth", "Unsloth Studio", "QLoRA", "DPO"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-evaluate-deceptive-dialogue-in-llm-based-npcs", "markdown": "https://wpnews.pro/news/how-to-evaluate-deceptive-dialogue-in-llm-based-npcs.md", "text": "https://wpnews.pro/news/how-to-evaluate-deceptive-dialogue-in-llm-based-npcs.txt", "jsonld": "https://wpnews.pro/news/how-to-evaluate-deceptive-dialogue-in-llm-based-npcs.jsonld"}}