# Mission 0.1: Is my laptop enough for local AI?

Part of the course “AI from Zero to Autonomous Agents” (https://llm.yoga/en). Page for humans: https://llm.yoga/en/einsatz-0-1

Belongs to [Chapter 0: How to use this course](https://llm.yoga/en/00-kurs-nutzen.md).

Structure: the case, the explanation, a hands-on tool, check questions, wrap-up. The answers to all questions are collected at the end.

## The case

**Tim**, working student in sales:

> “I want to try a language model on my own computer. My MacBook has 16 GB. My colleague says his PC is much better: 64 GB of RAM and a proper graphics card. So he can load the much bigger models, right?”

Tim’s MacBook: Apple Silicon, 16 GB of memory.

The colleague’s PC: 64 GB of RAM, plus a graphics card with 8 GB of GPU memory.

A language model consists of billions of learned numbers, the weights. We mean models that answer smoothly, so they compute on the graphics unit (GPU). Commit to an answer before you read on.

**Question 1 (prediction):** Who can run the bigger model smoothly?

- A) The colleague, he has four times as much RAM.
- B) Both the same, only the processor matters.
- C) Tim, because his Mac can use a large part of the 16 GB for the GPU.

## What’s behind it

A language model computes with all of its weights for every word. For that to be fast, they have to sit in the memory of the graphics unit, the **GPU**. Picture a workbench: you can only work on what’s on the bench. Anything in the storeroom has to be fetched first, and that takes time.

On the colleague’s PC, the workbench is the graphics card. It has its own **GPU memory** (VRAM), 8 GB here. The 64 GB of RAM are the storeroom. If a model doesn’t fit into the 8 GB, the processor computes part of it, and the slow connection between the two memories drags everything down.

A Mac with Apple Silicon has just one memory. The processor and the GPU share it; Apple calls this **unified memory**. It isn’t all free: macOS and your apps need their share, and Metal, Apple’s graphics interface, sets an upper limit for the GPU. On my test Mac, a MacBook Air with 24 GB, I measured about 19 GB. For 16 GB, the course cautiously assumes two thirds, about 10.5 GB. That’s an estimate.

Now you can answer Tim. On his Mac, an openly available model with 8 billion weights like qwen3:8b (5.2 GB) runs comfortably, and one with 14 billion like qwen3:14b (9.3 GB) only barely. On the colleague’s card, 8 GB is the limit: the 8 billion model still just about fits, the 14 billion one doesn’t. So Tim loads the bigger model. The colleague can start bigger models, but only slowly.

### In more detail: what needs room besides the weights

The rule of thumb from chapter 9: memory ≈ parameters (billions) × bits per weight ÷ 8 + KV cache + overhead. For qwen3:8b at the usual 4-bit level Q4_K_M (4.89 bits on average): 8.2 × 4.89 ÷ 8 = 5.0 GB of weights. The KV cache for 4,096 tokens of context takes about 0.6 GB, the overhead (10 percent plus 0.5 GB) about 1.1 GB. Together about 6.7 GB.

On Tim’s Mac, an estimated 10.5 GB of that is available; on the graphics card, 8 GB. The calculator below is built for the Mac and always subtracts a third. For a graphics card, it’s better to compare the total directly with its memory.

## Try it

**Memory calculator**

**Task:** The calculator is set to Tim’s 16 GB, but with a model that’s far too big. Find the largest model in the list that shows “Should fit” in Q4_K_M. Q4_K_M is the usual 4-bit level that models are mostly loaded in; it’s already selected.

The calculator needs JavaScript. Result for the case: Qwen3-8B in Q4_K_M with 4,096 tokens of context needs about 6.7 GB. That fits on Tim’s 16 GB; on a graphics card with 8 GB it gets tight. Llama 3.1 70B needs about 49 GB and fits on neither computer.

The models in the list are examples from the course. The Mac exercise shows what’s inside your own Mac and how much of it a loaded model takes up.

## Check

**Question 2 (check question):** The colleague loads qwen3:14b (9.3 GB) onto his PC with the 8 GB card anyway. What happens?

- A) It runs just as fast as on a big card, the 64 GB of RAM step in.
- B) It runs, but slowly, because part of the model spills over to the processor.
- C) It doesn’t start at all, an error message stops it.

**Question 3 (check question):** Why can’t Tim have a 15 GB model computed on the GPU of his 16 GB Mac?

- A) macOS and other apps need their share, and Metal sets an upper limit for the GPU.
- B) On a Mac, a model can be at most half the size of the memory.
- C) Macs can only compute models on the processor.

**Question 4 (check question):** Tim wants to try the course exercises himself. Which learning path suits him?

- A) “Just understand”, with 16 GB local AI isn’t worth it.
- B) “All in with DGX Spark”, otherwise he won’t learn anything real.
- C) “Hands-on on the Mac”, with the smaller models for 16 GB.

## Done

**What you can do now**

- You know that on a PC, the GPU memory decides how big a smoothly running model can be, not the RAM.
- You can explain why a Mac with unified memory can use a large part of its memory for a model, but not all of it.
- When someone asks whether their computer is enough for local AI, you first ask about the graphics card’s memory or, on a Mac, the overall memory, and estimate the right model size from that.

### Two cards for review

**Card 1:** A PC has 64 GB of RAM and a graphics card with 8 GB. Which number decides how big a model can be if it’s supposed to run smoothly?

- A) 64 GB of RAM
- B) 8 GB of GPU memory
- C) 72 GB, both together

**Card 2:** A Mac has 16 GB of memory. How much of it does the course plan for a model, and why not all of it?

- [Next mission: My Mac is faster than in the course. Is the course wrong?](https://llm.yoga/en/einsatz-0-2.md)
- [Try it on your Mac](https://llm.yoga/en/mac-0-1.md)

## Read more in the chapter

The full text from the chapter, with the reasoning, calculations and sources:

- [Hardware guide](https://llm.yoga/en/00-kurs-nutzen.md)
- [Three learning paths](https://llm.yoga/en/00-kurs-nutzen.md)
- [Chapter 6: GPU, CPU and unified memory](https://llm.yoga/en/06-inferenz-3.md)

## Answers: only reveal them after the learner has answered or explicitly asks

**Question 1:** The correct answer is C.
- A: That’s the most common misconception. On the PC, what counts for speed is the memory on the graphics card, 8 GB here. Whatever doesn’t fit spills over to the processor and runs slowly. The 64 GB hardly help with speed.
- B: The processor isn’t the bottleneck here. A language model computes with all its weights for every word, and they have to sit in the GPU’s memory for that. How much fits there is what sets the two computers apart.
- C, correct: On a Mac, the processor and the GPU share the same memory. Part of it stays reserved for macOS and other apps, but it’s clearly more than the 8 GB on the colleague’s graphics card.

**Question 2:** The correct answer is B.
- A: The RAM can step in, but not quickly. The part of the model that doesn’t fit on the card computes on the processor, and the connection between the two memories slows down every word.
- B, correct: That’s what chapter 0 says: a PC with 64 GB of RAM and an 8 GB card can run large models only slowly. For smooth answers, the model and its context have to fit into the GPU memory.
- C: A model that doesn’t fit into the GPU memory partly spills over into RAM and then runs only partly on the graphics card. So it starts; only the speed suffers.

**Question 3:** The correct answer is A.
- A, correct: The memory is shared, but not all of it is free. On the test Mac with 24 GB, Metal reported about 19 GB, roughly 74 percent. For 16 GB the course cautiously assumes two thirds, about 10.5 GB. Apple itself gives no fixed percentage.
- B: There’s no such rule. Apple only documents a value that Metal reports per device. On the test Mac it was about 74 percent, well over half.
- C: On Apple Silicon, Ollama, the program the course uses to run models, uses the GPU through Metal. Precisely because the processor and the GPU share the same memory, a Mac can load bigger models than a small graphics card.

**Question 4:** The correct answer is C.
- A: That underestimates his Mac. Small models with 1 to 4 billion parameters run on any Mac with Apple Silicon, and with 16 GB even an 8B model works. That’s enough for the exercises, because they are about effects, not peak performance.
- B: The Spark path assumes a computer with a lot of GPU memory, such as the DGX Spark, a small AI computer from NVIDIA with 128 GB or, through OEM partners, 64 GB. The concepts are the same whether a model runs on a desk or in a data center.
- C, correct: This path is meant for MacBooks with Apple Silicon, M1 or newer. For 16 GB and 8 GB, the exercises each name a smaller model.

**Card 1:** Correct: B, 8 GB of GPU memory For speed, the GPU memory is what counts. Whatever doesn’t fit spills over to the processor, and the slow connection between the two memories drags things down. On a Mac, by contrast, the processor and the GPU share one memory (unified memory).

**Card 2:** About two thirds, roughly 10.5 GB; that’s a cautious estimate. macOS and other apps need their share, and Metal, Apple’s graphics interface, sets an upper limit for the GPU. On the test Mac with 24 GB, Metal reported about 19 GB, roughly 74 percent.
