QSLM:一种性能和内存感知的量化框架,具有分层搜索策略用于脉冲驱动语言模型
QSLM: A Performance- and Memory-aware Quantization Framework with Tiered Search Strategy for Spike-driven Language Models
AI总结:
本文提出QSLM框架,通过分层搜索策略和多目标性能-内存权衡函数,实现对预训练脉冲驱动语言模型的自动量化压缩,减少内存占用并降低能耗,同时保持高性能。
摘要:
大型语言模型(LLMs)因其高性能(如准确性)和生成高质量响应的能力,已成为解决许多自然语言任务的重要AI模型。然而,其巨大的计算成本、内存占用和高处理功率/能耗使嵌入式部署变得具有挑战性。在众多小型LLMs中,最近的研究提出了脉冲驱动语言模型(SLMs),以显著减少LLMs的处理功率/能耗。然而,其内存占用仍然太大,无法满足低成本和资源受限嵌入式设备的需求。手动量化方法可能有效压缩SLM的内存占用,但需要大量设计时间和计算能力来为每个网络找到量化设置,因此这种方法在处理不同网络、性能要求和内存预算时并不可扩展。为弥合这一差距,我们提出了QSLM,一种新颖的框架,通过自动量化压缩预训练的SLMs,同时满足性能和内存约束。为此,QSLM首先确定给定网络架构的层次结构和量化下网络层的敏感性,然后采用分层量化策略(如全局-块-模块级量化),并利用多目标性能和内存权衡函数选择最终的量化设置。实验结果表明,我们的QSLM将内存占用减少了高达86.5%,将能耗降低了高达20%,在不同任务中(即在SST-2数据集上的情感分类任务中准确率高达84.4%,在WikiText-2数据集上的文本生成任务中困惑度为23.2)接近原始非量化模型,同时满足性能和内存约束。
英文摘要:
Large Language Models (LLMs) have been emerging as prominent AI models for solving many natural language tasks due to their high performance (e.g., accuracy) and capabilities in generating high-quality responses to the given inputs. However, their large computational cost, huge memory footprints, and high processing power/energy make it challenging for their embedded deployments. Amid several tinyLLMs, recent works have proposed spike-driven language models (SLMs) for significantly reducing the processing power/energy of LLMs. However, their memory footprints still remain too large for low-cost and resource-constrained embedded devices. Manual quantization approach may effectively compress SLM memory footprints, but it requires a huge design time and compute power to find the quantization setting for each network, hence making this approach not-scalable for handling different networks, performance requirements, and memory budgets. To bridge this gap, we propose QSLM, a novel framework that performs automated quantization for compressing pre-trained SLMs, while meeting the performance and memory constraints. To achieve this, QSLM first identifies the hierarchy of the given network architecture and the sensitivity of network layers under quantization, then employs a tiered quantization strategy (e.g., global-, block-, and module-level quantization) while leveraging a multi-objective performance-and-memory trade-off function to select the final quantization setting. Experimental results indicate that our QSLM reduces memory footprint by up to 86.5%, reduces power consumption by up to 20%, maintains high performance across different tasks (i.e., by up to 84.4% accuracy of sentiment classification on the SST-2 dataset and perplexity score of 23.2 for text generation on the WikiText-2 dataset) close to the original non-quantized model while meeting the performance and memory constraints.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。