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

通过动态执行方法加速AI推理

Accelerated AI Inference via Dynamic Execution Methods

Intel(英特尔)

Haim Barad, Jascha Achterberg, Tien Pei Chou, Jean Yu

AI总结:

本文提出动态执行技术,通过基于输入复杂度优化计算流程(如提前退出、推测采样、自适应步数),在不牺牲质量的前提下显著提升AI推理的延迟和吞吐量,并集成至Intel库与Huggingface Optimum以促进采用。

摘要:

本文聚焦于动态执行技术,该技术基于输入优化计算流程,旨在识别可以用更少资源解决的简单问题,类似于人类认知。讨论的技术包括深度网络的提前退出、语言模型的推测采样以及扩散模型的自适应步数。实验结果表明,这些动态方法能够在不牺牲质量的情况下显著改善延迟和吞吐量。当与基于模型的优化(如量化)结合时,动态执行提供了一种强大的多管齐下策略来优化AI推理。生成式AI需要大量计算资源。这一需求预计将增长,从数据中心到边缘的资源需求预计将继续高速增加。我们利用现有研究,并为某些生成优化提供了额外的创新。在LLM的情况下,我们提供了更高效的采样方法,这些方法依赖于数据的复杂性。在扩散模型生成的情况下,我们提供了一种新方法,该方法也利用输入提示的难度来预测最优的提前停止点。因此,动态执行方法之所以重要,是因为它们增加了性能优化的另一个维度。从竞争的角度来看,性能至关重要,但增加容量可以带来显著的功耗节省和成本节省。我们已将这些技术集成到多个Intel性能库和Huggingface Optimum中。这些集成将使它们更易于使用,并增加这些技术的采用率。

英文摘要:

In this paper, we focus on Dynamic Execution techniques that optimize the computation flow based on input. This aims to identify simpler problems that can be solved using fewer resources, similar to human cognition. The techniques discussed include early exit from deep networks, speculative sampling for language models, and adaptive steps for diffusion models. Experimental results demonstrate that these dynamic approaches can significantly improve latency and throughput without compromising quality. When combined with model-based optimizations, such as quantization, dynamic execution provides a powerful multi-pronged strategy to optimize AI inference. Generative AI requires a large amount of compute resources. This is expected to grow, and demand for resources in data centers through to the edge is expected to continue to increase at high rates. We take advantage of existing research and provide additional innovations for some generative optimizations. In the case of LLMs, we provide more efficient sampling methods that depend on the complexity of the data. In the case of diffusion model generation, we provide a new method that also leverages the difficulty of the input prompt to predict an optimal early stopping point. Therefore, dynamic execution methods are relevant because they add another dimension of performance optimizations. Performance is critical from a competitive point of view, but increasing capacity can result in significant power savings and cost savings. We have provided several integrations of these techniques into several Intel performance libraries and Huggingface Optimum. These integrations will make them easier to use and increase the adoption of these techniques.

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

↑