---
title: muice-chat-qwen2.5-0.5b
canonical_url: "https://www.modelscope.cn/models/qiufeng90/muice-chat-qwen2.5-0.5b"
md_url: "https://www.modelscope.cn/models/qiufeng90/muice-chat-qwen2.5-0.5b.md"
repository: qiufeng90/muice-chat-qwen2.5-0.5b
chinese_name: "沐雪猫娘化Qwen2.5-0.5B-Instruct微调"
last_updated: 2025-02-20
license: "Apache License 2.0"
pipeline_tag: text-generation
tasks:
  - text-generation
base_model:
  - Qwen/Qwen2.5-0.5B-Instruct
base_model_relation: finetune
parameters: 4.4M
tensor_type:
  - F32
library_name:
  - safetensors
  - gguf
  - pytorch
frameworks:
  - PyTorch
language:
  - zh
downloads: 315283
stars: 10
tags:
  - gguf
---

# muice-chat-qwen2.5-0.5b

> muice-chat-qwen2.5-0.5b - qiufeng90 在 ModelScope 开源的模型。基于阿里通义千问"Qwen/Qwen2.5-0.5B-Instruct"微调沐雪"Moemuu/Muice-Dataset"数据集

qiufeng90/muice-chat-qwen2.5-0.5b 是 ModelScope 魔搭社区上的 4.4M 参数text-generation模型，采用 Apache License 2.0 许可，基于 Qwen/Qwen2.5-0.5B-Instruct 构建。

- **Repository**: qiufeng90/muice-chat-qwen2.5-0.5b
- **License**: Apache License 2.0
- **Tasks**: text-generation
- **Parameters**: 4.4M
- **Base model**: Qwen/Qwen2.5-0.5B-Instruct
- **Tags**: gguf
- **Downloads**: 315283
- **Stars**: 10
- **Last updated**: 2025-02-20

Source: https://www.modelscope.cn/models/qiufeng90/muice-chat-qwen2.5-0.5b

---

# 基于阿里通义千问"Qwen/Qwen2.5-0.5B-Instruct"微调沐雪猫娘化"himzhzx/muice-dataset-train.catgirl"数据集

## 模型下载
```
from modelscope import snapshot_download
model_dir = snapshot_download('qiufeng90/muice-chat-qwen2.5-0.5b')
```

## 训练命令
```
CUDA_VISIBLE_DEVICES=0 \
swift sft \
    --model Qwen/Qwen2.5-0.5B-Instruct \
    --train_type lora \
    --dataset 'himzhzx/muice-dataset-train.catgirl'
    --torch_dtype bfloat16 \
    --num_train_epochs 1 \
    --per_device_train_batch_size 1 \
    --per_device_eval_batch_size 1 \
    --learning_rate 1e-4 \
    --lora_rank 8 \
    --lora_alpha 32 \
    --target_modules all-linear \
    --gradient_accumulation_steps 16 \
    --eval_steps 50 \
    --save_steps 50 \
    --save_total_limit 5 \
    --logging_steps 5 \
    --max_length 2048 \
    --output_dir output \
    --system 'You are a helpful assistant.' \
    --warmup_ratio 0.05 \
    --dataloader_num_workers 4 \
    --model_author swift \
    --model_name swift-robot
```

## 使用交互式命令行进行推理
```
CUDA_VISIBLE_DEVICES=0 \
swift infer \
    --adapters ./ \
    --stream true \
    --temperature 0 \
    --max_new_tokens 2048
```

## 合并
```
CUDA_VISIBLE_DEVICES=0 swift export --ckpt_dir ./ --merge_lora true
```

## 拉取llama.cpp
```
git clone https://www.modelscope.cn/zt1224179632/llama.cpp.git
pip install -r llama.cpp/requirements.txt
```

## 转gguf
```
python llama.cpp/convert-hf-to-gguf.py ./merged --outfile model.gguf --outtype q8_0
```
