Text Generation
PEFT
GGUF
Japanese
roleplay
character
japanese
qwen
lora
uncensored
desktop-companion
conversational
Instructions to use wallouo/Inaba with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use wallouo/Inaba with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use wallouo/Inaba with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf wallouo/Inaba:Q4_K_M # Run inference directly in the terminal: llama cli -hf wallouo/Inaba:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf wallouo/Inaba:Q4_K_M # Run inference directly in the terminal: llama cli -hf wallouo/Inaba:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf wallouo/Inaba:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf wallouo/Inaba:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf wallouo/Inaba:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf wallouo/Inaba:Q4_K_M
Use Docker
docker model run hf.co/wallouo/Inaba:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use wallouo/Inaba with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wallouo/Inaba" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wallouo/Inaba", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wallouo/Inaba:Q4_K_M
- Ollama
How to use wallouo/Inaba with Ollama:
ollama run hf.co/wallouo/Inaba:Q4_K_M
- Unsloth Studio
How to use wallouo/Inaba with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for wallouo/Inaba to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for wallouo/Inaba to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for wallouo/Inaba to start chatting
- Docker Model Runner
How to use wallouo/Inaba with Docker Model Runner:
docker model run hf.co/wallouo/Inaba:Q4_K_M
- Lemonade
How to use wallouo/Inaba with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull wallouo/Inaba:Q4_K_M
Run and chat with the model
lemonade run user.Inaba-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 10,137 Bytes
9698d94 b3f060b 9698d94 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | ---
base_model: HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive
library_name: peft
license: mit
language:
- ja
pipeline_tag: text-generation
tags:
- roleplay
- character
- japanese
- qwen
- lora
- gguf
- uncensored
- desktop-companion
metrics:
- character-consistency
---
# Inaba Meguru LoRA (ๅ ๅนกใใใ)
A lightweight Japanese roleplay LoRA for Qwen3.5-4B.
> ๐พ This model powers **[InabaPet](https://github.com/wallouo/InabaPet)** โ a desktop AI companion with chat, vision, voice, and head-pat interactions, running entirely on-device.
## Overview
This project aims to recreate **Inaba Meguru (ๅ ๅนกใใใ)** from *Sabbat of the Witch* (ใตใใใฆใฃใใ) as faithfully as possible while remaining lightweight enough to run entirely on consumer hardware.
The original goal was simple:
> I wanted Meguru to live on my desktop.
Unlike general-purpose chat models, this LoRA focuses on character roleplay and is designed primarily for desktop companion applications and immersive conversations.
The model is trained on [HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive](https://huggingface.co/HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive). Although it is still a 4B model with some unavoidable limitations, it offers a significant improvement over my previous desktop companion model based on Qwen2.5 while remaining completely free to run locally without API costs.
## Quick Start
### Ollama (recommended)
```bash
# 1. Download meguru_q4_k_m.gguf + Modelfile from this repo's Files tab
# 2. Import into Ollama (run in the download folder):
ollama create meguru -f Modelfile
# 3. Run
ollama run meguru
```
### Hugging Face + Ollama (one-liner)
```bash
ollama run hf.co/wallouo/Inaba
```
### llama.cpp
```bash
./llama-cli -m meguru_q4_k_m.gguf -p "ใใใใใใฏใใ๏ผ" -t 4 --temp 0.8 --top-p 0.9 --min-p 0.05
```
### Python (transformers + PEFT)
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive",
torch_dtype="auto",
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, "wallouo/Inaba")
tokenizer = AutoTokenizer.from_pretrained("wallouo/Inaba")
messages = [{"role": "user", "content": "ใใใใใใฏใใ๏ผ"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=120, temperature=0.8, top_p=0.9, min_p=0.05)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```
## Hardware Requirements
| Item | Value |
|---|---|
| Model size (GGUF Q4_K_M) | 2.71 GB |
| Min VRAM | ~4 GB |
| Recommended VRAM | 6โ8 GB (for comfortable multi-turn context) |
| Tested on | NVIDIA RTX 4060 8GB VRAM, Ollama |
| Context length | 4096 |
| Runtime | Ollama, llama.cpp |
## Features
- Faithful Meguru personality
- Natural Japanese roleplay
- Optimized for local inference (Q4_K_M GGUF)
- Lightweight 4B model โ runs on consumer GPUs
- Suitable for desktop companion applications
- Designed for immersive conversations instead of general question answering
## Training Information
| Item | Value |
|---|---|
| Base Model | [HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive](https://huggingface.co/HauhauCS/Qwen3.5-4B-Uncensored-HauhauCS-Aggressive) |
| Fine-tuning Method | LoRA (QLoRA 4-bit) |
| Framework | Unsloth |
| Quantization | Q4_K_M (GGUF) |
| Language | Japanese |
| Dataset Size | 891 conversations |
| Learning Rate | 1e-4 |
| Training Steps | 280 |
| Hardware | NVIDIA RTX 4060 8GB VRAM |
The training converged smoothly, with the loss decreasing from approximately 4.3 to 1.31, indicating healthy and stable optimization.
## Dataset
The dataset was not created by simply collecting dialogue from the visual novel. Instead, a significant amount of time was spent refining the data to maximize character consistency.
The overall pipeline included:
1. **Character dialogue extraction** โ pulled protagonist + Meguru lines from game scripts
2. **Removal of noisy and out-of-character samples** โ filtered plot-only narration and non-distinctive responses using an LLM-based cleaner
3. **AI-assisted dialogue expansion** โ generated additional conversations to strengthen multi-turn depth and low-emotion daily dialogue
4. **Multi-turn conversation generation** โ chained single exchanges into coherent conversation threads
5. **Emotion balancing** โ ensured coverage across emotional states to avoid mode collapse
6. **Manual refinement and quality review** โ hand-checked for persona consistency
The goal was always quality over quantity.
## Recommended Generation Settings
The following settings consistently produced the most natural roleplay performance during testing.
| Parameter | Value |
|---|---|
| Temperature | 0.8 |
| Top_p | 0.9 |
| Min_p | 0.05 |
| Top_k | Disabled |
### Why is Top_k disabled?
During experimentation, I found that enabling both Min_p and Top_k often caused the 4B model to become noticeably less coherent.
For example, with `Min_p = 0.08` and `Top_k = 40`, the model frequently became almost unable to produce complete sentences, repeatedly generating outputs such as:
> ใใฃโฆโฆใฃโฆโฆใ
Disabling Top_k completely resolved this issue while maintaining creativity and response quality.
## Modelfile
The `Modelfile` included in this repo configures Ollama with the system prompt, generation parameters, and chat template needed to reproduce Meguru's character behavior. See the file in the **Files and versions** tab.
## Example Conversation
One of Meguru's defining personality traits is that she is energetic, cheerful, and not particularly academic. The following conversation demonstrates that behavior.
| Role | Text |
|---|---|
| **User** | ใใใใๆ่ฟ้ๅญๅๅญฆใฎๆฌใ่ชญใใงใใใ ใใฉใใใทใฅใฌใผใใฃใณใฌใผใฎ็ซใใฃใฆไฝใชใฎ๏ผๅ
จ็ถใใใใชใโฆโฆ |
| **Meguru** | ใใใ๏ผ๏ผ ใกใๅฝ็ถใ ๏ผ้ๅญๅๅญฆใชใใฆใ็ตถๅฏพ็ก็ใฃใใ๏ผ๏ผ |
| **Translation** | "Ehhh!? O-Of course! Quantum mechanics is impossible to understand!" |
Instead of attempting to explain quantum physics, Meguru responds exactly the way her character would โ honest, lively, and completely overwhelmed by the topic. Maintaining this kind of personality consistency is the primary objective of this LoRA.
## Known Limitations
Although the dataset has gone through multiple rounds of refinement, some issues still remain due to the limitations of current 4B language models.
Common issues include:
- Speaker confusion
- Role drift during long conversations
- Occasionally inventing previous dialogue
- Cross-language contamination
- Reduced character consistency over extended contexts
Based on my experiments, these issues appear to originate primarily from the reasoning limitations of the base model rather than the dataset itself.
### Example: Cross-language Contamination
One interesting failure case observed during testing:
| Role | Text |
|---|---|
| **User** | ไธ็ทใซใใใใงๅฏใใใ |
| **Meguru** | ๅ็ดใซใใๆผใฎไผๆฉๆใซใกใใฃใจใ ใใใใใใใใชใฃใใฃใฆใ ใใ ใ๏ผ |
The phrase **ใใใใใใใชใฃใ** is not natural Japanese. The model incorrectly translated the Chinese concept of "wanting to lie on the bed" into Japanese by treating ใใใ as a verb.
A native speaker would naturally say something like:
- ใใใใงๅฏใใใชใฃใ
- ใใใใงๆจชใซใชใใใใชใฃใ
This type of multilingual semantic interference is one of the common weaknesses of current lightweight multilingual language models and is extremely difficult to eliminate completely through LoRA training alone.
## Evaluation
Due to the subjective nature of character roleplay, no standard benchmark was used. Instead, qualitative assessment was performed across the following dimensions:
| Dimension | Rating (1โ5) | Notes |
|---|---|---|
| Character consistency | 4 | Strong persona adherence in short-to-medium conversations |
| Japanese naturalness | 4 | Fluent output with occasional cross-language contamination |
| Multi-turn stability | 3 | Role drift appears in extended contexts (>20 turns) |
| Emotion range | 4 | Covers cheerful, flustered, embarrassed states well |
## Development Notes
One thing I learned while developing this project is that improving a character model is not only about collecting more data. After repeatedly refining the dataset, cleaning noisy samples, expanding conversations, adjusting prompts, and retraining the LoRA, I found that most remaining issues were no longer caused by the dataset itself.
Instead, they mainly stem from the reasoning and contextual limitations of today's 4B language models.
I'm looking forward to revisiting this project when future small models become more capable, require less VRAM, or when parameter-efficient fine-tuning techniques continue to improve.
## Intended Use
**This model is intended for:**
- Character roleplay
- Desktop companion projects
- AI VTuber experiments
- Local Japanese conversation
- Personal entertainment
**This model is NOT intended for:**
- General-purpose chat assistance
- Knowledge question answering
- Factual or professional advice
- Any commercial deployment involving the character
## License
The LoRA adapter weights are released under the **MIT License**.
> **Important:** The character **Inaba Meguru (ๅ ๅนกใใใ)** is a copyrighted character from *Sabbat of the Witch* (ใตใใใฆใฃใใ) by **Yuzusoft**. This project is a fan-made, non-commercial work created for personal entertainment and technical exploration. All character rights belong to Yuzusoft.
## Acknowledgements
This project exists because I genuinely like Inaba Meguru.
I hope this model can bring a little happiness to anyone who enjoys her character as much as I do.
If you find this project useful, feel free to leave a โค๏ธ on Hugging Face or share your feedback.
Thank you for trying the model.
|