How can businesses minimise the cost of building and deploying AI model code
Costs of AI/ML: How expensive is it to develop and maintain AI solutions?
Recent trends in the economy, and the government’s fiscal and monetary policy decisions have had an immense impact on the technology and AI space. For instance, a string of tech layoffs made headlines in the past few months, signalling a potential contraction in the tech industry. Further, Chancellor Jeremy Hunt’s recent statement lays down a rather bleak outlook for the UK economy. The AI industry is highly likely to feel the impact of several rapidly shifting economic variables in the oncoming months.
In recent years AI has permeated all aspects of businesses, from automation to analysis. The contribution of AI to organisations has become so significant that companies may feel pressured to adopt AI to keep up with the latest trends.
While AI can bring massive boosts to business productivity, excessive costs, now reverberated by economic conditions can be a bottleneck to AI adoption. While there is no easy price estimation, the costs of developing, testing, and deploying a basic AI system can reach up to $50,000. These costs can be attributed to hardware, software, and data.
In this climate, investing in a costly AI solution may have to be thought over twice. For those who have already implemented AI solutions, the costs of maintaining and updating these systems can be a significant pain point. This is particularly the case for those who may be currently facing rising costs in cloud-based deployment or energy consumption.
The unforeseen: Bad code costs more than you think
Driven by the need to experiment more with data and models, those in the data science pipeline may spend less time refining code to achieve optimal code quality. Bad code adds to the costs of maintaining AI, and its burden often goes unnoticed.
Bad code wastes developer time, takes up resources, and, ultimately, reduces business profitability. There are many estimations of losses related to bad code. For instance, according to Stripe calculations, bad code equates to nearly $85 billion worldwide in opportunity costs lost annually. Even though the value of investing in maintaining code quality is often highlighted, the problem of sub-par code seems to exacerbate, with no definitive solutions.
Mitigating the costs of AI
AI application performance rests on three pillars: model, code, and data. Making AI solutions financially sustainable is inevitably tied to optimising each one of these pillars. This article focuses on two of these pillars:
Pillar 1: Optimising AI at model-level
ML models are often at the centre of AI applications. Optimising the process of producing ML-based predictions is one way to reduce the costs of AI.
ML models can be implemented using different frameworks/libraries. Some of these implementations can be more cost-efficient than others.
However, converting ML models to different formats is not an easy task. It requires developers with knowledge of the frameworks, who will have to conduct a manual conversion to the desired implementation.
A solution to this is using intermediate representations (IR) - a type of middleman that will conduct the conversion. IRs extract the original format and structure of the model and convert it into the desired format. This gives developers the space and time to focus on more important aspects of model deployment while allowing companies to make significant cost savings.
Pillar 2: Optimising AI at code-level
Another unforeseen cost of deploying AI and ML comes from inefficient code. Inefficient code is harder to execute, making resource costs soar. Code optimisation is an often under-utilised solution to achieving high-quality and efficient code bases. Code optimisation in itself can be difficult, and as a result, it can easily be sidestepped.
A solution to navigating the difficulties of code optimisation is incorporating automated code optimisation functionalities into the conventional machine learning pipeline. A functionality/tool of this nature can automatically pick up inefficient code and optimise it at a fraction of the time it takes for manual optimisation.
Recent research by TurinTech found that code optimisation could improve the execution time of specific ML codebases by up to around 20%. When the optimised code was evaluated in an Azure-based cloud environment, cost savings of around 30% per hour were observed.
Wrapping up
Based on recent economic projections, it seems the AI industry is likely to face difficult times ahead. The only way to weather the storm is to insulate your technologies to ensure that your AI pipelines and applications are performing at the highest level of efficiency. Even the slightest drawback in productivity or accuracy can set you far apart from competitors, ultimately leading to loss of profits and clients.
With a carefully developed strategy that successfully utilises cutting-edge optimisation technologies, you will be able to progress with your AI adoption, implementation, and maintenance plans at a steady pace.
Stripe partnered with Harris Poll to survey developers, technical leaders and C-level executives about their organizations’ business challenges, software development practices, and future investments to determine the role that developer productivity plays in their success—and the growth of worldwide GDP overall. More than 1,000 developers and more than 1,000 C-level executives in the United States, U.K., France, Germany, and Singapore participated in the study.