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

LiteTransformerSearch:高效语言模型的免训练神经架构搜索

LiteTransformerSearch: Training-free Neural Architecture Search for Efficient Language Models

University of California San Diego(加州大学圣迭戈分校);Microsoft Research(微软研究院);Microsoft(微软)

Mojan Javaheripi, Gustavo H. de Rosa, Subhabrata Mukherjee, Shital Shah, Tomasz L. Religa, Caio C. T. Mendes, Sebastien Bubeck, Farinaz Koushanfar, Debadeepta Dey

摘要:

Transformer体系结构被普遍用作大规模自回归语言模型的构建块。然而,找到在任务性能(困惑)和硬件约束(如峰值内存利用率和延迟)之间进行最佳权衡的架构并非易事。各种硬件的扩散加剧了这一问题。我们利用有点令人惊讶的经验观察,自回归Transformers中的解码器参数的数量具有高等级的相关性与任务性能,无论架构拓扑结构。这种观察有机地诱导了一种简单的神经结构搜索(NAS)算法,该算法使用解码器参数作为困惑的代理,而不需要任何模型训练。我们的免训练算法的搜索阶段被称为轻量级Transformer搜索(LTS),可以直接在目标设备上运行,因为它不需要GPU。使用目标设备测量,LTS提取困惑与任何硬件性能成本的帕累托边界。我们在从ARM CPU到NVIDIA GPU的各种设备上评估LTS,以及两种流行的自回归Transformer主干:GPT-2和Transformer-XL。结果表明,16层GPT-2和Transformer-XL的复杂度可以实现高达1.5倍,2.5倍的运行时间和1.2倍,2.0倍的峰值内存利用率。当在零和一次性设置下进行评估时,LTS Pareto前沿模型在14个任务中的平均准确度高于350 M参数OPT,延迟最多降低1.6倍。LTS在商品笔记本电脑上运行时,在3小时内提取帕累托边界。我们有效地消除了搜索过程中数百个GPU小时的训练所产生的碳足迹,为自回归语言建模中的未来NAS方法提供了一个强大的简单基线。

英文摘要:

The Transformer architecture is ubiquitously used as the building block of large-scale autoregressive language models. However, finding architectures with the optimal trade-off between task performance (perplexity) and hardware constraints like peak memory utilization and latency is non-trivial. This is exacerbated by the proliferation of various hardware. We leverage the somewhat surprising empirical observation that the number of decoder parameters in autoregressive Transformers has a high rank correlation with task performance, irrespective of the architecture topology. This observation organically induces a simple Neural Architecture Search (NAS) algorithm that uses decoder parameters as a proxy for perplexity without need for any model training. The search phase of our training-free algorithm, dubbed Lightweight Transformer Search (LTS), can be run directly on target devices since it does not require GPUs. Using on-target-device measurements, LTS extracts the Pareto-frontier of perplexity versus any hardware performance cost. We evaluate LTS on diverse devices from ARM CPUs to NVIDIA GPUs and two popular autoregressive Transformer backbones: GPT-2 and Transformer-XL. Results show that the perplexity of 16-layer GPT-2 and Transformer-XL can be achieved with up to 1.5x, 2.5x faster runtime and 1.2x, 2.0x lower peak memory utilization. When evaluated in zero and one-shot settings, LTS Pareto-frontier models achieve higher average accuracy compared to the 350M parameter OPT across 14 tasks, with up to 1.6x lower latency. LTS extracts the Pareto-frontier in under 3 hours while running on a commodity laptop. We effectively remove the carbon footprint of hundreds of GPU hours of training during search, offering a strong simple baseline for future NAS methods in autoregressive language modeling.

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

↑