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

少样本对话虚拟助手系统中基础模型的实用 token 剪枝

Practical token pruning for foundation models in few-shot conversational virtual assistant systems

IBM(国际商业机器公司)

Haode Qi, Cheng Qian, Jian Ni, Pratyush Singh, Reza Fazeli, Gengyu Wang, Zhongzheng Shu, Eric Wayne, Juergen Bross

AI总结:

针对企业级虚拟助手系统中少样本意图分类的推理效率问题,提出一种无需特定任务训练的动态 token 剪枝多任务自适应方法,在不影响性能的情况下显著提升了 transformer 模型的推理速度。

摘要:

在企业级 Virtual Assistant (VA) 系统中,intent classification 是根据用户需求决定如何处理用户输入的关键组件。VA 系统被期望成为一种成本高效的 SaaS 服务,具有低训练和推理时间,即使在训练样本数量较少的情况下也能达到高准确率。我们使用对比学习目标预训练了一个基于 transformer 的句子嵌入模型,并在训练 intent classification 模型时利用该模型的嵌入作为特征。我们的方法在少样本场景下取得了 state-of-the-art 的结果,并在流行的 intent classification 基准测试上优于其他商业解决方案。然而,由于 transformer 的 attention 机制的二次运行时间,通过基于 transformer 的模型生成特征会增加推理时间,尤其是对于较长的用户输入。在 model distillation 的基础上,我们引入了一种实用的多任务自适应方法,该方法可配置动态 token pruning,而无需针对 intent classification 进行特定任务的训练。我们证明,该方法在不影响模型性能的情况下,提高了流行的 sentence transformer 模型的推理速度。

英文摘要:

In an enterprise Virtual Assistant (VA) system, intent classification is the crucial component that determines how a user input is handled based on what the user wants. The VA system is expected to be a cost-efficient SaaS service with low training and inference time while achieving high accuracy even with a small number of training samples. We pretrain a transformer-based sentence embedding model with a contrastive learning objective and leverage the embedding of the model as features when training intent classification models. Our approach achieves the state-of-the-art results for few-shot scenarios and performs better than other commercial solutions on popular intent classification benchmarks. However, generating features via a transformer-based model increases the inference time, especially for longer user inputs, due to the quadratic runtime of the transformer's attention mechanism. On top of model distillation, we introduce a practical multi-task adaptation approach that configures dynamic token pruning without the need for task-specific training for intent classification. We demonstrate that this approach improves the inference speed of popular sentence transformer models without affecting model performance.

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

↑