spy5er/Gemma4NPC-it
Gemma4NPC-12B-it is a 12 billion parameter causal language model developed by spy5er, built on Google's Gemma 4 architecture. It is specifically fine-tuned for Non-Playable Character (NPC) dialogue generation in video games, excelling at maintaining character consistency and outputting structured JSON formats. This model is optimized for real-time, turn-based dialogue and seamless integration with game engines for dynamic game-state updates.
Loading preview...
Overview
Gemma4NPC-12B-it is a 12 billion parameter language model developed by spy5er, fine-tuned from Google's Gemma 4 architecture. Its primary purpose is to serve as a backend for Non-Playable Characters (NPCs) in video games, addressing common issues of character consistency and structured data output that traditional LLMs often struggle with. The model achieves this through a two-phase training process: Supervised Fine-Tuning (SFT) for strict roleplay adherence and Direct Preference Optimization (DPO) to guarantee valid, machine-readable JSON outputs.
Key Capabilities
- Consistent NPC Roleplay: Maintains character immersion and resists breaking character, even when explicitly prompted.
- Structured JSON Output: Guarantees outputs in valid JSON formats, enabling seamless parsing of dialogue and game-state updates (e.g., quest flags, inventory trades) by game engines like Unity or Unreal Engine.
- Optimized for Dialogue: Designed for short-context, turn-based dialogue, making it ideal for real-time in-game interactions.
- Efficient Local Inference: Available in quantized
Q4_K_MGGUF format (approx. 7.5 GB), allowing for 30-45+ tokens per second on consumer hardware and Apple Silicon.
What Makes It Different?
Unlike models that output pure conversational text, Gemma4NPC-12B-it is explicitly trained to provide structured JSON alongside natural language, acting as a true engine backend. Its DPO alignment specifically penalizes out-of-character behavior and rewards rigid adherence to game logic, offering superior character consistency and data reliability compared to models like chimbiwide/Gemma4NPC-E4B which rely on smaller parameter counts and less rigorous alignment methods.