The discussion around AI-Engineering, that is, Software Engineering (SE) for AI-enabled Systems, cannot ignore a crucial class of software systems that are increasingly becoming AI-enhanced: Those used to enable or support the SE process, such as Computer-Aided SE (CASE) tools and Integrated Development Environments (IDEs). In this paper, we study the energy efficiency of these systems. As AI becomes seamlessly available in these tools and, in many cases, is active by default, we are entering a new era with significant implications for energy consumption patterns throughout the Software Development Lifecycle (SDLC). We focus on advanced Machine Learning (ML) capabilities provided by Large Language Models (LLMs). Our proposed approach combines Retrieval-Augmented Generation (RAG) with Prompt Engineering Techniques (PETs) to enhance both the quality and energy efficiency of LLM-based code generation. We present a comprehensive framework that measures real-time energy consumption and inference time across diverse model architectures ranging from 125M to 7B parameters, including GPT-2, CodeLlama, Qwen 2.5, and DeepSeek Coder. These LLMs, chosen for practical reasons, are sufficient to validate the core ideas and provide a proof of concept for more in-depth future analysis.
翻译:围绕人工智能工程(即面向人工智能系统的软件工程)的讨论,不能忽视一类日益增强人工智能能力的软件系统:那些用于支持或赋能软件工程过程的系统,例如计算机辅助软件工程工具和集成开发环境。本文研究了此类系统的能效问题。随着人工智能在这些工具中无缝集成,并且在多数情况下默认处于激活状态,我们正进入一个对软件开发生命周期中能耗模式具有重大影响的新时代。我们重点关注由大语言模型提供的高级机器学习能力。我们提出的方法将检索增强生成与提示工程技术相结合,以提升基于大语言模型的代码生成的质量与能效。我们提出了一个综合框架,用于测量从1.25亿到70亿参数范围内多种模型架构的实时能耗与推理时间,涵盖GPT-2、CodeLlama、Qwen 2.5和DeepSeek Coder等模型。这些大语言模型的选择基于实际考量,足以验证核心思想,并为未来更深入的分析提供概念验证。