高级检索

    大语言模型推理优化方法综述

    Survey on Inference Optimization for Large Language Models

    • 摘要: 大语言模型凭借卓越的逻辑推理和长上下文理解能力吸引了广泛关注。然而,随着模型参数规模的增长和应用场景的日益复杂,大语言模型推理系统面临着严峻的资源与效率挑战。一方面,庞大的模型参数规模与自回归生成特性要求推理系统优化计算、显存和通信资源的分配,提高硬件资源利用率。另一方面,在线服务场景引入了动态变化的并发请求与计算负载,难以兼顾高吞吐与低延迟的服务质量要求。本文系统性地综述了大模型推理优化的研究进展,从模型层、算法层和服务层三个维度分析了现有技术的设计原理与效果。模型层通过量化、稀疏化以及模型架构优化,在保持模型精度的前提下显著降低了资源开销。算法层聚焦于计算逻辑的重构,通过优化数据流转与算子执行模式,打破显存带宽与串行生成的性能瓶颈。服务层则聚焦于系统级资源编排,通过动态请求调度、架构解耦与异构协同,在特定负载条件下实现了吞吐量与延迟的帕累托优化。此外,本文梳理了各项技术的局限性与适用边界,分析了不同优化路径之间的协同与制约关系,最后展望了大模型推理优化的未来研究方向。

       

      Abstract: Large Language Models (LLMs) have attracted significant attention for their exceptional reasoning and long-context capabilities. However, with the growth in model parameter scales and increasingly complex application scenarios, LLM inference faces severe challenges regarding resource utilization and efficiency. On one hand, the massive parameter scales and the nature of autoregressive generation necessitate the optimization of computation, memory, and communication resource allocation to maximize hardware resource utilization. On the other hand, real-world online serving scenarios introduce highly dynamic concurrent requests and variable computational loads, making it difficult to balance the dual service quality requirements of high throughput and low latency. This paper provides a systematic survey of research progress in LLM inference optimization, analyzing the design principles and efficacy of existing techniques across three dimensions: Model, Algorithm, and Service. The Model layer significantly reduces resource overhead while maintaining model precision through quantization, sparsification, and model architecture optimization. The Algorithm layer focuses on reconstructing computational logic, breaking performance bottlenecks associated with memory bandwidth and serial generation by optimizing data flow and operator execution patterns. The Service layer concentrates on system-level resource orchestration, achieving Pareto-optimal trade-offs between throughput and latency under specific workload conditions through dynamic request scheduling, architectural disaggregation, and heterogeneous collaboration. Furthermore, we examine the limitations and applicability boundaries of existing techniques, analyze the synergies and conflicts among different optimization paths, and finally discuss future research directions for LLM inference optimization.

       

    /

    返回文章
    返回