Home / Learn / Data & AI / Offline AI / Lesson 9.1
All lessons

Module 9: Installing your first local AI · Lesson 9.1 · about 25 min

The easiest path: a desktop app

Install a free desktop app, download Gemma 4, and chat with it on your own computer in about 20 minutes, with no typing of commands.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 9 · about 25 minutes · read first: 1.4 and 4.1. You’ll be able to install a desktop app, download a Gemma 4 model and chat with it with the Wi-Fi switched off.

A desktop app puts a model shop, an engine and a chat window in one program, so you can run AI on your own computer by clicking, with no commands and no internet once the model is downloaded.

1. Why this matters

This is the fastest way to see local AI working on your own machine. You click instead of typing commands, and the app shows you the things later lessons explain: model size, memory use and speed. Many people never need more than this.

2. What the app does

A desktop app such as LM Studio (free, on Windows, macOS and Linux) bundles three things, like a games console that comes with a shop, the console itself and a screen:

  1. a catalogue where you search for models and download them;
  2. an engine (llama.cpp on most machines, MLX on Apple Silicon Macs) that runs the model on your processor and graphics chip;
  3. a chat window, plus a local server for programs to use (Module 11).

Other apps do the same job in a similar way. The steps below are general so they still make sense when the screens change.

3. Step by step

  1. Check your memory. Windows: Settings, System, About, “Installed RAM”. Mac: Apple menu, About This Mac. Write it down.
  2. Install the app. Download it from the maker’s own site (lmstudio.ai), not from a third-party download page. Open the installer and accept the defaults.
  3. Find the model. In the app’s model search, type gemma 4. You will see several sizes: E2B, E4B, 12B, 26B A4B and 31B, each in several file versions.
  4. Pick the size that fits. Use the table below. Choose a file marked Q4_K_M or 4-bit to start; the app usually marks the ones that fit your machine.
  5. Download it on a good connection (5 to 20 minutes for most).
  6. Load it into memory. The first load takes a little longer.
  7. Chat. Ask it something you know the answer to, then something useful: “Summarise this paragraph in three bullet points” and paste a paragraph.
  8. Switch Wi-Fi off and ask again. It still answers. That is local AI.
Your memory First Gemma 4 to try About the download
8 GB E2B, 4-bit 4.6 GB
16 GB E4B or 12B, 4-bit 6.6 GB / 7.7 GB
32 GB Mac, or 24 GB graphics card 26B A4B or 31B, 4-bit 16 GB / 19 GB

Download sizes are from the Ollama library listing read on 16 November 2026; files in other apps are similar. Models change often, so check the size shown before you download.

Watch it happen: from click to first answer

Check the room. Ravi's laptop has 16 GB. Windows, a browser and email already use about 5 GB, so about 11 GB is free.

Pick a file. Gemma 4 E4B at 4-bit is 6.6 GB. With room for the chat: 6.6 × 1.2 ≈ 7.9 GB. That fits in 11 GB with some to spare.

Download. On a 100 Mbit/s line: 6.6 × 8,000 ÷ 100 = 528 seconds, about 9 minutes. This is the last time the internet is needed.

Load. The app copies the file from the disk into memory. Memory used jumps by about 7 GB; the first load takes 10 to 30 seconds.

Ask. "Summarise this paragraph in three bullet points." The answer streams in at about 14 tokens per second: 100 words (about 130 tokens) in about 9 seconds, faster than he reads. Wi-Fi off, same speed.

Maths and principle

Principle: the model file has to fit in memory with room to spare for your system and the conversation.

Equation: free memory needed ≈ file size × 1.2. (The extra 20% holds the conversation, see Lesson 8.4.)

free after loading=total−in use−1.2×file

Analogy: parking a car in a garage. The car is the model file, the garage is your memory. A car that only just fits leaves no room to open the doors: everything still works, but slowly and awkwardly.

Try it: a 7.7 GB file? (7.7 × 1.2 ≈ 9.2 GB free. On a 16 GB laptop with a browser open, that is about right; close heavy apps first.)

total
the memory (RAM) your computer has, from Settings or About This Mac
in use
what the system and your open apps already take
file
the size of the model download in GB
1.2
the file plus 20% for the conversation's memory (the KV cache)
Physical meaning
What is left after loading is your breathing room. Above 1 or 2 GB, everything feels normal. Near zero, the computer starts using the disk as overflow and the model slows to a crawl.

4. Reading the numbers the app shows

  • Tokens per second (tok/s): how fast it writes. Above about 10 feels smooth to read; below 5 feels slow.
  • Memory used: if this is close to your total, close other programs or pick a smaller model.
  • GPU offload (on PCs with a graphics card): how much of the model sits on the graphics chip. All of it is fastest. Lesson 9.7 covers what to do when it will not go there.

A token is about three quarters of an English word, so 1 word ≈ 1.3 tokens (Lesson 3.1). That lets you turn the speed into waiting time.

“A desktop app is a toy; real local AI needs the command line.” The app runs the very same engine (llama.cpp or MLX) as the command-line tools, at the same speed. The terminal gives you more settings and scripting, not better answers.

5. Worked example

Made-up numbers. Ravi’s Windows laptop has 16 GB and no separate graphics card. He installs the app, downloads Gemma 4 E4B at 4-bit (6.6 GB) in 9 minutes, and loads it. It writes at 14 tokens per second, comfortably faster than he reads. He tries the 12B: it writes at 8 tokens per second but gives better summaries of his work emails. He keeps both and uses E4B for quick jobs and 12B when quality matters.

6. Practice

  1. Install the app and download the Gemma 4 size from the table that fits your machine.
  2. Ask the same question with Wi-Fi on and off. Note the speed both times.
  3. Your laptop has 8 GB and the app says a file needs 9 GB. What do you do?
Answers
  1. If the download fails, check free disk space: you need the file size plus about 10 GB spare.
  2. The speed should be the same. The internet plays no part in answering.
  3. Pick a smaller model (E2B) or a smaller quantisation. A file bigger than your memory will either refuse to load or crawl.

New words: engine (the program that runs the model), load (copy the model into memory), GPU offload (putting the model on the graphics chip), Q4_K_M (a common 4-bit file type).

  • A desktop app such as LM Studio bundles a model catalogue, an engine and a chat window.
  • Pick the Gemma 4 size for your memory (8 GB: E2B; 16 GB: E4B or 12B; 32 GB Mac or 24 GB card: 26B A4B or 31B), at 4-bit.
  • Memory needed ≈ file × 1.2; keep a GB or two free after loading.
  • Above about 10 tokens per second the text appears faster than you read; waiting time ≈ words × 1.3 ÷ speed.
  • Once downloaded, the model answers with the Wi-Fi off at the same speed.

Check yourself

1You have a laptop with 16 GB of memory. Which Gemma 4 size is the safest first download?
2What does "4-bit" or "Q4" in a download name tell you?
3The app shows a speed of 4 tokens per second and the laptop fan is loud. What is the most likely fix?

Sources

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Prices and model names change fast: check the official source before you buy.