arXiv:2501.16273cs.CLcs.AI2025-01被引 5

encoder-decoder架构让小模型更快更省资源,适合手机等设备部署。

Return of the Encoder: Maximizing Parameter Efficiency for SLMs

  • 用知识蒸馏让编码器-解码器模型学习大模型能力,保持高效结构
  • 在边缘设备上首令牌延迟低47%,吞吐量高4.7倍
  • 特别适合输入输出差异大的任务,如对话、摘要生成

尽管解码器-only语言模型占据主导地位,但编码器-解码器架构在序列处理中具有根本性效率优势。针对参数量10亿以下的小型语言模型(SLMs),我们在GPU、CPU和NPU平台上系统分析发现,编码器-解码器架构在边缘设备上可实现47%的首令牌延迟降低和4.7倍的吞吐量提升。这归因于其一次性输入处理及理解与生成阶段的高效分离。我们提出一种新型知识蒸馏框架,使编码器-解码器模型能从大规模解码器-only教师模型中学习能力,同时保留自身架构优势,在多种任务上平均性能提升6点,尤其在输入输出分布不对称的任务中表现显著。结合旋转位置编码(RoPE)和视觉编码器等现代技术,研究证实编码器-解码器架构是资源受限环境中部署高性能语言模型的更优路径。研究挑战了当前仅向解码器扩展的趋势,表明在参数预算下降时,架构选择愈发关键,尤其是在对计算效率要求极高的设备端和边缘部署场景。

原文摘要 · Abstract (English)

The dominance of large decoder-only language models has overshadowed encoder-decoder architectures, despite their fundamental efficiency advantages in sequence processing. For small language models (SLMs) - those with 1 billion parameters or fewer - our systematic analysis across GPU, CPU, and NPU platforms reveals that encoder-decoder architectures achieve 47% lower first-token latency and 4.7x higher throughput compared to decoder-only models on edge devices. These gains may be attributed to encoder-decoder's one-time input processing and efficient separation of understanding and generation phases. We introduce a novel knowledge distillation framework that enables encoder-decoder models to leverage capabilities from large scalable decoder-only teachers while preserving their architectural advantages, achieving up to 6 average performance points improvement across diverse tasks, with significant gains in asymmetric sequence tasks where input and output distributions can benefit from different processing approaches. When combined with modern advances like Rotary Positional Embeddings (RoPE) and Vision encoders, our systematic investigation demonstrates that encoder-decoder architectures provide a more practical path toward deploying capable language models in resource-constrained environments. Our findings challenge the prevailing trend toward decoder-only scaling, showing that architectural choices become increasingly crucial as parameter budgets decrease, particularly for on-device and edge deployments where computational efficiency is paramount.

小模型编码器-解码器边缘计算知识蒸馏

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。