---
title: Vibrato
canonical_url: "https://www.modelscope.cn/models/corolin/vibrato"
md_url: "https://www.modelscope.cn/models/corolin/vibrato.md"
repository: corolin/vibrato
chinese_name: "颤音Vibrato"
last_updated: 2026-10-04
license: "MIT License"
pipeline_tag: sentiment-classification
tasks:
  - sentiment-classification
model_type:
  - system-one-emotion
library_name:
  - onnx
  - pytorch
frameworks:
  - pytorch
language:
  - cn
  - en
domain:
  - nlp
downloads: 0
stars: 0
tags:
  - emotion-ai
  - system-one
  - pad-model
  - onnx
---

# Vibrato

> vibrato - corolin 在 ModelScope 开源的模型。Vibrato：情绪系统一（System One）开源决策模型

corolin/vibrato 是 ModelScope 魔搭社区上的sentiment-classification模型，采用 MIT License 许可。

- **Repository**: corolin/vibrato
- **License**: MIT License
- **Tasks**: sentiment-classification
- **Tags**: emotion-ai, system-one, pad-model, onnx
- **Downloads**: 0
- **Stars**: 0
- **Last updated**: 2026-10-04

Source: https://www.modelscope.cn/models/corolin/vibrato

---

# Vibrato：情绪系统一（System One）开源决策模型

<p align="center">
  <a href="https://github.com/corolin/vibrato"><img src="https://img.shields.io/badge/GitHub-corolin/vibrato-blue?logo=github"></a>
  <a href="https://vibrato.syrkos.com"><img src="https://img.shields.io/badge/🌐_Website-Global-blue.svg"></a>
  <a href="https://vibrato.syrkos.cn"><img src="https://img.shields.io/badge/🇨🇳_Website-China-red.svg"></a>
  <a href="https://huggingface.co/Corolin/Vibrato"><img src="https://img.shields.io/badge/%F0%9F%A4%97_Hugging_Face-Models-ffd21e.svg"></a>
  <img src="https://img.shields.io/badge/License-MIT-green.svg">
  <img src="https://img.shields.io/badge/ONNX-已就绪-orange.svg">
</p>

**Vibrato（颤音）** 是一个独立、通用的**情绪系统一（System One / Jev-class）决策模型**：单次前向传播读取多轮对话消息序列，输出校准的**情绪概率分布与类型化决策**：

* **3 × 9-bin 李克特 PAD 概率分布**（Pleasure 愉悦度 / Arousal 激活度 / Dominance 优势度）
* **OCC-22 分类与情绪家族判定**（Ortony-Clore-Collins 经典情绪分类体系）
* **语用行为标记（Nouls）**：`suppressed`（压抑/反讽）与 `directed_at_me`（针对自己的情绪归因）
* **置信度头（Confidence）**：当模型置信度偏低时，可自动兜底回退到重型 LLM（知道何时该克制弃权）

> *在弦乐器中，颤音（vibrato）是情感在音符间流动的方式。*

---

## ⚡ 性能与选型矩阵（实测）

| 部署形态 | 硬件 | 延迟 (p50) | 磁盘/内存 | 典型适用场景 |
|---|---|---|---|---|
| **Vibrato v6 int8 纯文字极速头** | CPU 单线程 | **2.97 ~ 4.39 ms** | 2.2 MB (内存 8MB) | 超高并发、实时流式会话路由、零外部依赖 |
| **GPU 判头** | GPU | **1.92 ms** | 7.4 MB | 实时云端伴侣服务 |
| **e5s 满血全离线包** | CPU 单线程 | **~15 ms** | 85 MB (底座+头) | 桌面端、本地离线伴侣 AI、低功耗边缘端 |
| **BGE-M3 满血知识链路** | GPU | **~16 ms** | 569 MB | 极致细微的亲昵/撒娇等语用感知 |

---

## 📦 仓库模型文件说明

* `models/vibrato_v6_int8.onnx`：1.86M 参数标准判头 INT8（2.2 MB），纯文字路径极速推理推荐。
* `models/vibrato_v6_fp32.onnx`：标准判头 FP32（7.4 MB），与 PyTorch 训练基线逐位等价。
* `models/vibrato_e5s_int8.onnx`：e5-small 嵌入适配判头 INT8（2.1 MB）。
* `models/e5s_int8.onnx`：多语言 e5-small 向量底座 INT8（118 MB），无需外网下载开箱即跑。
* `checkpoints/vibrato_v6.pt` & `checkpoints/vibrato_e5s.pt`：PyTorch 原始权重存档。
* `vocab.json` & `tokenizer/`：字表与分词器配置。
* `run_inference.py`：单文件端到端测试与调用示例。

---

## 🚀 快速上手 (Quickstart)

### 1. 安装基础依赖

```bash
pip install onnxruntime tokenizers numpy
```

### 2. 执行内置测试用例

克隆或下载本仓库后，直接运行：

```bash
# 模式 1：离线满血 e5s 模式（端到端 ~15ms，默认推荐）
python run_inference.py --mode e5s

# 模式 2：纯文字极速模式（~3ms，零模型底座）
python run_inference.py --mode fast
```

### 3. Python 代码内调用

```python
from run_inference import load_e5s, score_messages

# 1. 一行加载离线模型
vocab, tok, head, backbone = load_e5s()

# 2. 构造对话消息（符合 v1/affect 范式）
messages = [
    {"role": "user", "message": "今天累死啦，快抱抱"}
]

# 3. 前向推理
pad, family, nouls, conf = score_messages(messages, vocab, head, backbone=backbone, tok=tok)

print("PAD 情绪分值:", pad)        # [-1.0, 1.0] 区间
print("情绪家族:", family)         # 如 'affectionate'
print("语用标记 (Nouls):", nouls)  # {'suppressed': bool, 'directed_at_me': bool}
print("置信度:", conf)             # 0.0 ~ 1.0
```

---

## 🔗 相关链接

* **GitHub 源码仓库**：[corolin/vibrato](https://github.com/corolin/vibrato)
* **Hugging Face 模型页**：[Corolin/Vibrato](https://huggingface.co/Corolin/Vibrato)
* **官网 (海外)**：[https://vibrato.syrkos.com](https://vibrato.syrkos.com)
* **官网 (国内)**：[https://vibrato.syrkos.cn](https://vibrato.syrkos.cn)
