arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.18076cs.CL
收藏

一种面向分类任务的多模型适配型推测解码方法

A Multi-Model Adaptation of Speculative Decoding for Classification

Freshworks Inc(Freshworks公司)

Somnath Roy, Padharthi Sreekar, Srivatsa Narasimha, Anubhav Anand

AI总结:

本研究将推测解码改造适配于分类任务,提出多模型框架,用轻量工作模型多数投票快速出结果、分歧时调用强判断模型,在保证准确率的同时显著提升推理效率。

摘要:

本研究提出了一种推测解码(speculative decoding)的新型适配方案,将该技术从生成任务改造应用于分类任务。我们提出了一个多模型框架,该框架采用最多3个轻量级工作模型(worker model)和1个性能更强的判断模型(judge model),分别对应推测解码中的草稿模型(draft model)和目标模型(target model)。承担大部分计算量的工作模型会针对给定输入独立预测离散类别标签。当多数工作模型对某个标签达成一致时,该标签会被直接采纳为最终标签,从而绕开计算成本高昂的判断模型以优化效率。若出现意见不一致的情况,则由判断模型介入确定最终标签。该方法最大限度减少了冗余计算,借助多个工作模型的冗余输出提供置信度支撑,并将判断模型的作用限定在处理疑难案例上,在效率和准确率之间实现了实用的平衡。我们的分析表明,在简单推理任务和高阶推理任务中,参数量为30亿(以下简称3B)的小型开箱即用指令/聊天微调工作模型,与判断模型的对齐水平和参数量为70亿(以下简称7B)的更大规模微调工作模型相当。表现最优的3B工作模型组合在情感分类任务上与判断模型的一致率约为80%-83%,在同类工单分类任务上的一致率约为50%-80%。此外,3B工作模型相较于判断模型的加速比为2.8倍至9倍,而7B工作模型组合的加速比为1.28倍至0.28倍。

英文摘要:

The current study introduces a novel adaptation of speculative decoding, repurposed from generation to classification tasks. We propose a multi-model framework employing up to three lightweight worker models and a single, more robust judge model analogous to draft models and target model, respectively, in speculative decoding. The worker models, tasked with the bulk of the computation, independently predict discrete class labels for a given input. When majority worker models agree on a label, it is accepted as the final label, optimizing efficiency by bypassing the computationally expensive judge model. In cases of disagreement, the judge model intervenes to resolve the label. This approach minimizes redundant computation, leverages the redundancy of multiple workers for confidence, and confines the judge model's role to challenging cases, offering a practical balance of efficiency and accuracy. Our analysis suggests that smaller out of the box instruction/chat finetuned worker models with 3 billion parameters (hereafter, 3B) demonstrate a level of alignment with judge models comparable to that of larger finetuned worker models with 7 billion parameters (hereafter, 7B) across both simple and higher order reasoning tasks. The top performing 3B worker model pair achieve an agreement rate of approximately 80-83% for sentiment and around 50-80% for similar ticket when compared to judge models. Additionally, 3B worker models provide a speedup ranging from 2.8x to 9x relative to the judge models, while 7B worker model combinations achieve a speedup ranging from 1.28x to 0.28x

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

↑