Artificial Intelligence

The cost of using an AI language model: open source vs closed source cloud providers

Bas Alderding

Artificial Intelligence (AI) and specifically Large Language Models (LLMs) have grown tremendously in popularity over the two years. More and more companies and developers want to use this powerful technology for their projects.

What are AI language models?

Before we turn to the costs, it is good to take a moment to consider exactly what AI language models are. An LLM is a type of AI model trained on huge amounts of text. The model learns to recognise patterns and relationships in language and can generate new, coherent texts on its own based on these patterns.

Well-known examples of LLMs are OpenAI's GPT-4 and Google's Gemini. These models are capable of delivering impressive results in text generation, translation, summarisation and more.


Open source vs. closed source

If you want to use an AI LLM for your project, you roughly have two options: open source or closed source cloud providers.

Open source LLMs are models whose source code is publicly available. Anyone can download, train and use these models. Examples include Grok from X and LLAMA from Meta. The advantage of open source is that you have full control over the model and are not dependent on an external party. Disadvantages are that you are responsible for the infrastructure yourself and that performance sometimes lags somewhat behind closed-source alternatives.

Closed source LLMs are offered by cloud providers such as OpenAI, Google, Microsoft, Anthropic and Amazon. You can call these models via an API and pay per use. The big advantage is convenience: you do not have to set up your own infrastructure and can start working immediately. Also, the models are often of high quality. A disadvantage is that you are dependent on the cloud provider and have less control.



Cost of open source LLMs

The cost of using an open source LLM mainly consists of the computing power needed to train and run the model. You need a powerful GPU and a lot of storage space for the datasets.

The exact cost depends on the size of the model and how intensively you use it. For a medium-sized model, quickly count on several thousand euros for the hardware. Added to this are the costs for electricity and maintenance.


Cost closed source LLMs

With closed-source cloud providers, you pay per API call. Prices vary by provider and model. As an indication, at OpenAI you pay $0.03 per 1,000 tokens for the popular GPT-4 model. One token roughly corresponds to 4 characters of text.

Suppose you have an application that generates 1 million words a month. That's about 250,000 tokens. The cost then comes out to about $7.50 per month. Note that this is an example and the actual cost depends a lot on your specific use case.

Besides API costs, with some providers you also pay for storage of your data and training of custom models. Here the costs can be substantial, up to thousands of euros per month.


Conclusion

The cost of using an AI language model varies widely. With open source, you pay once for the required hardware, with closed source per use via an API. What suits your project best depends on your specific needs and requirements.

In general, you can say that open source is interesting if you want full control and are willing to invest in infrastructure. Closed source is a good choice if you want quick results and convenience is more important than control.

Whichever option you choose, AI language models are a fascinating technology with a lot of potential. Developments are rapid and the possibilities seem endless. It is definitely worth exploring what AI can do for your project!

SevenLab is a reliable party with great customer focus. They actively think with you, are enormously helpful and flexible.

Satish Bahwanidin

Project leader VO-raad

Klaar om je project met ons te bespreken?

Maak kennis met het SevenLab team en de oprichters