arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.24174cs.CLcs.AIcs.ITmath.IT
收藏

面向任务的小型语言模型加速

Task-Centric Acceleration of Small-Language Models

Amazon(亚马逊)

Dor Tsur, Sharon Adar, Ran Levy

AI总结:

本文提出TASC框架,通过任务自适应序列压缩方法提升小型语言模型的推理效率,同时保持任务性能。

摘要:

小型语言模型(SLMs)已逐渐成为大型语言模型在特定任务应用中的高效替代方案。然而,它们常常用于高吞吐、低延迟的场景,其中效率至关重要。我们提出了TASC,即任务自适应序列压缩,这是一个用于SLMs加速的框架,包含两种使用场景:在进行SLMs微调时,我们提出了TASC-ft,它通过迭代地丰富分词器词汇表中的高频输出n-gram,然后对模型进行微调以利用扩展的词汇表。接下来,我们提出了一种推理时间的方法,称为TASC-spec。TASC-spec是一种轻量级、无需训练的推测解码方法,它从任务的输出语料库中构建n-gram草案模型,混合任务和上下文n-gram信息。TASC-spec避免了任何额外的训练,同时绕过了草案-目标词汇表对齐约束。我们展示了这两种方法在多个低输出变异生成任务中的有效性。我们的方法在保持任务性能的同时,显示出一致的推理效率提升。

英文摘要:

Small language models (SLMs) have emerged as efficient alternatives to large language models for task-specific applications. However, they are often employed in high-volume, low-latency settings, where efficiency is crucial. We propose TASC, Task-Adaptive Sequence Compression, a framework for SLM acceleration comprising two use-cases: When performing SLM fine-tuning, we propose TASC-ft, which iteratively enriches the tokenizer vocabulary with high-frequency output n-grams and then fine-tunes the model to utilize the expanded vocabulary. Next, we propose an inference-time method, termed TASC-spec. TASC-spec is a lightweight, training-free speculative decoding method that constructs an n-gram draft model from the task's output corpus, mixing task and context n-gram information.TASC-spec avoids any additional training, while bypassing draft-target vocabulary alignment constraints. We demonstrate the effectiveness of both methods across multiple low output-variability generation tasks. Our methods show consistent improvements in inference efficiency while maintaining task performance.

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

↑