在手机级设备上用大模型实现指令识别与自然回复,无需云端支持。
On-Device LLMs for Home Assistant: Dual Role in Intent Detection and Response Generation
- 用合成数据微调大模型,同时完成指令解析和文本生成。
- 8位量化模型保持高准确率,4位模型生成流畅但分类准确率下降。
- 适合资源受限的智能家居场景,尤其适合单次指令响应。
本文研究大型语言模型(LLMs)在仅具备CPU的边缘设备上,能否通过微调合成但领域代表性数据,完成智能家居助手的双重任务:(i)槽位与意图检测,(ii)自然语言响应生成。我们微调模型以输出JSON动作调用与文本响应。实验表明,16位与8位量化模型在槽位与意图检测上保持高准确率,生成文本语义连贯性强;而4位模型虽维持生成流畅性,但在设备服务分类准确率上出现明显下降。对噪声人类输入及跨领域意图的进一步评估显示,模型具有较好泛化能力,准确率维持在80%–86%。尽管平均推理时间每查询达5–6秒(适用于单次指令,但多轮对话表现不佳),结果证实,仅靠边缘设备上的大模型即可有效统一命令理解与灵活回应生成,无需依赖专用硬件。
原文摘要 · Abstract (English)
This paper investigates whether Large Language Models (LLMs), fine-tuned on synthetic but domain-representative data, can perform the twofold task of (i) slot and intent detection and (ii) natural language response generation for a smart home assistant, while running solely on resource-limited, CPU-only edge hardware. We fine-tune LLMs to produce both JSON action calls and text responses. Our experiments show that 16-bit and 8-bit quantized variants preserve high accuracy on slot and intent detection and maintain strong semantic coherence in generated text, while the 4-bit model, while retaining generative fluency, suffers a noticeable drop in device-service classification accuracy. Further evaluations on noisy human (non-synthetic) prompts and out-of-domain intents confirm the models' generalization ability, obtaining around 80--86\% accuracy. While the average inference time is 5--6 seconds per query -- acceptable for one-shot commands but suboptimal for multi-turn dialogue -- our results affirm that an on-device LLM can effectively unify command interpretation and flexible response generation for home automation without relying on specialized hardware.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。