Impact of ML optimization tactics on greener pre-trained ML models

Machine Learning (ML)-based solutions have currently surpassed human performance in tasks like image classification, visual reasoning, and English understanding. However, this advancement comes at the cost of increasing energy consumption. Traditionally, ML projects have prioritized accuracy over en...

Descripción completa

Detalles Bibliográficos
Autores: González Álvarez, Alexandra|||0009-0003-7634-0343, Castaño Fernández, Joel, Franch Gutiérrez, Javier|||0000-0001-9733-8830, Martínez Fernández, Silverio Juan|||0000-0001-9928-133X
Tipo de recurso: artículo
Fecha de publicación:2025
País:España
Institución:Universitat Politècnica de Catalunya (UPC)
Repositorio:UPCommons. Portal del coneixement obert de la UPC
Idioma:inglés
OAI Identifier:oai:upcommons.upc.edu:2117/429133
Acceso en línea:https://hdl.handle.net/2117/429133
https://dx.doi.org/10.1007/s00607-025-01437-8
Access Level:acceso abierto
Palabra clave:Green software engineering
Green AI
Green computing
Model optimization
ML models inference
Image classification
Àrees temàtiques de la UPC::Informàtica::Enginyeria del software
Àrees temàtiques de la UPC::Informàtica::Intel·ligència artificial::Aprenentatge automàtic
Descripción
Sumario:Machine Learning (ML)-based solutions have currently surpassed human performance in tasks like image classification, visual reasoning, and English understanding. However, this advancement comes at the cost of increasing energy consumption. Traditionally, ML projects have prioritized accuracy over energy, creating a gap in energy consumption during model inference. This study aims to (i) understand image classification datasets and pre-trained models, which is essential for the subsequent analyses, (ii) improve inference efficiency by comparing optimized and non-optimized models, and (iii) assess the economic impact of the optimizations. We conduct a controlled experiment to evaluate the impact of various PyTorch optimization techniques (dynamic quantization, , local pruning, and global pruning) on 42 Hugging Face models for image classification. The metrics examined include GPU utilization, power and energy consumption, accuracy, time, computational complexity, and economic costs. The models are repeatedly evaluated to quantify the effects of these optimization techniques. Dynamic quantization demonstrates inference time and energy consumption reductions, making it suitable for large-scale systems. balances accuracy and energy. Local pruning shows no positive impact on accuracy, and global pruning’s longer optimization times impact economic costs. This study highlights the role of software engineering tactics in achieving greener ML models, offering guidelines for practitioners to make informed decisions on optimization methods that align with sustainability goals.