---
title: Muice-Hunyuan-0.5B-Instruct
canonical_url: "https://www.modelscope.cn/models/acgurl/Muice-Hunyuan-0.5B-Instruct"
md_url: "https://www.modelscope.cn/models/acgurl/Muice-Hunyuan-0.5B-Instruct.md"
repository: acgurl/Muice-Hunyuan-0.5B-Instruct
chinese_name: "沐雪Roleplay Hunyuan-0.5B-Instruct 微调模型"
last_updated: 2026-01-01
license: CC-BY-NC-4.0
model_type:
  - hunyuan
architectures:
  - HunYuanDenseV1ForCausalLM
base_model:
  - Tencent-Hunyuan/Hunyuan-0.5B-Instruct
base_model_relation: finetune
parameters: 539.0M
tensor_type:
  - F32
library_name:
  - safetensors
language:
  - zh
domain:
  - nlp
inference_backends:
  - "deploy_task text"
  - "sglang 0.5.2"
downloads: 82
stars: 2
tags:
  - ACGN
  - Roleplay
  - Hunyuan
---

# Muice-Hunyuan-0.5B-Instruct

> Muice-Hunyuan-0.5B-Instruct - acgurl 在 ModelScope 开源的模型。基于 Hunyuan-0.5B-Instruct 微调的沐雪角色扮演模型，数据集来自 Moemuu/Muice-Dataset

acgurl/Muice-Hunyuan-0.5B-Instruct 是 ModelScope 魔搭社区上的 539.0M 参数机器学习模型，采用 CC-BY-NC-4.0 许可，基于 Tencent-Hunyuan/Hunyuan-0.5B-Instruct 构建，可用 deploy_task text、sglang 0.5.2 部署。

- **Repository**: acgurl/Muice-Hunyuan-0.5B-Instruct
- **License**: CC-BY-NC-4.0
- **Parameters**: 539.0M
- **Base model**: Tencent-Hunyuan/Hunyuan-0.5B-Instruct
- **Inference backends**: deploy_task text, sglang 0.5.2
- **Tags**: ACGN, Roleplay, Hunyuan
- **Downloads**: 82
- **Stars**: 2
- **Last updated**: 2026-01-01

Source: https://www.modelscope.cn/models/acgurl/Muice-Hunyuan-0.5B-Instruct

---

## 模型说明

基于 [Tencent-Hunyuan/Hunyuan-0.5B-Instruct](https://modelscope.cn/models/Tencent-Hunyuan/Hunyuan-0.5B-Instruct) 微调而成的沐雪角色扮演模型。这是一个合并后的模型，不需要原始模型。

使用 [ms-swif](https://github.com/modelscope/ms-swift) 的 web-ui,傻瓜式一键操作

在 ModelScope 提供的 CPU 环境的 Notebook 上微调 8 轮得来

8h32g 耗时5h左右

微调全过程日志见 [run.log](run.log)

训练脚本见 [train.sh](train.sh)

沐雪设定见：[沐雪 Bot](https://bot.snowy.moe/about/Muice#%E6%B2%90%E9%9B%AA%E4%BA%BA%E8%AE%BE)

训练集参见：[Moemuu/Muice-Dataset](https://www.modelscope.cn/datasets/Moemuu/Muice-Dataset)

## 🚀 使用示例

### 命令行推理

```bash
# 使用 swift 命令进行推理
swift infer \
  --model_type hunyuan \
  --model acgurl/Muice-Hunyuan-0.5B-Instruct
```

启动后在交互式界面中输入问题即可与模型对话。

### Python 代码推理

```python
from swift.llm import ModelType, get_model_tokenizer, get_template, inference

# 加载模型和分词器
model_type = ModelType.hunyuan
model, tokenizer = get_model_tokenizer(model_type, model_dir='/path/to/Muice-Hunyuan-0.5B-Instruct')
model.generation_config.max_new_tokens = 1024

# 获取对话模板
template = get_template(model_type, tokenizer)

# 进行推理
query = '你好，沐雪！'
response = inference(model, template, query)
print(f'用户: {query}')
print(f'沐雪: {response}')
```

## 以下是训练参数

## 🧠 模型相关参数

| 参数名 | 值 |
|--------|----|
| `model` | `Tencent-Hunyuan/Hunyuan-0.5B-Instruct` |
| `model_type` | `hunyuan` |
| `template` | `hunyuan` |
| `system` | `你是一个名为沐雪的可爱AI女孩子` |
| `torch_dtype` | `torch.float32`（建议改为 `dtype`） |
| `attn_impl` | `sdpa` |
| `max_length` | `1024` |

---

## 📚 数据集与数据处理

| 参数名 | 值 |
|--------|----|
| `dataset` | `Moemuu/Muice-Dataset` |
| `max_length` | `1024` |
| `lazy_tokenize` | `False` |
| `dataloader_num_workers` | `1` |
| `dataset_shuffle` | `True` |

---

## 🔧 训练配置

| 参数名 | 值 |
|--------|----|
| `num_train_epochs` | `8` |
| `learning_rate` | `1e-4` |
| `per_device_train_batch_size` | `1` |
| `gradient_accumulation_steps` | `16` |
| `max_grad_norm` | `1.0` |
| `weight_decay` | `0.1` |
| `lr_scheduler_type` | `cosine` |
| `warmup_steps` | `0` |
| `warmup_ratio` | `0.0` |
| `optim` | `adamw_torch` |
| `adam_beta1` | `0.9` |
| `adam_beta2` | `0.95` |
| `adam_epsilon` | `1e-08` |
| `seed` | `42` |
| `data_seed` | `42` |

---


## 🛠️ LoRA 微调配置（默认值没改）

| 参数名 | 值 |
|--------|----|
| `train_type` | `lora` |
| `lora_rank` | `8` |
| `lora_alpha` | `32` |
| `lora_dropout` | `0.05` |
| `target_modules` | `['all-linear']` |
| `use_dora` | `False` |
| `use_rslora` | `False` |

---
