Jarvis:开源边缘语音助手框架,Mistral 7B微调实现97.63%车载意图识别

arXiv 2609.21109 论文解读

Werner et al., “Talk to Me, Jarvis: An Open-Source Edge-Deployable Voice Assistant Framework for Autonomous Racecars”, arXiv 2609.21109, 2026.09.17

论文信息

项目 内容
标题 Talk to Me, Jarvis: An Open-Source Edge-Deployable Voice Assistant Framework for Autonomous Racecars
arXiv 2609.21109
日期 2026年9月17日
方向 Machine Learning, Robotics
核心 Mistral 7B微调,离线97.63%意图识别,1.39s延迟
开源 ✅ 开源实现

核心创新

首个完全离线、边缘部署的车载语音助手开源框架:

  • Mistral 7B微调:领域专用text-to-command分类
  • 97.63%意图识别准确率:超越在线API模型
  • 1.39秒平均延迟:本地推理,无需网络
  • 开源:完整代码+微调数据

系统架构

与在线API对比

维度 Jarvis(本地) API(GPT-5/Gemini) 优势
意图识别准确率 97.63% 83-89% Jarvis
平均延迟 1.39s 2-5s(网络) Jarvis
网络依赖 ✅ 无 ❌ 必须 Jarvis
隐私 ✅ 本地 ❌ 数据上传 Jarvis
成本 一次性硬件 持续API费用 Jarvis
通用性 ⚠️ 领域专用 ✅ 通用 API
新意图 ⚠️ 需微调 ✅ 零样本 API
模型大小 7B(~4GB量化) API端 —

text-to-command分类

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
"""
Jarvis核心:text-to-command分类器

将自然语言指令映射到结构化命令

示例:
"打开车窗" → {"tool": "windows", "action": "open", "params": {"level": "full"}}
"帮我导航到加油站" → {"tool": "navigation", "action": "set_destination", "params": {"type": "gas_station"}}
"我有点冷" → {"tool": "climate", "action": "increase_temp", "params": {"delta": 2}}

Mistral 7B微调:
1. 构建指令-命令对数据集
2. LoRA/QLoRA微调Mistral 7B
3. 量化部署(INT4/INT8)
"""

from dataclasses import dataclass
from typing import Optional
import json

@dataclass
class VehicleCommand:
"""结构化车辆命令"""
tool: str # 目标工具
action: str # 动作
params: dict # 参数
safety_level: str = "low" # 安全等级

# 指令分类示例
command_examples = [
# (自然语言, 结构化命令)
("打开车窗",
VehicleCommand("windows", "open", {"level": "full"})),
("把空调调到22度",
VehicleCommand("climate", "set_temp", {"temp": 22})),
("导航到最近的加油站",
VehicleCommand("navigation", "set_destination", {"type": "gas_station", "nearest": True})),
("打开后备箱",
VehicleCommand("trunk", "open", {}, "medium")), # 安全等级中
("紧急停车",
VehicleCommand("emergency", "stop", {}, "critical")), # 安全等级高
("帮我看一下后视镜",
VehicleCommand("mirror", "adjust", {"view": "rear"}, "low")),
]

# 微调数据集格式
def create_finetune_example(utterance, command):
"""创建Mistral微调样本"""
return {
"instruction": "将以下语音指令转换为结构化命令",
"input": utterance,
"output": json.dumps({
"tool": command.tool,
"action": command.action,
"params": command.params,
"safety_level": command.safety_level,
}, ensure_ascii=False)
}

# 生成微调数据
print("=== Mistral 7B微调数据示例 ===")
for utterance, cmd in command_examples:
example = create_finetune_example(utterance, cmd)
print(f"\n输入: {example['input']}")
print(f"输出: {example['output']}")

# 部署推理
print("\n=== 部署推理参数 ===")
print("模型: Mistral 7B (4-bit量化)")
print("量化: Q4_K_M (GGUF格式)")
print("模型大小: ~4GB")
print("推理框架: llama.cpp / Ollama")
print("硬件: CPU 8核 / GPU可选")
print("延迟目标: <2s")
print("实测延迟: 1.39s 平均")

边缘部署方案

组件 模型/工具 大小 延迟
语音识别 faster-whisper-small ~500MB ~300ms
意图分类 Mistral 7B Q4 ~4GB ~800ms
语音合成 Piper TTS ~100MB ~200ms
总计 — ~5GB ~1.3s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 边缘部署硬件需求
hardware = {
'CPU方案': {
'CPU': '8核 ARM Cortex-A78',
'RAM': '16GB',
'存储': '8GB eMMC(模型+数据)',
'功耗': '~15W',
'延迟': '1.39s',
'成本': '~$200(仅计算)',
},
'GPU加速方案': {
'GPU': 'NVIDIA Orin Nano 8GB',
'RAM': '8GB LPDDR5',
'存储': '8GB NVMe',
'功耗': '~25W',
'延迟': '~0.5s(预估)',
'成本': '~$400(仅计算)',
},
'NPU方案': {
'NPU': 'QCS8255 Hexagon 26TOPS',
'RAM': '8GB',
'存储': '8GB UFS',
'功耗': '~10W',
'延迟': '~1s(预估)',
'成本': '~$150(仅计算)',
},
}

print("=== Jarvis边缘部署方案 ===")
for name, spec in hardware.items():
print(f"\n{name}:")
for k, v in spec.items():
print(f" {k}: {v}")

与LLM安全基准的协同

完整链路: Jarvis意图理解(97.63%) → 安全执行层验证 → DMS状态输入 → 车辆功能执行

IMS开发启示

1. 语音助手+DMS联动

DMS状态 语音助手响应 示例
疲劳 简短+确认 “您疲劳了,导航已设置为最近服务区,确认?”
分心 推迟执行 “请先注视道路,然后我再执行”
酒驾损伤 紧急模式 “检测到驾驶异常,正在联系紧急联系人”
正常 正常执行 “空调已调到22度”
情绪愤怒 冷静回复 “路线已更新,预计到达时间15分钟”

2. 开源vs商用

维度 Jarvis(开源) 商用方案
模型 Mistral 7B 专有模型
微调 需自建数据 预训练
部署 llama.cpp SDK
成本 硬件一次性 API持续费
隐私 ✅ 本地 ❌ 上传
定制 ✅ 完全可控 ⚠️ 有限
成熟度 学术原型 量产级

3. 与座舱感知的融合

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 融合架构
class CabinVoiceAssistant:
def __init__(self):
self.asr = None # faster-whisper
self.llm = None # Mistral 7B
self.tts = None # Piper
self.safety = SafetyEnforcementLayer()
self.dms = None # DMS状态输入

def process(self, audio, dms_state):
"""完整处理链路"""
# 1. 语音识别
text = self.asr.transcribe(audio)

# 2. DMS状态检查
if dms_state.fatigue > 0.7:
# 疲劳→简短回复+确认
cmd = self.llm.classify(text, mode='confirm')
elif dms_state.distraction > 0.7:
# 分心→推迟执行
return "请先注视道路"
else:
cmd = self.llm.classify(text)

# 3. 安全执行层
final = self.safety.enforce(cmd, dms_state)

# 4. 执行+语音反馈
result = self.execute(final)
speech = self.tts.synthesize(result.message)

return speech, final

4. 部署优先级

功能 模型 优先级 延迟要求
意图分类 Mistral 7B Q4 P0 <1.5s
语音识别 faster-whisper P0 <0.3s
语音合成 Piper P1 <0.2s
DMS联动 安全执行层 P1 <0.01s
情绪响应 LLM prompt P2 —
个性化 记忆+偏好 P2 —

局限性

  1. 赛车场景:原始设计为自动驾驶赛车,需适配乘用车
  2. 意图有限:text-to-command分类的命令集需扩展
  3. Mistral 7B:4GB模型仍较大,NPU部署需优化
  4. 开源原型:未量产验证
  5. 无多语言:英文为主,中文需微调
  6. 安全层缺失:论文未包含安全执行层(需结合arXiv 2609.19630)

结论

Jarvis证明了边缘LLM语音助手可行:97.63%准确率+1.39s延迟+完全离线。

对IMS的启示:

  1. 边缘LLM已成熟——Mistral 7B微调>API模型在领域任务上
  2. 安全执行层是必须——结合LLM安全基准(arXiv 2609.19630)
  3. DMS+语音+安全层三位一体——完整座舱交互架构
  4. 开源降低门槛——Jarvis+安全层+DMS可快速原型

参考来源:

  • arXiv: 2609.21109 (Jarvis, 2026.09.17)
  • Mistral 7B (Mistral AI)
  • faster-whisper (SYSTRAN)
  • Piper TTS (Open Source)
  • llama.cpp (Georgi Gerganov)