arXiv:2508.00904cs.PFcs.AI2025-08被引 14

用硬件无关模型预测大模型推理性能,省去实测开销

Forecasting LLM Inference Performance via Hardware-Agnostic Analytical Modeling

  • 构建模块化解析框架,仅凭硬件规格估算性能
  • 支持量化、缓存压缩等优化对首令牌耗时等指标影响预测
  • 适合跨平台部署大模型的开发者快速评估性能

大语言模型(LLMs)正越来越多地部署在具有CPU、NPU和集成GPU的个人设备上。然而,由于计算和内存需求动态变化,预测这类异构设备上的推理性能仍具挑战性。现有方法依赖于GPU基准测试或基于机器学习的延迟预测器,通常具有硬件特异性且泛化能力差。为此,我们提出LIFE——一种轻量级、模块化的解析框架,由可配置的操作符解析模型组成,能以硬件和数据集无关的方式刻画LLM推理工作负载。LIFE可分析量化、KV缓存压缩、LoRA适配器、分块预填充、不同注意力机制及算子融合等软件与模型优化对时间到首个令牌(TTFT)、每输出令牌时间(TPOT)和每秒生成令牌数(TPS)等指标的影响。该框架仅需硬件规格(如TOPS和内存带宽)即可实现性能预测,无需大量数据集基准测试。我们在AMD Ryzen CPU、NPU、iGPU和NVIDIA V100 GPU上对Llama2-7B变体进行推理验证,证明了LIFE在系统效率视角下预测跨平台LLM性能的有效性,助力高效部署。

原文摘要 · Abstract (English)

Large language models (LLMs) have been increasingly deployed as local agents on personal devices with CPUs, NPUs and integrated GPUs. However, forecasting inference performance on devices with such heterogeneity remains challenging due to the dynamic compute and memory demands. Existing approaches rely on GPU benchmarking or machine learning-based latency predictors, which are often hardware-specific and lack generalizability. To this end, we introduce LIFE, a lightweight and modular analytical framework that is comprised of modular analytical model of operators, configurable to characterize LLM inference workloads in a hardware and dataset-agnostic manner. LIFE characterizes the influence of software and model optimizations, such as quantization, KV cache compression, LoRA adapters, chunked prefill, different attentions, and operator fusion, on performance metrics such as time-to-first-token (TTFT), time-per-output-token (TPOT) and tokens-per-second (TPS). LIFE enables performance forecasting using only hardware specifications, such as TOPS and memory bandwidth, without requiring extensive dataset benchmarking. We validate LIFE's forecasting with inference on AMD Ryzen CPUs, NPUs, iGPUs and NVIDIA V100 GPUs, with Llama2-7B variants, demonstrating the utility of LIFE in forecasting LLM performance through lens of system efficiency to enable efficient LLM deployment across different hardware platforms.

大模型推理性能预测跨平台部署

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