Energy-aware serving of gradient-boosted tree models for small online retailers

Abstract

Small online retailers increasingly rely on machine learning models for fraud screening, product ranking and demand forecasting, but most of the energy a deployed model uses is spent on inference rather than training. We measure the latency and energy per prediction of XGBoost, LightGBM and CatBoost models on commodity cloud servers, using hardware energy counters where available. Choosing the batch size and thread count to match the request pattern reduced energy per prediction by a factor of four at the same accuracy, which improves the energy efficiency of the data centres these shops rent and lowers their greenhouse gas emissions.

We release the benchmarking code as open-source software so that researchers and small and medium-sized enterprises in developing countries can repeat the measurements without paid tools. The method also supports sustainability reporting: companies can disclose the energy and carbon footprint of their AI features with measured rather than assumed figures.

Limitations: energy counters cover the CPU package only, and results on shared cloud machines vary between runs.

References

United Nations (2015). Transforming our world: the 2030 Agenda for Sustainable Development. Ending poverty and hunger, ensuring access to clean water and sanitation for all.
Smith, J. (2021). Renewable energy share and the global energy mix. Energy Policy.
