Train and run your own AI

Where do you start if you want to run and train AI on your own computer?

Published · By Robert Scales, with AI tools · 8 min read

Short answer

Start by running a ready-made open model with a free tool such as Ollama or llama.cpp, because that shows you what your memory allows before you spend anything. Then train something small you can watch, test it honestly, and only then adapt an open model to your own task. Memory decides almost everything, and training needs several times the memory of running.

Running an AI model on your own computer and training one are two different jobs. Running (also called inference) means loading a model someone else trained and asking it questions. Training means changing a model's numbers, its parameters, until it does a job better. Running needs room for the model. Training needs that room several times over. This page puts the guide's articles on both in a sensible order, and answers the question most people ask first: what does my machine allow?

Step 1: run a model before you buy anything

The quickest way to learn what your computer can do is to run a ready-made open model on it. Free tools do the hard part:

Worked example: a 27-billion-parameter model in the Q4_K_M format, which llama.cpp measures at about 4.9 bits per weight, is 27 × 4.9 ÷ 8 ≈ 16.5 GB of weights, before the conversation and the system take their share. That is why the strongest open coding models that fit at home are roughly 18 GB downloads and call for a graphics card with 24 GB or a computer with plenty of unified memory.

Once a model runs, How do you turn a local model into a server your apps can use? shows how other programs can talk to it, and What AI can really run on your phone in 2026? covers the smallest devices.

Step 2: understand why training needs so much more memory

Training keeps more in memory than running does: a gradient for every parameter, the optimizer's extra copies, and the intermediate results needed to work backwards through the network. Why can a model fit on your machine and still be impossible to train? measured it on a 135-million-parameter model: full training took 5.1 times the memory of running it, and a LoRA adapter (a small set of extra numbers trained on top of a frozen model) cut the peak by two-thirds. That ratio is the reason most people adapt models with LoRA or QLoRA rather than training every parameter.

So what can 24 GB do?

The table summarizes what the guide's articles report. Memory sizes refer to what the graphics processor can really use; on shared-memory computers, that is less than the amount installed. The training minimums come from the documentation of Unsloth, an open fine-tuning library, and grow with longer examples.

MemoryRun comfortablyTrain or adapt
8 to 16 GBSmall models of about 1 to 8 billion parametersMost of the training series below; QLoRA adapters on models up to about 8 billion parameters (6 GB minimum for 8B)
24 to 32 GBMid-size models, including today's best 27- to 30-billion-parameter coding models at 4 bits16-bit LoRA up to about 8 billion parameters (22 GB minimum); QLoRA up to about 27 billion (22 GB minimum)
64 to 128 GBModels above 100 billion parameters at 128 GB16-bit LoRA up to about 27 billion parameters (64 GB minimum); full training of large models still means renting GPUs

Sources for the rows: What hardware do you need to run AI models at home?, What hardware should you buy to run AI at home in late 2026? and How do you fine-tune a small open model yourself? Check your own case with the memory rule above before buying anything: the speed of the memory and the software you plan to use matter too, as Mac or PC with a graphics card explains.

Try it: Install Ollama, download one small model, ask it three questions you know the answers to, and note how much memory your system monitor shows while it answers. That number, compared with your total memory, tells you how much room is left for bigger models.

Step 3: the training series, in order

These fourteen articles build on each other. Each one was run on a real machine and reports what was measured, including what failed. Most run on an ordinary laptop.

  1. How do you train your first model on any laptop, with no GPU?
  2. What are parameters, loss and learning?
  3. How do you build a dataset that teaches the job, legally?
  4. How do you know your model actually improved?
  5. How do you go from a classifier to finding objects in images?
  6. What happens when a tiny language model learns from random weights?
  7. Why can a model fit on your machine and still be impossible to train?
  8. How do you search your own documents with embeddings, and prove that it works?
  9. When should you adapt a small language model, and when should you not?
  10. How do you teach a model a writing style without changing the facts?
  11. How do you teach a model to choose tools and make decisions?
  12. How do you train an image style and speech recognition on your own machine?
  13. How do you diagnose a failed training run before buying a bigger machine?
  14. How do you turn a model checkpoint into a working app?

The series has one lesson that runs through every article: a score is only worth something if the test was honest. Article 4 shows a common data mistake reporting 84% accuracy on pure random numbers, where the honest answer was 51%.

Step 4: adapting open models and building your own

When the series is done, these articles cover adapting real open models and, for the curious, building one from scratch:

Step 5: hardware, only when you know what you need

Buy for memory first, and only after you have run models on what you already own:

What can a machine with 24 GB of memory actually run and train?

It runs mid-size open models well, including the strongest coding models that fit at home, in their 4-bit versions of roughly 18 GB. It can adapt open models with QLoRA up to about 27 billion parameters, or with 16-bit LoRA up to about 8 billion, which is how most people teach a model a format, a style or a set of tools. It cannot fully train anything large: full training needs several times the memory of running, so serious pretraining means renting GPUs by the hour, and the cost article shows what that adds up to. Before deciding a bigger machine is the answer, run the four cheap checks in How do you diagnose a failed training run before buying a bigger machine?: in nine broken models tested there, more GPU would have fixed none of them.

Sources

  1. Unsloth Requirements — Unsloth (documentation), October 28, 2026
  2. QLoRA: Efficient Finetuning of Quantized LLMs — arXiv, May 23, 2023
  3. Qwen/Qwen3.8-27B — Qwen (Alibaba) on Hugging Face, August 5, 2026
  4. qwen3.8 - Ollama library — Ollama
  5. LoRA: Low-Rank Adaptation of Large Language Models — arXiv (Hu et al., Microsoft), June 17, 2021
  6. Training Deep Nets with Sublinear Memory Cost — arXiv, April 21, 2016
  7. llama.cpp: quantize (README) — ggml-org (GitHub), June 5, 2026
  8. Buy Mac Studio and Mac mini (Canadian and US Apple Store pages) — Apple, November 2, 2026

From the Guide to Artificial Intelligence, by Robert Scales, published by Holistic Hybrid Inc. Share and adapt it under CC BY-NC-SA 4.0: credit the guide, link to https://guidetoartificialintelligence.com/en/learn/train-and-run-your-own-ai-where-to-start/, no commercial use without permission, and keep the same licence.

Get the free Guide to Artificial Intelligence

Sign up for the newsletter and receive the free guide: what changed in AI, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement

Get the app

Add the guide to your home screen. It opens like an app, and the pages you have read stay available offline.

Read without a connection: download the articles

iPhone and iPad (Safari, Chrome, Edge)

  1. Tap the Share button (the square with an arrow). In Chrome and Edge, it is in the address bar or the menu.
  2. Choose “Add to Home Screen”.
  3. Tap “Add”.

Android (Chrome, Edge, Samsung Internet, Firefox)

  1. Open the browser menu (⋮ or ☰).
  2. Choose “Install app” or “Add to Home screen”.
  3. Confirm with “Install”.

Computer (Chrome, Edge)

  1. Click the install icon at the right end of the address bar, or open the browser menu (⋮ or …).
  2. In Chrome, choose “Cast, save and share”, then “Install page as app”. In Edge, choose “Apps”, then “Install this site as an app”.
  3. Click “Install”.

Mac (Safari)

  1. Open the File menu.
  2. Choose “Add to Dock”.
  3. Click “Add”.

Firefox on a computer can’t install a site as an app. Use Chrome, Edge or Safari instead.