2 2 weeks ago

ollama run SingWah/Qwen2.5-0.5B-AI_Customer_Service

Details

2 weeks ago

a423256509a4 · 994MB

qwen2
·
494M
·
F16
{{ if .System }}<|im_start|>system {{ .System }}<|im_end|> {{ else }}{{ end }}{{ if .Prompt }}<|im_s
{ "repeat_penalty": 1.1, "stop": [ "<|im_end|>\n", "<|endoftext|>",

Readme

Qwen2.5-0.5B-AI_Customer_Service

电商客服大模型 / E-commerce Customer Service LLM

基于 Qwen/Qwen2.5-0.5B-Instruct,使用 电商客服对话数据 通过 LoRA 高效微调 得到的中文客服基础模型,并叠加了风格(人设)适配器,用于「服饰旗舰店」售前咨询 / 售后处理 / 差评应对等场景。

This is a Chinese e-commerce customer-service LLM built on Qwen/Qwen2.5-0.5B-Instruct, fine-tuned with LoRA on e-commerce customer-service dialogue data, with an additional persona/style adapter — covering pre-sales consultation, after-sales handling, and negative-review response for a clothing flagship store.


1. 基本信息 / Overview

项目 Item 说明 Description
基座模型 Base Model Qwen/Qwen2.5-0.5B-Instruct
微调方法 Method LoRA(--tuner_type lora,rank=8)
数据来源 Data 电商客服对话(template-合成的多轮咨询,seed 可复现)
语言 Language 中文为主 / Primarily Chinese
参数量 Params ~0.5B(LoRA 可训练参数量极小)
适用场景 Use Case 服装店铺售前咨询、售后退款/退换、差评/一星应对

数据构成 / Data Composition

数据集 Dataset 条数 Count 覆盖内容 Content
售前 Pre-sales 1800 尺码/面料/发货/赠品/三防/价保
售后 After-sales 1250 退换货/退款/退时效/换货到货/开票
差评 Reviews 750 质量/物流/尺码/态度差评,一星核实,道歉优先
风格 Style 3000 甜妹/商务/极简 三种人设(业务+语气混合)

数据由模板系统化生成(seed=42),用于验证「四方法微调对比 + 两阶段 LoRA 叠加」的完整工程链路;真实生产建议在此基础上叠加真实对话回流与去重重写。

Data is template-generated with a fixed seed to validate the full engineering pipeline (four PEFT methods + two-stage LoRA stacking). For production, augment with real dialogue logs, deduplication and rewriting.


2. 微调方式 / Fine-tuning

采用两阶段 LoRA 微调:

  1. 阶段一(全场景客服 LoRA / 业务能力):把三份业务数据(售前 / 售后 / 差评)合并训练,得到一个「懂业务」的客服底座,覆盖退款时效、退换货、尺寸建议等关键政策。
  2. 阶段二(人设 / 风格 LoRA / 语气):在业务底座之上,用「业务+语气」混合数据训练风格适配器(甜妹 / 商务 / 极简),达到业务正确 + 语气贴合的效果。
  3. 合并部署:将业务 LoRA 与风格 LoRA 合并回完整模型,再转换为 GGUF 格式,供 Ollama 本地导入运行。

Using two-stage LoRA fine-tuning:

  1. Stage 1 (business capacity): merge pre-sales / after-sales / review data into one LoRA, teaching the base the key policies (refund timing, returns, size advice…).
  2. Stage 2 (persona / tone): train a style adapter on mixed business-plus-tone data (sweet / business / minimal), giving correct answers with the right tone.
  3. Merge & deploy: merge both LoRAs back into a full model, convert to GGUF, and import into Ollama for local serving.

3. 能力与示例 / Capabilities & Examples

售前咨询:尺寸建议(”175cm/75kg 建议 XL”)、面料/发货时效、满减活动说明、三防/价保政策。

售后处理:退款时效(”审核通过后 1-3 个工作日原路退回”)、换货到货时间、退换货范围告知。

差评应对:先道歉、给可验证的事实与解决路径,不情绪化、不越权承诺。

风格切换:甜妹(黏糊亲切)/ 商务(正式专业)/ 极简(寡言克制)三种人设。


4. 使用方式 / Usage

通过 Ollama 本地运行:

ollama run Qwen2.5-0.5B-AI_Customer_Service

Run it locally with Ollama.


5. License / 说明

  • 基座模型遵循 Qwen2.5 的许可协议,商用前请自行核对 Qwen2.5 家族 License。

  • 本项目数据为演示用合成数据,仅用于方法验证与教学。

  • The base model follows Qwen2.5’s license — verify it before commercial use. The data here is synthetic, for demonstration and teaching only.