LongShu · IceBlink
TL;DR: A narrative-aware dialogue generation model specifically built for game NPC interactions, based on GLM-4.5-Air with deep fine-tuning, MLX 4bit quantized, running smoothly on consumer-grade hardware. github:https://github.com/luoyike2003ls/LongShuGameDev
🎮 Model Positioning
General-purpose LLMs often feel "out of character" when generating game NPC dialogue — hollow tone, lack of personality, poor contextual coherence, and unable to support immersive narrative experiences.
LongShu · IceBlink aims to solve this pain point. Built on the Zhipu GLM-4.5-Air foundation, we performed full instruction fine-tuning targeted at game narrative scenarios, creating an AI dialogue engine that can truly "role-play."
It's not a chatbot — it's a "scriptwriter + actor" — capable of understanding character personality, world-building, and plot direction to generate dynamic dialogue that fits the character's identity.
⚡ Core Technical Highlights
GLM-4.5-Air Foundation
- Based on Zhipu GLM-4.5-Air architecture with native Chinese-English bilingual capability
- 106B parameters (~12B active), inference efficiency far exceeding同等 Dense models
- Excellent Chinese comprehension and generation, especially suited for Eastern fantasy题材
Narrative-Aware Fine-Tuning
- Character Personality Injection: Dynamically adjusts output style based on character traits (personality, identity, verbal tics, tone words)
- Plot Coherence: Supports cross-turn dialogue state tracking — NPCs remember interaction history with players
- Context Awareness: Generates differentiated dialogue based on current scene, time, and NPC mood state
MLX 4bit Quantization
- MLX framework INT4 quantization, model size compressed to ~60GB
- Mac mini M4 Pro 64GB inference speed at ~28 tokens/s
- Retains 97%+ of narrative generation quality
Structured Output
- Supports JSON-format dialogue node output, seamlessly integrating with game dialogue systems
- Built-in tone annotation, action hints, and expression tags for frontend rendering
🎯 Training Data
| Data Type | Scale | Description |
|---|---|---|
| Classic RPG Dialogue Scripts | 200+ Games | The Witcher 3, Baldur's Gate 3, Final Fantasy, Chinese Paladin, GuJian |
| Original Character Dialogue | 8M+ Turns | NPC daily dialogue, quest dialogue, combat dialogue, friendship dialogue |
| Novels & Screenplays | 500K+ Pages | Web fiction, film scripts, stage play dialogue |
| Game Design Documents | 100K+ Pages | Character profiles, plot outlines, world-building bibles |
| Player Interaction Logs | 3M+ Entries | Desensitized real player-NPC interaction data |
Training Pipeline
GLM-4.5-Air Foundation
│
├── SFT Phase 1: General Dialogue Alignment (50K high-quality dialogue samples)
│
├── SFT Phase 2: Game Narrative Specialization (character personality + context awareness)
│
├── SFT Phase 3: Sakura Dream Sea Production Data Fine-Tuning (200K real dialogue turns)
│
└── RLHF: Narrative Quality Preference Alignment (50K human-annotated dialogue quality ratings)
💻 Hardware Requirements
| Configuration | Recommendation |
|---|---|
| Mac | M2/M3/M4 series, 64GB Unified Memory |
| PC | RTX 4090 (24GB) + 64GB System RAM |
| Format | MLX 4bit (INT4) |
| Speed | ~28 tokens/s (Mac mini M4 Pro 64GB) |
🚀 Use Cases
- Dynamic NPC Dialogue Generation — Generate personalized lines in real-time based on character settings and context
- Branching Dialogue Tree Generation — Auto-generate multi-branch dialogue options based on plot nodes
- Friendship-Based Dialogue — Generate different tones and content based on player-NPC affinity levels
- Random Chatter — Generate海量 non-repetitive daily dialogue for NPCs
- Quest Dialogue — Dynamically generate guiding dialogue based on quest progress
- Narrative Writing Assistant — Help designers generate plot dialogue and character monologues
🎮 Real-World Validation: Sakura Dream Sea
Sakura Dream Sea (樱梦海) (Steam Store Page) — An Eastern Fantasy Open-World MMO Adventure
The IceBlink model has been fully deployed in Sakura Dream Sea's NPC dialogue system, serving as the core narrative engine powering dynamic in-game interactions:
Live Features
| Feature | Description |
|---|---|
| Dynamic NPC Dialogue | NPCs in the Astral Soul system (e.g., Tami) have every line generated in real-time by IceBlink |
| Tone Words + Typewriter Effect | Dialogue includes character-specific tone words, paired with typewriter animation |
| Friendship Dialogue | NPC attitude and dialogue style dynamically change based on friendship level |
| Context Awareness | The same NPC says different things in different scenes and times |
| AI Dialogue Interception | Smart decision on whether to trigger AI dialogue or use preset text |
Comparison
| Dimension | Traditional Preset Dialogue | IceBlink-Driven |
|---|---|---|
| Line Count | 10-50 per NPC | Theoretically infinite |
| Repetition | High (same content on repeat interactions) | Extremely low (every conversation varies) |
| Character Personality | Relies on manual writing | Auto-generated from character settings |
| Development Cost | High (each line needs writing + VO) | Low (set character, auto-generate) |
Technical Architecture
Player Clicks NPC
│
▼
DialogueView (Unity/SLua)
│
├── Check Cached Dialogue
├── Build Context (Character + Friendship + Scene + History)
└── Call IceBlink Model
│
▼
Generate Dialogue Text + Tone + Action Tags
│
▼
Typewriter Rendering + Voice Synthesis
📝 Output Format Example
{
"npc_id": "tami_001",
"npc_name": "Tami",
"mood": "cheerful",
"dialogue": {
"text": "Oh hey, adventurer! You're back again? Want to hear about what's been happening near the forest today?",
"tone": "enthusiastic",
"action": "leans_forward",
"expression": "smile_warm"
},
"options": [
{"id": "opt_1", "text": "What's going on?", "mood_required": null},
{"id": "opt_2", "text": "I'm busy today, maybe next time.", "mood_required": null},
{"id": "opt_3", "text": "(pats Tami's head)", "mood_required": "friendship_5"}
],
"context": {
"friendship_level": 5,
"location": "village_square",
"time_of_day": "morning",
"quest_progress": "chapter_2_active"
}
}
🔗 Ecosystem
IceBlink is part of the broader LongShu game AI ecosystem:
| Model | Focus | Repository |
|---|---|---|
| IceBlink (冰眸) | NPC Dialogue & Narrative | This model |
| REAP-Architect (天策) | Game Dev Commander & Architecture | GitHub: LongShuGameDev |
The REAP-Architect model handles game system architecture, task decomposition, and multi-agent scheduling for game development workflows — while IceBlink powers in-game NPC narrative. Together, they form a complete AI pipeline from development to runtime.
📄 License
Apache 2.0 License
Citation
@misc{longshu-iceblink-2026,
title={LongShu-IceBlink: A Narrative-Aware LLM for Game NPC Dialogue Generation},
author={LongShu Team},
year={2026},
url={https://huggingface.co/luoyike2003/longshu-iceblink-106b-mlx-v2},
publisher={HuggingFace}
}
LongShu · IceBlink — Giving Every NPC Its Own Soul
- Downloads last month
- 373
4-bit