## 2 Proposed Framework Structure  
Figure 1 illustrates the framework structure of our proposed Renewable-Aware Frequency Scaling approach.  
Service Users: Service users submit requests for DNN model training jobs necessary for AI-based applications such as image classification, video object detection, language translation, etc. These requests specify the type of DNN model, the accompanying raw dataset, a deadline \(d\), and the Deep Learning Job Requirement (as discussed in Section 4). Service users can range from individual clients to large-scale vendors. Failure to meet the predefined DJR within the stipulated deadline may result in a decline in the reputation of the associated DNN inference service.  
Energy Sources: The GPU clusters are powered by a combination of renewable (such as solar panels and wind farms) and traditional energy sources. The large vendors (e.g., Amazon, Apple, and Meta) that have their own data centers commonly also deploy their own renewable generators. In contrast to the electricity bill of energy purchase from the grid market, which is proportional to the amount of energy usage and variable according to the day-ahead and real-time market states, the construction and operation cost for renewable generators is always fixed regardless of amount of dynamic renewable generation. In that case, we do not need to explicitly consider the dynamic price for renewable generation. For simplicity, this paper assumes that the energy from renewable sources is free of cost (except the fixed construction and operation cost for generators) and only considers charges applying to the consumption of non-renewable energy. In contrast to traditional sources, power generation from renewable sources can fluctuate significantly due to weather conditions (e.g., solar radiation and wind speed). Accurate prediction under these fluctuations is crucial for improving energy cost efficiency. Therefore, we incorporate a gated recurrent unit-based renewable energy predictor module into our framework, with details provided in Section 3.  
Servers: In our framework, each server is equipped with a GPU device capable of frequency scaling for both the GPU core and memory. Additionally, each server incorporates a controller and monitor module to manage the frequency scaling of the GPU device. The frequency values for the GPU core and memory are dynamically adjusted, taking into account the architecture of the GPU device and the characteristics of the executed DL job.  
RA-FS Manager: The RA-FS manager proposed in our framework is responsible for allocating DL jobs to appropriate servers and scaling the frequency values of GPU devices. This manager comprises two sub-modules: a GRU-based renewable energy predictor, and a log-transformation-based problem optimizer. The GRU-based predictor learns the raw data on energy generation from renewable sources. Utilizing an advanced LSTM model, this predictor accurately forecasts future renewable energy generation and relays these predictions to the optimizer. The problem optimizer's objective is to find optimal frequency vectors and DL job allocation vectors based on profiling data from all connected servers. Through our defined optimization formulation (discussed in Section 5), the RA-FS manager can finely tune the training performance and energy consumption for assigned DL jobs.