Downloads · 30 days
63
15% of all-time downloads
maomao88/anime-personality-chat-gguf
anime-personality-chat-gguf is a machine learning model from maomao88. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains a GGUF format model, which is a quantized version of Mistral-7B-Instruct natively merged with the maomao88/anime-waifu-mistral-lora adapter. The base model was fine-tuned using Low-Rank Adapta…
Downloads · 30 days
63
15% of all-time downloads
All-time downloads
425
Public
Repo size
4.4 GB
Likes
0
Public
Click a slice to open those files.
.gguf4.4 GB · 100%
From the Hugging Face model README
This repository contains a GGUF format model, which is a quantized version of Mistral-7B-Instruct natively merged with the maomao88/anime-waifu-mistral-lora adapter. The base model was fine-tuned using Low-Rank Adaptation (LoRA) to adapt Mistral's conversational architecture into a highly stylized, engaging, and expressive anime-themed persona, and has been fully baked into the model weights prior to quantization.
pip install llama-cpp-python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="maomao88/anime-personality-chat-gguf",
filename="mistral-merged-Q4_K_M.gguf",
n_ctx=2048, # Set context window token ceiling limit
n_gpu_layers=-1 # Set to -1 to push ALL layers straight into GPU VRAM (0 for pure CPU)
)
def chat_with_personality(trait, user_input, max_new_tokens=100, temperature=0.8):
"""
Generate a response from the fine-tuned model using a given personality trait.
"""
messages = [
{
"role": "system",
"content": f"You are an anime character with the following personality: {trait}."
},
{
"role": "user",
"content": user_input
}
]
# Map the arguments properly to your function parameters
response_dict = llm.create_chat_completion(
messages=messages,
temperature=temperature,
max_tokens=max_new_tokens
)
# Extract the text string from the OpenAI-style dictionary payload
assistant_reply = response_dict['choices'][0]['message']['content'].strip()
return assistant_reply
chat_with_personality("tsundere", "What do you think of the moon?")
# Response Example: I mean, it’s not like the moon is super romantic or anything, right?
The anime characters supported are as follows:
tsundere (傲娇)
yandere (病娇)
himedere (公主娇)
genki (元气)
moe (萌系)
bakadere (笨蛋)