Large Language Models (LLMs) for complex reasoning is often hindered by high computational costs and latency, while resource-efficient Small Language Models (SLMs) typically lack the necessary reasoning capacity. Existing collaborative approaches, such as cascading or routing, operate at a coarse granularity by offloading entire queries to LLMs, resulting in significant computational waste when the SLM is capable of handling the majority of reasoning steps. To address this, we propose RelayLLM, a novel framework for efficient reasoning via token-level collaborative decoding. Unlike routers, RelayLLM empowers the SLM to act as an active controller that dynamically invokes the LLM only for critical tokens via a special command, effectively "relaying" the generation process. We introduce a two-stage training framework, including warm-up and Group Relative Policy Optimization (GRPO) to teach the model to balance independence with strategic help-seeking. Empirical results across six benchmarks demonstrate that RelayLLM achieves an average accuracy of 49.52%, effectively bridging the performance gap between the two models. Notably, this is achieved by invoking the LLM for only 1.07% of the total generated tokens, offering a 98.2% cost reduction compared to performance-matched random routers.


翻译:大型语言模型(LLMs)在复杂推理任务中常受限于高昂的计算成本与延迟,而资源高效的小型语言模型(SLMs)通常缺乏必要的推理能力。现有的协作方法(如级联或路由)以粗粒度方式运行,将整个查询卸载给LLMs,当SLM能够处理大部分推理步骤时,会造成显著的计算资源浪费。为解决这一问题,我们提出了RelayLLM——一种基于词元级协作解码的新型高效推理框架。与路由机制不同,RelayLLM使SLM能够作为主动控制器,通过特殊指令动态地仅为关键词元调用LLM,从而有效地实现生成过程的“接力”。我们引入了一个两阶段训练框架,包括预热阶段和组相对策略优化(GRPO),以指导模型在自主推理与策略性求助之间取得平衡。在六个基准测试上的实证结果表明,RelayLLM取得了平均49.52%的准确率,有效弥合了两种模型之间的性能差距。值得注意的是,这一成果仅需为总生成词元的1.07%调用LLM即可实现,与性能匹配的随机路由方法相比,计算成本降低了98.2%。

0
下载
关闭预览

相关内容

【普林斯顿博士论文】大型模型的高效推理
专知会员服务
22+阅读 · 2025年8月10日
超越语言的推理:潜在思维链推理的综合综述
专知会员服务
22+阅读 · 2025年5月23日
大型语言模型推理引擎的综述:优化与效率的视角
专知会员服务
21+阅读 · 2025年5月13日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
32+阅读 · 2025年4月1日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关VIP内容
【普林斯顿博士论文】大型模型的高效推理
专知会员服务
22+阅读 · 2025年8月10日
超越语言的推理:潜在思维链推理的综合综述
专知会员服务
22+阅读 · 2025年5月23日
大型语言模型推理引擎的综述:优化与效率的视角
专知会员服务
21+阅读 · 2025年5月13日
高效大语言模型推理服务综述
专知会员服务
18+阅读 · 2025年4月30日
高效推理的集约化探索:大语言模型推理优化综述
专知会员服务
32+阅读 · 2025年4月1日
大型语言模型高效推理综述
专知会员服务
64+阅读 · 2024年4月23日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员