Large language models (LLMs) with chain-of-thought reasoning achieve state-of-the-art performance across complex problem-solving tasks, but their verbose reasoning traces and large context requirements make them impractical for edge deployment. These challenges include high token generation costs, large KV-cache footprints, and inefficiencies when distilling reasoning capabilities into smaller models for mobile devices. Existing approaches often rely on distilling reasoning traces from larger models into smaller models, which are verbose and stylistically redundant, undesirable for on-device inference. In this work, we propose a lightweight approach to enable reasoning in small LLMs using LoRA adapters combined with supervised fine-tuning. We further introduce budget forcing via reinforcement learning on these adapters, significantly reducing response length with minimal accuracy loss. To address memory-bound decoding, we exploit parallel test-time scaling, improving accuracy at minor latency increase. Finally, we present a dynamic adapter-switching mechanism that activates reasoning only when needed and a KV-cache sharing strategy during prompt encoding, reducing time-to-first-token for on-device inference. Experiments on Qwen2.5-7B demonstrate that our method achieves efficient, accurate reasoning under strict resource constraints, making LLM reasoning practical for mobile scenarios. Videos demonstrating our solution running on mobile devices are available on our project page.


翻译:采用思维链推理的大型语言模型(LLM)在复杂问题求解任务中实现了最先进的性能,但其冗长的推理轨迹和庞大的上下文需求使其难以实际部署于边缘设备。这些挑战包括高昂的令牌生成成本、巨大的键值缓存占用空间,以及将推理能力蒸馏到适用于移动设备的小型模型时存在的效率低下问题。现有方法通常依赖于将大型模型的推理轨迹蒸馏到小型模型中,这些轨迹往往冗长且存在风格冗余,不利于设备端推理。本研究提出一种轻量级方法,通过结合LoRA适配器与监督微调,使小型LLM具备推理能力。我们进一步引入基于强化学习的预算强制机制,显著缩短响应长度,同时仅带来极小的精度损失。为应对内存受限的解码问题,我们利用并行测试时缩放技术,以微小的延迟增加换取精度提升。最后,我们提出一种动态适配器切换机制(仅在需要时激活推理)及提示编码期间的键值缓存共享策略,从而降低设备端推理的首令牌生成时间。在Qwen2.5-7B模型上的实验表明,我们的方法能够在严格资源约束下实现高效、精确的推理,使LLM推理在移动场景中具备实用性。展示该方案在移动设备上运行效果的视频已发布于项目页面。

0
下载
关闭预览

相关内容

【普林斯顿博士论文】大型模型的高效推理
专知会员服务
23+阅读 · 2025年8月10日
《潜在推理综述》
专知会员服务
21+阅读 · 2025年7月9日
超越语言的推理:潜在思维链推理的综合综述
专知会员服务
22+阅读 · 2025年5月23日
大型语言模型推理引擎的综述:优化与效率的视角
专知会员服务
22+阅读 · 2025年5月13日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
大规模推理模型的高效推理:综述
专知会员服务
21+阅读 · 2025年4月3日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
33+阅读 · 2025年4月1日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
「因果推理」概述论文,13页pdf
专知
16+阅读 · 2021年3月20日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
【边缘计算】边缘计算面临的问题
产业智能官
17+阅读 · 2019年5月31日
自然语言处理常识推理综述论文,60页pdf
专知
73+阅读 · 2019年4月4日
论文浅尝 | 基于神经网络的知识推理
开放知识图谱
15+阅读 · 2018年3月12日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
最新“指挥控制”领域出版物合集(简介)
专知会员服务
1+阅读 · 今天15:19
面向军事作战需求开发的人工智能(RAIMOND)
专知会员服务
3+阅读 · 今天15:13
软件定义多域战术网络:基础与未来方向(综述)
水下战战术决策中的气象与海洋预报(50页报告)
远程空中优势:新一代超视距导弹的兴起
专知会员服务
1+阅读 · 今天14:45
大语言模型溯因推理的统一分类学与综述
专知会员服务
0+阅读 · 今天12:07
相关VIP内容
【普林斯顿博士论文】大型模型的高效推理
专知会员服务
23+阅读 · 2025年8月10日
《潜在推理综述》
专知会员服务
21+阅读 · 2025年7月9日
超越语言的推理:潜在思维链推理的综合综述
专知会员服务
22+阅读 · 2025年5月23日
大型语言模型推理引擎的综述:优化与效率的视角
专知会员服务
22+阅读 · 2025年5月13日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
大规模推理模型的高效推理:综述
专知会员服务
21+阅读 · 2025年4月3日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
33+阅读 · 2025年4月1日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员