SabaKore

Home / Articles / AI guides

Can You Fine-Tune a Model on Your Own VPS?

What fine-tuning, which further trains a model, requires; how far you can realistically go on a VPS; and how to recognize cases where another method will do.

Ren, a junior infrastructure engineer

Ren

I want to teach a model my company's way of speaking by fine-tuning it. Can I do that on a VPS?
Procura, a cloud AI robot who explains

Procura

It's not impossible, but there's something you should know first. Fine-tuning needs far more computation and memory than just running a model. Think of it as work that practically assumes a GPU.

Why is it so heavy?

When you normally use a model, it just uses the numbers it already has to produce an answer. Fine-tuning is the work of adjusting those numbers themselves bit by bit, calculating while it reads in a large amount of data over and over. The amount of computation is very different between just reading and reading while rewriting.

Ren, a junior infrastructure engineer

Ren

So it's impossible on a VPS...?
Procura, a cloud AI robot who explains

Procura

You don't have to give up on everything. In fact, you can often reach your goal without fine-tuning.

Alternatives to try first

  • Improve your instructions (the prompt). Just showing a few examples of the wording you want often improves things
  • Use RAG (a mechanism that searches documents before answering). Instead of making the model memorize, you have it refer to the material
  • For rules over a small scope, you can also put your own code before and after the AI to tidy up the output
Procura, a cloud AI robot who explains

Procura

Only after you find these three aren't enough do you consider fine-tuning. If you follow that order, in most cases you'll end up with a method that works entirely on a VPS.

If you really need it

If that's still not enough, a realistic split is to set up a separate environment where a GPU is available and do only the training there. If you then bring the trained model back and run it on the VPS you normally use, you don't have to keep renting a GPU all the time. Training is temporary, and operation happens on your usual VPS.

  • Do only the training in the GPU environment, and cancel the environment when it's done
  • Bring the finished model back and run it on your usual VPS
  • Check beforehand that the training data doesn't include information that must not leave your control
Ren, a junior infrastructure engineer

Ren

How much training data is enough?
Procura, a cloud AI robot who explains

Procura

It varies a lot depending on the goal, so I can't give a definite answer. But quality is often said to matter more than quantity, and sometimes a small amount of data that fits the goal works better than a large amount of miscellaneous data. Starting with a small amount and then increasing it is the safe approach.

Managing the data you trained on

If you do fine-tune, don't forget to manage the training data itself. If you don't record which data produced which model, you won't be able to trace later why it answers the way it does. Also, if the training data contains confidential or personal information, traces of it may remain in the model, so take particular care with models you plan to distribute externally.

  • Record which training data produced which model in a form that shows the correspondence
  • Before training, check whether the information is okay to include in the training data
  • If you plan to hand the finished model to outside parties, be especially careful about the risk of confidential information getting mixed in
Ren, a junior infrastructure engineer

Ren

So you don't have to rent a GPU all the time; you can rent one temporarily just for training.

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