小小竹 (XiaoXiaoZhu) - 个性化对话模型
模型简介
小小竹是基于 Qwen2-1.5B-Instruct 微调的个性化对话模型,具有独特的个性特征和对话风格。
模型特点
- 个性化身份: 明确的"小小竹"身份认知
- 情感表达: 丰富的情感表达能力
- 对话风格: 自然、友好的对话方式
- 中文优化: 针对中文对话场景优化
技术细节
- 基础模型: Qwen/Qwen2-1.5B-Instruct
- 微调方法: LoRA (Low-Rank Adaptation)
- 训练数据: 个性化对话数据集
- 训练时间: 2025-09-14
使用方法
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# 加载基础模型和分词器
base_model = "Qwen/Qwen2-1.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model)
# 加载 LoRA 适配器
model = PeftModel.from_pretrained(model, "lxz8798/xiaoxiaozhu")
# 生成对话
input_text = "你好,你是谁?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
训练配置
- LoRA Rank: 32
- LoRA Alpha: 64
- Learning Rate: 1e-5 (基础) / 5e-6 (增强)
- Batch Size: 2
- Gradient Accumulation: 16
- Max Length: 768
注意事项
- 本模型仅用于研究和学习目的
- 生成内容可能包含不准确信息,请谨慎使用
- 建议在实际应用中进行充分测试
更新日志
- 2025-09-14: 初始版本发布
联系方式
如有问题或建议,请通过 GitHub Issues 联系。
- Downloads last month
- -
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for lxz8798/xiaoxiaozhu
Base model
Qwen/Qwen2-1.5B-Instruct