Sakura-Qwen3-0.6B-LoRA-Demo-v1

Model License Base Model Adapter Type

Model Description

This is a LoRA adapter trained on Qwen3-0.6B, specifically optimized for VTuber role-playing in Chinese context. This model endows the AI with VTuber personality traits, speaking style, and character settings, suitable for VTuber interaction scenarios.

Model Details

  • Base Model: Qwen3-0.6B
  • Adapter Type: LoRA (Low-Rank Adaptation)
  • Application: VTuber role-playing
  • Language: Chinese
  • Version: Demo v1

Character Settings

  • Character Name: 小樱(Sakura)
  • Personality Traits: Energetic and cute, gentle and considerate, occasionally mischievous
  • Speaking Style: Uses specific speech patterns and emojis
  • Background Story:
  • Specialties: Interacting with audience

Usage

Loading the Model

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

# Load the Qwen3-0.6B chat model and tokenizer
model_name = "Qwen/Qwen3-0.6B"
adapter_name = "Boogon/sakura-qwen3-0.6b-lora-demo-v1"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.float16,
    device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_name)

Note: If you want to save the model into another directory, remember to use argument cache_dir.

Chat Example

def chat_with_vtuber(messages, max_length=512):
    """
    messages format: [
        {"role": "system", "content": ""},
        {"role": "user", "content": "Hello!"},
        {"role": "assistant", "content": "Hi there, my name's Sakura!(*´▽`*)"},
        {"role": "user", "content": "What's new today?"}
        # ...
    ]
    """
    text = tokenizer.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True
    )
    
    inputs = tokenizer(text, return_tensors="pt").to(model.device)
    
    with torch.no_grad():
        outputs = model.generate(
            **inputs,
            max_new_tokens=max_length,
            temperature=0.8,
            top_p=0.9,
            do_sample=True,
            repetition_penalty=1.1,
            eos_token_id=tokenizer.eos_token_id
        )
    
    response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
    return response

# Example conversation
messages = [
    {"role": "system", "content": "You are Sakura-chan, a cute VTuber who loves interacting with fans. You speak in a cheerful, cute style with occasional Japanese phrases and emojis."},
    {"role": "user", "content": "Hello Sakura-chan! How are you today?"}
]

response = chat_with_vtuber(messages)
print(f"Sakura: {response}")

Direct Chat Template Usage

# Alternative method using chat template directly
conversation = [
    {"role": "user", "content": "What games do you like to play?"}
]

# Apply chat template
text = tokenizer.apply_chat_template(
    conversation,
    tokenize=False,
    add_generation_prompt=True
)

inputs = tokenizer(text, return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=256,
    temperature=0.7,
    do_sample=True
)

response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

Training Information

  • Training Data: n/a
  • Training Objective: Learn VTuber's dialogue style, personality traits, and interaction patterns
  • LoRA Configuration:
    • r: 16
    • lora_alpha: 32
    • target_modules: ["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"]
    • lora_dropout: 0.05
  • Training Framework: PEFT

Features

  • Character-consistent dialogue
  • Emotional expression with emojis
  • Context-adaptive responses
  • Fan interaction simulation
  • Multi-turn conversation support

License

  • Base Model: Apache 2.0
  • Adapter: Apache 2.0

Important Notes

  • This is a demo version and may have unstable responses
  • Not for commercial use
  • Character dialogue content is fictional and unrelated to real persons
  • The model is optimized for Chinese VTuber role-playing scenarios

Contributing & Feedback

Welcome to submit feedback or suggestions through Issues!

Anything related can be sent to Sakura-Adapters

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Boogon/sakura-qwen3-0.6b-lora-demo-v1

Finetuned
Qwen/Qwen3-0.6B
Adapter
(126)
this model

Collection including Boogon/sakura-qwen3-0.6b-lora-demo-v1