Site icon Use AI the right way

Never use local LLM again, do this instead

Image of an user wondering about local LLM

Learn the limits of Local LLM and never use them again unless you have no choice and find out you can do it then.

Introduction

In this blog post we are going to talk about local LLM and why it is nearly never the solution and you should not use it. This may sound hard but this is the point of view of someone who used most of those solution and push LLM powered application on production.

More precisely, you will learn in this post:

What is local LLM

A local Language Learning Model (LLM) refers to an LLM model that operates on a user’s own hardware or local infrastructure, rather than being hosted on cloud-based servers. This means it runs on either your computer, server or even your own datacenter (if you have deep pockets).

There are multiple framework to have local LLM (check GPT4All or Llama.cpp)and it is working fine. They are wonderful framework that allows to run local LLM, use them as a chat and do not even need GPU.

Pros

Cons

Cloud hosted self deployed LLM

This is a very long naming for just saying you will use an LLM that is deployed on the Cloud (Amazon AWS, Google GCP, Microsoft Azure) and not on your local machine.

Pros

Cons

LLM Services

This is actually the well know LLM service (like OpenAI) that you can use in your everyday usage.

Pros

Cons

Privacy and GDPR

Privacy is an important part of the each use case, whether it is a small web app or a full fledged 1M+ users. In either case, if you have users, you need to be concerned about the privacy of their data.

In the same topic, GDPR (General Data Protection Regulation) is a set of European Union regulations designed to protect the privacy and personal data of individuals within the EU and the European Economic Area.

Basically, what is required is to:

So what is the link with LLM ? Well, then, depending on the service you are using, you could be giving all the data you are collecting to the service you are using. That is why you need to be careful about this.

And good thing, the biggest LLM providers (OpenAI, AWS, Azure, GCP, MistralAI, Anthropic) already write in their service offer that they will not use your data for their own scheme.
What’s more, if you are based in Europe and if you are using a big cloud provider (AWS, GCP, Azure) or MistralAI, you will be guaranteed that the LLM model that you will use as well as the data will stay in a data center in Europe.

Cost analysis of each strategy

StrategyDevelopment costRunning at scale costsDifficulty to prototype
Local LLM0$ (only the price of your laptop)Not possibleVery difficult, you need to redo the application
Cloud hosted self deploymentAt least 1$ per hour (when the model is deployed)Pay for the size of the model deployedDifficult because you need to literally create a working LLM service for yourself
LLM servicesPay per uses ( 0,1$ per million tokens)Pay per uses BUT this can become very expensiveJust concentrate on the actual application developement

As you can see, using an LLM service gives the best trade-off between running cost, development and difficulty to prototype.

The only way the Cloud hosted self deployment makes sens is if you have a very big bill on your LLM service and you have already implemented all the cost saving strategies (check my post on how to do cost savings with LLM for ideas on what to do). Then it will be worth it to develop your own LLM service (at this point, you should have plenty of money for that).

The goal, when prototyping, is to come to a POC (Proof Of Concept) or MVP (Minimal Viable Product) as soon as possible and you will have plenty to do with just the development of your application. No need to add the creation of an LLM service on top of that.

Conclusion

Let me conclude this blog post in the following way:

Afterward

I hope this post helped you and taught you many things. I will update this post with more nuggets from time to time. Don’t forget to check my other post as I write a lot of cool posts on practical stuff in AI.

Cheers !

Exit mobile version