Skip to content
Mohammad Awadallah
All posts

Running AI models locally: why, and when it's worth it

When running language models on your own server beats cloud services, and how to choose the model and the hardware without overspending.

2 min readAlso in:العربيةFrançais

Every so often someone asks me: is it worth running an AI model on my own machine instead of using a cloud service? The honest answer: sometimes yes, and sometimes it’s a waste of time and money. Here is what I’ve learned from running local models in a real working environment.

When local is worth it

1. When the data is sensitive. Production data, customer records and operating formulas shouldn’t leave your network. A local model processes them without the data ever leaving the server.

2. When usage is heavy and repetitive. If your systems call the model thousands of times a day — classification, summarization, data extraction — cloud costs add up, while a server’s cost is fixed.

3. When you need a model specialized for your domain. You can fine-tune a small model on your own data, and for your specific tasks it can beat a larger general model.

4. When you can’t depend on an internet connection. In factories and remote sites, a dropped connection means a cloud-based system simply stops.

When it isn’t

  • When you need the best possible writing and complex reasoning. The large cloud models are still clearly ahead on long, precise tasks — especially in Arabic.
  • When usage is light. A few hundred requests a month doesn’t justify buying and maintaining a GPU.
  • When nobody will run the server. Updates, monitoring and failures are all on you.

The practical answer is usually hybrid: a local model for repetitive work and sensitive data, a cloud model for the tasks that need the highest quality.

Choosing the hardware

The factor that matters most is GPU memory (VRAM): the model has to fit in it entirely to run fast. A rough rule for 4-bit quantized models:

  • A 7–8 billion parameter model needs about 5–6 GB.
  • A 12–14 billion parameter model needs about 8–10 GB.
  • Add headroom for context length (the text the model reads per request); long contexts use extra memory.

So a 16 GB card runs most mid-size models comfortably, and 24 GB or more opens up larger models or running several at once.

Choosing the model

Don’t start with the biggest one. Start with the task:

  • Classification and data extraction: a small, fast model is usually enough, especially once tuned on your examples.
  • Coding: code-specialized models clearly beat general models of the same size.
  • Arabic conversation: test it yourself on questions from your own domain before trusting any comparison table.

The most important advice: build a small test set from your real tasks — twenty or thirty examples with the correct answer — and score every candidate model on it. That beats any opinion online.

The bottom line

Running locally isn’t a trend, and it isn’t a full replacement for the cloud. It’s the right tool when privacy, heavy usage and specialization come together. Start small, measure on your actual tasks, then decide.