# What Is Ollama? I Tried to Run the New Qwen4 on a 24 GB Laptop

> Ollama is a free, open-source program that downloads open models and runs them on your own computer. I tried four Qwen3 models and the new Qwen4 on a MacBook Air with 24 GB. An 8-billion-parameter model took 5 GB and generated about 17 tokens per second. Qwen4, with only 3 billion active parameters, would not load at all.

By Vladimir Beskorovainyi · Published 5 December 2026 · 8 min read

Canonical address: https://besk.tech/articles/what-is-ollama

---

On 4 December Ollama 0.40.21 added support for Qwen4-35B-A3B, a new open model from Alibaba that uses only 3 billion parameters per token. That sounds like a model made for a laptop. I downloaded it to a MacBook Air with 24 GB of memory, and Ollama refused to load it. The model needed 33.4 GiB. Ollama could give it 17.3.

That refusal says a lot about what Ollama is and what it can and cannot do for you.

## What Ollama is

Ollama is a program that downloads open-weight [language models](https://besk.tech/articles/what-is-an-llm) and runs them on your own machine. It is open source under the MIT license, and as of December 2026 its GitHub repository has about 189,000 stars. It runs on macOS, Windows and Linux, and there is an official Docker image.

You use it in two ways.

1. **From the terminal.** `ollama run qwen3:8b` downloads the model if needed and opens a chat.
2. **As a local server.** Ollama listens on `http://localhost:11434`. Its own REST API and an OpenAI-compatible API live there, so a script written for a cloud model can be pointed at a local one by changing the address.

The models come from the library at ollama.com/library: Qwen, Gemma, gpt-oss, DeepSeek and others. Each model has tags for sizes and compression levels, such as `qwen3:8b` or `qwen3:14b`. Ollama now also offers cloud models. With those, your request goes to Ollama's servers, so "local" applies only to the models you download.

## How it works

Ollama runs a background server. The `ollama` command is a client that talks to it.

When you request a model, the server loads its weights into memory and runs them with an [inference](https://besk.tech/articles/what-is-inference-in-ai) engine. Ollama builds on llama.cpp and, on Apple silicon, can also use Apple's MLX. In my runs `ollama ps` reported the `llamacpp` runner for every Qwen3 model.

A few defaults matter in practice:

- **Compression.** The default tag is Q4_K_M: nominally 4 bits, about 5 bits per parameter on average. An 8-billion-parameter model that would take about 16 GB at full precision is a 5.2 GB file. Quality drops a little, and on a laptop that is the usual trade.
- **Memory release.** A loaded model stays in memory for 5 minutes after the last request. `ollama stop <model>` unloads it at once.
- **Network.** The server binds to 127.0.0.1, so only the same computer can reach it. The `OLLAMA_HOST` variable changes that. The local API requires no authentication, so if you open it to a network, anyone who can reach the port can use your models.
- **Storage.** On macOS, models are kept in `~/.ollama/models`.

## How much memory a model needs

A model is a set of numbers, its parameters, and all of them have to be in memory for it to answer. Ideally they sit in GPU memory. Whatever does not fit, Ollama runs on the CPU, more slowly.

On a Mac with Apple silicon, the CPU and GPU share one pool of memory, but macOS gives the GPU only part of it. On my 24 GB laptop Ollama saw 17.3 GiB available to the GPU, about 70%. The limit can be raised with the `iogpu.wired_limit_mb` system setting, at the cost of memory for the system itself.

## What ran on a 24 GB MacBook Air

I gave four Qwen3 models and Qwen4 the same 10 questions with known answers: 5 arithmetic word problems and 5 made-up customer messages to sort into one of five categories. Ollama 0.40.21, default settings except two: reasoning turned off in the request and answers capped at 1,500 tokens.

Speed is generation speed in [tokens](https://besk.tech/articles/what-is-a-token-in-ai) per second on the arithmetic problems, where answers are long, excluding the first request after loading.

| Model | File | Loaded | Speed | Correct of 10 |
|---|---|---|---|---|
| Qwen3-4B-Instruct-2507 | 2.5 GB | 3.2 GB, 100% GPU | about 34 tokens/s | 9 |
| Qwen3-8B | 5.2 GB | 5.1 GB, 100% GPU | about 17 | 9 |
| Qwen3-14B | 9.3 GB | 9.7 GB, 100% GPU | about 8 | 9 |
| Qwen3-30B-A3B (3B active, thinking-only release) | 18.6 GB | 19 GB, 6% on CPU | about 22 | 10, reasoning before every answer |
| Qwen4-35B-A3B (3B active) | 35 GB | refused | | |

The 4B and 30B come from the later 2507 release. The 4B only answers, with no reasoning mode. The 30B always reasons, and that cannot be turned off.

Ten questions are too few to rank the models by quality, and they differed on only one: a complaint that a password reset email never arrives, which I had filed under "account" and the three smaller models filed under "technical". The table answers a different question: what runs at all, and how fast.

Going from 8 to 14 billion parameters halved the speed. Qwen3-30B-A3B generated tokens faster than the 14B, but it reasoned before every answer and wrote several times more text. So each answer took longer: 9 to 34 seconds for a one-word category. I scored its final line after the reasoning, which is how it got the password email right.

The 30B did not fit entirely in GPU memory. Its first load took 78 seconds, its first answer ran at 5 tokens per second, and swap grew from 4.9 to 12 GB. On this laptop, that is the edge.

## What the Qwen4 error tells you

Qwen4-35B-A3B is a mixture-of-experts model. It contains many expert blocks and switches on only a few of them for each token, so its compute per token is close to that of a 3-billion-parameter model.

Which experts the next token needs is not known in advance, so all of them have to be loaded. The model card lists 35 billion parameters, plus a 20-billion-parameter n-gram embedding table and a 2-billion-parameter multi-token prediction module. The card says the n-gram embeddings add no accelerator memory overhead, but Ollama 0.40.21 still estimated 33.4 GiB for the model. That is about 36 GB, more than the laptop's entire memory. Ollama did not split the model between GPU and CPU, as it did with the 30B. It returned an error, and the log does not say why.

Active parameters set the compute. Total size decides whether the model loads. I did not try other runtimes or manual offloading of experts to system memory.

## Ollama vs LM Studio

LM Studio does the same basic job: it downloads open models and runs them locally. The verifiable differences:

- **License.** Ollama is open source under MIT. The LM Studio desktop app is distributed under its own proprietary terms. Some of its components, such as the `lms` command-line tool and the MLX engine, are open source under MIT.
- **Interface.** Ollama's core is a server with a command line and an API. LM Studio is built around a desktop chat window with a model browser, and it can also run a local server.
- **Engines.** Both use llama.cpp. On Apple silicon both can also run models through MLX.

Neither changes the memory a model needs. If you want a server that other programs call, Ollama is built for that.

## When a local model is not enough

I run local models wherever cloud models are not allowed, mostly because of NDAs and sensitive data. In those cases I deploy the model on our own hardware, and the data is not sent to outside services.

On a laptop, though, the models that fit are often too weak for hard problems, programming above all. They give weaker solutions, structure the code poorly and make more mistakes. That is a matter of hardware, not of local models as such. A larger model needs a server with more memory. I did not test programming or coding-specific models here; this part is my experience, not the table.

So the rule is simple. If your data may leave your machine and the task is hard, a cloud model is the easier choice. If it may not, you need a local model anyway, and Ollama is one of the simplest ways to run one. The question then is how much memory you give it.

## How to start

1. Install Ollama with the installer from ollama.com, which also starts the server. With Homebrew, run `brew install ollama` and then `brew services start ollama`.
2. Download a model: `ollama pull qwen3:8b` (5.2 GB).
3. Chat with it: `ollama run qwen3:8b`.
4. Check where it runs: `ollama ps`. `100% GPU` in the PROCESSOR column means the model fits in GPU memory.
5. Unload it: `ollama stop qwen3:8b`.

Pick a model whose file is well below the memory your GPU can use. On my laptop a 9 GB file ran fully on the GPU, and an 18.6 GB file already spilled onto the CPU.

## Limits

One laptop, one run per model, 10 questions each. Speed varies between runs: the 4B gave 23 tokens per second in a morning check and 34 in the evening. It also depends on what else is open. During the test macOS held 4 to 6 GB of other apps in swap, and up to 12 GB while the 30B was running.


## Sources

- [Ollama on GitHub](https://github.com/ollama/ollama)
- [Ollama FAQ](https://docs.ollama.com/faq)
- [Ollama API: authentication](https://docs.ollama.com/api/authentication)
- [Ollama API: OpenAI compatibility](https://docs.ollama.com/api/openai-compatibility)
- [Ollama v0.40.21 release, 4 December 2026](https://github.com/ollama/ollama/releases/tag/v0.40.21)
- [Qwen4-35B-A3B model card](https://huggingface.co/Qwen/Qwen4-35B-A3B)
- [LM Studio documentation](https://lmstudio.ai/docs/app)
- [LM Studio app terms](https://lmstudio.ai/app-terms)

---

Vladimir Beskorovainyi is an enterprise AI architect with 17 years in AI and BI, and the author of Enterprise AI: The KATA Way. He writes about applied and on-prem AI.
