arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.02342cs.LGcs.AIcs.CLcs.CVcs.HC
收藏

优化用于车载函数调用的小型语言模型

Optimizing Small Language Models for In-Vehicle Function-Calling

Mercedes-Benz Research & Development North America(梅赛德斯-奔驰北美研发中心);Mercedes-Benz Tech Innovation(梅赛德斯-奔驰技术创新公司)

Yahya Sowti Khiabani, Farris Atif, Chieh Hsu, Sven Stahlmann, Tobias Michels, Sebastian Kramer, Benedikt Heidrich, M. Saquib Sarfraz, Julian Merten, Faezeh Tafazzoli

AI总结:

本文提出通过结构化剪枝、修复、量化及任务特定微调优化Phi-3 mini,使其可在车辆边缘设备上实时执行函数调用。

摘要:

我们提出了一种整体方法,用于将小型语言模型(SLM)作为函数调用智能体部署在作为边缘设备的车辆中,为传统的基于规则的系统提供更灵活、更稳健的替代方案。通过利用SLM,我们简化了车辆控制机制并增强了用户体验。考虑到车载硬件限制,我们应用了最先进的模型压缩技术,包括结构化剪枝、修复和量化,确保模型适应资源限制,同时保持可接受的性能。我们的工作重点是优化具有代表性的SLM,即Microsoft的Phi-3 mini,并概述了启用嵌入式模型的最佳实践,包括压缩、任务特定微调和车辆集成。我们证明,尽管模型大小显著减少,从原始模型中移除了多达20亿个参数,但我们的方法保留了模型准确且高效地处理复杂车载任务的能力。此外,通过在轻量级运行时环境中执行模型,我们实现了每秒11个token的生成速度,使得在没有硬件加速的情况下进行实时的设备端推理成为可能。我们的结果证明了SLM变革车辆控制系统的潜力,能够实现用户与其车辆之间更直观的交互,从而增强驾驶体验。

英文摘要:

We propose a holistic approach for deploying Small Language Models (SLMs) as function-calling agents within vehicles as edge devices, offering a more flexible and robust alternative to traditional rule-based systems. By leveraging SLMs, we simplify vehicle control mechanisms and enhance the user experience. Given the in-vehicle hardware constraints, we apply state-of-the-art model compression techniques, including structured pruning, healing, and quantization, ensuring that the model fits within the resource limitations while maintaining acceptable performance. Our work focuses on optimizing a representative SLM, Microsoft's Phi-3 mini, and outlines best practices for enabling embedded models, including compression, task-specific fine-tuning, and vehicle integration. We demonstrate that, despite significant reduction in model size which removes up to 2 billion parameters from the original model, our approach preserves the model's ability to handle complex in-vehicle tasks accurately and efficiently. Furthermore, by executing the model in a lightweight runtime environment, we achieve a generation speed of 11 tokens per second, making real-time, on-device inference feasible without hardware acceleration. Our results demonstrate the potential of SLMs to transform vehicle control systems, enabling more intuitive interactions between users and their vehicles for an enhanced driving experience.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑