arXiv:2602.17697cs.LGcs.SE2026-02被引 1

用可变性建模优化大模型推理配置,提升能效与效率

Pimp My LLM: Leveraging Variability Modeling to Tune Inference Hyperparameters

  • 将大模型推理配置视为可变系统,构建特征化建模方法
  • 仅需少量测量即可预测能耗、延迟与准确率的权衡关系
  • 适合关注大模型能效优化的研究者与工程团队

大语言模型在众多任务中广泛应用,但其巨大的计算需求引发对训练与推理阶段能源效率和可持续性的担忧。推理阶段占据总计算量的主导地位,因此优化至关重要。尽管已有研究探索优化技术并分析配置选择对能耗的影响,但由于推理服务器配置空间庞大,组合爆炸使得全面实验评估不可行。本文提出新视角:将大模型视为可配置系统,应用可变性管理技术系统分析推理时的配置选择。我们在Hugging Face Transformers库上实现该方法,使用基于特征的可变性模型表示生成超参数及其约束,采样代表性配置,测量其能耗、延迟、准确率,并从中学习预测模型。结果表明,可变性建模有效管理了大模型推理配置的复杂性,支持系统化分析超参数影响与交互作用,揭示关键权衡,并能从有限测量中预测推理行为。该工作开创了软件工程与机器学习融合的新方向,推动大模型高效可持续配置。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are being increasingly used across a wide range of tasks. However, their substantial computational demands raise concerns about the energy efficiency and sustainability of both training and inference. Inference, in particular, dominates total compute usage, making its optimization crucial. Recent research has explored optimization techniques and analyzed how configuration choices influence energy consumption. Yet, the vast configuration space of inference servers makes exhaustive empirical evaluation infeasible due to combinatorial explosion. In this paper, we introduce a new perspective on this problem by treating LLMs as configurable systems and applying variability management techniques to systematically analyze inference-time configuration choices. We evaluate our approach on the Hugging Face Transformers library by representing generation hyperparameters and their constraints using a feature-based variability model, sampling representative configurations, measuring their energy consumption, latency, accuracy, and learning predictive models from the collected data. Our results show that variability modeling effectively manages the complexity of LLM inference configurations. It enables systematic analysis of hyperparameters effects and interactions, reveals trade-offs, and supports prediction of inference behavior from a limited number of measurements. Overall, this work opens a new research direction that bridges software engineering and machine learning by leveraging variability modeling for the efficient and sustainable configuration of LLMs.

大模型优化推理效率能效分析可变性建模

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