Introduction ✨

April 27, 2025 · View on GitHub

Stars Model HuggingFace Python Stars

简体中文 | 繁體中文 | English | 日本語

Caution

Muice-Chatbot has officially ceased updates as of February 19, 2025, and will enter archive status on July 16, 2025.

Therefore, we strongly recommend migrating to the MuiceBot framework based on Nonebot2. For migration instructions, please refer to: Migrating from Muice-Chatbot

Warning

The chatbot is trained in Simplified Chinese, which may limit its ability to handle English input effectively. Let us know if you are interested in a version fine-tuned with a machine-translated dataset in English!

Tip

This page's content might not always reflect the latest updates. Visit the Simplified Chinese page for the most recent information.

Introduction ✨

Muice, an AI girl who actively initiates conversations with you. Her dialogue model is fine-tuned based on Qwen, trained on a dataset of 3k+ dialogues. She embodies the speech style of an anime girl—somewhat tsundere but eager to share life's trivialities with you, offering unique greetings every day.

Features 🪄

✅ Supports nearly fully automated environment setup.

✅ Provides a Qwen LoRA fine-tuned model trained on 3k+ dialogues.

✅ Supports multiple model loaders, allowing use without Muice's fine-tuned model.

✅ Initiates conversations actively (randomly or at fixed times in the morning, noon, and evening).

✅ Offers 5 commands for refreshing replies and other operations during chats.

✅ OFA image recognition: Identifies memes, understands memes, and sends memes.

✅ Supports speech synthesis via fishaudio/fish-speech (Muice TTS model not yet released).

✅ Engages in group chats (supports replying when @mentioned or randomly without @mention).

✅ Real-time voice conversations in the console (QQ voice calls not yet supported).

✅ Multilingual documentation.

✅ Common Q&A guide.

✅ Clear log management output.

✅ Faiss memory module: Retrieves past dialogue data and automatically adds it to the context.

Quick Start 💻

Recommended environment:

  • Python 3.10
  • A GPU with 6GB+ VRAM (int4 quantization requires at least 4GB VRAM; CPU inference requires 16GB+ RAM).

Automatic Installation (venv)

The setup now automates the installation of all software and dependencies. Download the latest source code via Code -> Download ZIP and extract it.

Double-click install_env.bat to install (do not enable legacy console), or run the following command in the terminal:

.\install_env.bat  

The automatic installation may take some time. After completion, you still need to manually download the model.

The automatic installation script uses Python virtual environments and does not require Conda. Pay attention to the script's prompts.

Manual Installation (Using Conda)

git clone https://github.com/Moemu/Muice-Chatbot  
cd Muice-Chatbot  
conda create --name Muice python=3.10.10 -y  
conda activate Muice  
pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple  

For GPU users, additionally run:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124  

For GPU users, ensure your CUDA environment is configured. Reference link.

Loading Muice's Fine-Tuned Model

Currently supported base models are listed below:

Base ModelCorresponding Fine-Tuned Model VersionLoaderAdditional Dependencies
ChatGLM2-6B-Int42.2-2.4transformerscpm_kernels
ChatGLM2-6B2.0-2.3transformers-
Qwen-7B-Chat-Int42.3, 2.6.2llmtunerllmtuner
Qwen2-1.5B-Instruct-GPTQ-Int42.5.3llmtunerllmtuner
Qwen2.5-7B-Instruct-GPTQ-Int42.7.1llmtunerllmtuner
RWKV (Fine-tuned by Seikaijyu)See HFrwkv-api(Requires RWKV-Runner setup)

The requirements.txt in this project is based on the llmtuner environment. Therefore, we recommend using the Qwen series models. Using ChatGLM series models may cause environment errors.

Download fine-tuned models: Releases

Place the base model and fine-tuned model in the model folder, then configure the corresponding settings in the configuration file (ensure the path in the configuration file points to multiple model files, not just a folder; some fine-tuned models may have an additional checkpoint-xxx folder).

For Muice's Qwen fine-tuned models, the recommended configuration is:

model:  
  loader: llmtuner  
  model_path: model/Qwen2.5-7B-Instruct-GPTQ-Int4 # Base model path  
  adapter_path: model/Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4 # Fine-tuned model path  
  template: qwen # Model template in LLaMA-Factory (required)  
  system_prompt: 'Now you are an AI girl named "Muice"' # System prompt (optional)  
  auto_system_prompt: true # Automatically configure Muice's system prompt (default: false)  

If you lack a suitable GPU and need to load the model on CPU or a quantized model, install and configure the GCC environment, then enable openmp. Reference link.

Using Without Muice's Fine-Tuned Model

This repository also supports using other fine-tuned models or base models directly. Refer to Supported Model Loaders for configuration.

Multimodal models are also supported. Refer to Multimodal Model Loaders.

Bot Service Configuration

OneBot service is now supported.

This project uses the OneBot V11 protocol. For QQ usage, we recommend LLOneBot or Lagrange.Core.

For LLOneBot: After installation, enable the reverse WebSocket service in settings and enter ws://127.0.0.1:21050/ws/api.

For Lagrange.Core: Follow Lagrange Quick Deployment and add the following configuration to its file:

{  
	"Type": "ReverseWebSocket",  
	"Host": "127.0.0.1",  
	"Port": 21050,  
	"Suffix": "/ws/api",  
	"ReconnectInterval": 5000,  
	"HeartBeatInterval": 5000,  
	"HeartBeatEnable": true,  
	"AccessToken": ""  
}  

Other OneBot V11 adapters can also be used. See OneBot V11 Adapters.

Avoid updating QQNT unnecessarily. If issues arise, try downgrading QQNT.

Caution

Update as of February 22, 2025: LiteLoaderQQNT-related account bans remain unresolved. To continue using it, downgrade QQNT to version 9.9.15-2xxxx, install the framework, log in once, and immediately close it. Modify the following files in the root directory:

\resources\app-update.yml -> provider: 3rdparty

\resources\app\versions\channel.json -> "channel": "bbbbbbbbbbeta"

Set these files to read-only to prevent QQNT from auto-updating.

For Telegram Bot usage: Migrate to Telegram Bot

Other Features

Configuration ⚒️

Configuration file instructions are located in configs.yml. Modify them according to your needs.

Usage 🎉

Run main.py in the project root directory:

conda activate Muice  
python main.py  

Or use the start.bat script generated by the automatic installation.

Commands 🕹️

CommandDescription
/cleanClear current dialogue history.
/refreshRefresh the current dialogue.
/helpDisplay all available commands.
/resetReset all dialogue data (archives dialogue data).
/undoUndo the last dialogue.

FAQ

FAQ

Example Dialogues (Training Dataset) 📑

See the public dataset: Moemu/Muice-Dataset

Muice's Character

Unlike other chatbot projects, this project provides a model fine-tuned on a custom dialogue dataset, available for download in Releases. For details about the fine-tuned model's character, the currently public information is as follows:

Muice's Character Image (Right-click to open if unavailable)

Training dataset: Moemu/Muice-Dataset

Base models: THUDM/ChatGLM2-6B & QwenLM/Qwen)

This project's source code uses the MIT License. Commercial use of the fine-tuned model files is discouraged.

About 🎗️

Code Implementation: Moemu, MoeSnowyFox, NaivG, zkhssb, Asankilp

Dataset Creation and Model Fine-Tuning: Moemu (RWKV fine-tuning: Seikaijyu)

Documentation: TurboHK, Leaf

Related Projects: Coral Framework, nonebot-plugin-marshoai

Code Contributions:

contributors

If this project is helpful, consider supporting it.

afadian
Buy Me A Coffee

Thank you for your support!

This project is part of MuikaAI.

Official Channel: Muice's Room

Star History:

Star History Chart