SabaKore

Home / Articles / AI guides

How to Tell Which AI Workloads Need a GPU and Which Run Fine on a CPU

This separates the workloads that need a GPU from those a CPU can handle, then gives an order for deciding. It also covers why memory matters first when you run models yourself, and how to decide whether to use an outside service.

Ren, a junior infrastructure engineer

Ren

People say AI needs a GPU. Does that mean an ordinary VPS can't do anything?
Procura, a cloud AI robot who explains

Procura

Not at all. But "running AI" covers very different things, so it's important to think about them separately.

What practically requires a GPU

  • Training and fine-tuning models (adjusting an existing model by training it further, which means repeating a huge amount of computation)
  • Image generation (making a single image takes an enormous amount of computation)
  • Generating and analyzing video
  • Using a large model when you don't want to wait for responses

What is practical on a CPU alone

  • Calling an external AI API (the heavy computation happens on their side)
  • Classification, tagging and summarization with small models
  • Speech transcription (it takes time, but it's practical if you can wait)
  • Generating text embeddings (the preparation for search)
  • Batch processing that you run all at once, such as overnight
Ren, a junior infrastructure engineer

Ren

So if I'm only calling an API, an ordinary VPS is fine!
Procura, a cloud AI robot who explains

Procura

Right. In fact, most AI apps individuals build are like this. The VPS sticks to handling requests and managing data, and leaves the heavy part to the API. With this setup, even a small plan works.

The order for deciding

Whether you need a GPU depends on how long you can wait, before it depends on model size. If you need to return a response in a few seconds, you need a GPU, but if you process in bulk and look at results later, it doesn't matter if the CPU takes a few minutes. Even with the same model, the equipment you need changes depending on how you use it. First decide "who will wait, and how long", then move on to talking about hardware.

Procura, a cloud AI robot who explains

Procura

If you're unsure, think in this order. Going from the top, each setup costs less and takes less effort.
  • 1. Can an API do the job? (Least effort, and it runs fast)
  • 2. Is a small model on a CPU enough? (You don't have to send data outside)
  • 3. If the work can wait, can it just run slowly? (Can it be an overnight batch?)
  • 4. Only if it's still not enough, consider a GPU environment
Procura, a cloud AI robot who explains

Procura

If you start from step 4, costs jump. Try step 1 first, and move up only when you truly need to. That's the way to avoid failure.

Why you need memory when running models yourself

Procura, a cloud AI robot who explains

Procura

When you run a model on your own server, the whole model has to be loaded into memory. So before CPU speed, whether the memory is enough is what decides whether it runs at all.
  • If memory is short, it won't even start
  • Using a model converted to a smaller form (quantization) lowers the capacity needed
  • Speed depends on CPU performance and core count, but whether it fits comes first
  • Usage rises temporarily during processing. Don't run it right at the limit

Use an outside service or run it yourself

You also need to be careful how you compare costs. An API is pay-as-you-go, so it looks cheap while you're experimenting. A server, on the other hand, costs money every month even when it isn't running. The break-even point depends on usage, but once you add the effort of managing it yourself, it lands higher than you'd expect. If cost is your only reason to run it yourself, it's worth recalculating.

Procura, a cloud AI robot who explains

Procura

Besides cost and effort, the data you handle also changes the decision. If you handle information that can't leave your company, you have a clear reason to run it yourself.
  • API: little effort and fast. But your data goes to the other party. Check how it's handled in the terms
  • Self-hosted: your data doesn't leave. But you're limited by performance and memory
  • Both: you can split it, using the API for non-confidential processing and your own server for confidential processing
Ren, a junior infrastructure engineer

Ren

Try the API first. If I go self-hosted, look at memory before speed.

This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.