PyroDash: Cost-Efficient Token-Level Small-Large Language Model Collaborative Inference
作者: Niqi Lyu, Pengtao Shi, Wei Qiu, Jianlin Zhong, Sicong Xia, Jianyao Ma, Yicheng Ding
分类: cs.CL
发布日期: 2026-07-22
备注: 19 pages, 3 figures
💡 一句话要点
提出PyroDash以实现小型与大型语言模型的协同推理
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 语言模型 协同推理 成本优化 控制令牌 数学推理 深度学习 模型训练
📋 核心要点
- 现有大型语言模型在推理能力上表现优异,但其高昂的服务成本限制了实际应用。
- PyroDash通过控制令牌实现SLM与LLM的协同推理,优化了推理过程中的成本与准确性平衡。
- 在多个数学推理基准上,PyroDash在降低成本的同时,准确性提升了6.36个百分点,显示出其有效性。
📝 摘要(中文)
大型语言模型(LLMs)具备强大的推理能力,但在大规模服务中成本高昂;而小型语言模型(SLMs)成本较低,但在复杂问题上表现不佳。本文提出了PyroDash,一个基于成本意识的SLM-LLM协同推理框架。在生成过程中,SLM通过发出控制令牌决定是否请求LLM的协助。协作引擎随后将查询和部分推理轨迹发送给冻结的LLM进行补全。PyroDash在三个阶段训练SLM:控制令牌嵌入学习、面向卸载的监督微调和基于成本的对齐。实验结果表明,PyroDash在五个数学推理基准上支持不同的准确性-成本操作点,显著降低了推理成本的同时提高了准确性。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在推理服务中的高成本问题,同时提升小型语言模型在复杂任务上的可靠性。现有方法往往需要额外的路由器或LLM重训练,增加了系统复杂性。
核心思路:PyroDash通过在SLM中内置控制令牌的机制,决定何时请求LLM的协助,从而实现高效的协同推理,避免了对外部组件的依赖。
技术框架:PyroDash的整体架构包括三个主要阶段:控制令牌嵌入学习、面向卸载的监督微调和基于成本的对齐。协作引擎负责将SLM的查询和部分推理轨迹发送给LLM。
关键创新:PyroDash的主要创新在于其内部化的协作策略,避免了传统方法中对外部路由器的需求,同时通过控制令牌实现了高效的推理过程。
关键设计:在训练过程中,PyroDash采用了Group Relative Policy Optimization作为奖励机制,平衡了答案准确性与推理成本,确保了模型在不同操作点的灵活性。
🖼️ 关键图片
📊 实验亮点
在实验中,PyroDash在λ=0.05时实现了64.04%的平均准确率,比仅使用LLM的基线提高了6.36个百分点,同时降低了20.4%的推理成本。在λ=0.6时,准确率为54.55%,LLM调用次数显著减少,整体成本从49.36美元降至1.78美元,展示了其卓越的性能。
🎯 应用场景
PyroDash的研究成果在多个领域具有潜在应用价值,包括智能问答系统、自动化客服、教育辅导等。通过降低推理成本并提升准确性,该框架能够在资源受限的环境中实现高效的语言理解与生成,推动相关技术的普及与应用。
📄 摘要(原文)
Large language models (LLMs) provide strong reasoning capabilities but are expensive to serve at scale, whereas small language models (SLMs) are cheaper but less reliable on difficult problems. We introduce PyroDash, a cost-aware framework for token-level SLM-LLM collaborative inference. During generation, the SLM decides whether to request assistance by emitting a control token. A Collaborate Engine then sends the query and partial reasoning trace to a frozen LLM for completion through a single handoff. The policy is internalized in the SLM, requiring neither a separate router, LLM retraining, nor access to LLM logits. PyroDash trains the SLM in three stages: control-token embedding learning, offloading-oriented supervised fine-tuning, and cost-aware alignment with Group Relative Policy Optimization. Its reward balances answer accuracy against inference cost normalized by LLM-only inference. Across five mathematical reasoning benchmarks, PyroDash supports different accuracy-cost operating points. With $λ=0.05$, it achieves 64.04 percent average accuracy, 6.36 percentage points above the LLM-only baseline, while reducing cost by 20.4 percent. With $λ=0.6$, it achieves 54.55 percent accuracy with a 1.90 percent LLM token ratio and 0.012 LLM calls per example, reducing total cost from USD 49.36 to USD 1.78. These results show that learned token-level handoffs can reduce LLM use while preserving strong reasoning performance.