机器学习优化策略对更环保预训练模型的影响
Impact of ML Optimization Tactics on Greener Pre-Trained ML Models
AI总结:
本研究通过受控实验评估PyTorch优化策略对42个图像分类模型的影响,发现动态量化显著降低推理时间和能耗,torch.compile平衡准确性与能源,为可持续ML实践提供指导。
摘要:
背景:鉴于当今技术的快速发展,其在图像分类、视觉推理和英语理解等任务上已超越人类表现,评估机器学习(ML)对能源消耗的影响至关重要。传统上,ML项目优先考虑准确性而非能源,导致模型推理过程中能源消耗存在差距。目标:本研究旨在(i)分析图像分类数据集和预训练模型,(ii)通过比较优化和未优化模型来提高推理效率,以及(iii)评估优化的经济影响。方法:我们进行了一项受控实验,以评估各种PyTorch优化技术(动态量化、torch.compile、局部剪枝和全局剪枝)对42个用于图像分类的Hugging Face模型的影响。考察的指标包括GPU利用率、功率和能源消耗、准确性、时间、计算复杂性和经济成本。模型被反复评估以量化这些软件工程策略的效果。结果:动态量化在推理时间和能源消耗方面表现出显著减少,使其非常适合大规模系统。此外,torch.compile在准确性和能源之间取得了平衡。相比之下,局部剪枝对性能没有积极影响,而全局剪枝较长的优化时间显著影响成本。结论:本研究强调了软件工程策略在实现更环保ML模型中的作用,为从业者提供了指导,使其能够就符合可持续性目标的优化方法做出明智决策。
英文摘要:
Background: Given the fast-paced nature of today's technology, which has surpassed human performance in tasks like image classification, visual reasoning, and English understanding, assessing the impact of Machine Learning (ML) on energy consumption is crucial. Traditionally, ML projects have prioritized accuracy over energy, creating a gap in energy consumption during model inference. Aims: This study aims to (i) analyze image classification datasets and pre-trained models, (ii) improve inference efficiency by comparing optimized and non-optimized models, and (iii) assess the economic impact of the optimizations. Method: We conduct a controlled experiment to evaluate the impact of various PyTorch optimization techniques (dynamic quantization, torch.compile, local pruning, and global pruning) to 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 software engineering tactics. Results: Dynamic quantization demonstrates significant reductions in inference time and energy consumption, making it highly suitable for large-scale systems. Additionally, torch.compile balances accuracy and energy. In contrast, local pruning shows no positive impact on performance, and global pruning's longer optimization times significantly impact costs. Conclusions: 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。