Deriving an Natural Language Processing inference Cost Model with Greenhouse Gas Accounting : Towards a sustainable usage of Machine Learning

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: The interest in using State-Of-The-Art (SOTA) Pre-Trained Language Model (PLM) in product development is growing. The fact that developers can use PLM has changed the way to build reliable models, and it is the go-to method for many companies and organizations. Selecting the Natural Language Processing (NLP) model with the highest accuracy is the usual way of deciding which PLM to use. However, with growing concerns about negative climate changes, we need new ways of making decisions that consider the impact on our future needs. The best solution with the highest accuracy might not be the best choice when other parameters matter, such as sustainable development. This thesis investigates how to calculate an approximate total cost considering Operating Expenditure (OPEX) and CO2~emissions for a deployed NLP solution over a given period, specifically the inference phase. We try to predict the total cost with Floating Point Operation (FLOP) and test NLP models on a classification task. We further present the tools to make energy measurements and examine the metric FLOP to predict costs. Using a bottom-up approach, we investigate the components that affect the cost and measure the energy consumption for different deployed models. By constructing this cost model and testing it against real-life examples, essential information about a given NLP implementation and the relationship between monetary and environmental costs will be derived. The literature studies reveal that the derival of a cost model is a complex area, and the results confirm that it is not a straightforward procedure to approximate energy costs. Even if a cost model was not feasible to derive with the resources given, this thesis covers the area and shows why it is complex by examine FLOP.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)