# How to Run a Large AI Model on Almost No RAM [2026]

> The viral '321B model on a 128MB laptop' claim is part true, part physically impossible. Here's the real MoE offloading mechanics, hardware table, and setup.

- Canonical: https://www.kunalganglani.com/blog/run-large-ai-model-laptop
- Author: Kunal Ganglani
- Published: 2026-12-03 · Updated: 2026-12-03
- Category: AI and Machine Learning · Tags: local-llm, ollama, claude-code, mixture-of-experts, llm-hardware

## TL;DR

Screenshots are going around claiming you can run a 300-billion-parameter AI model on a laptop with almost no memory. Half of that is real and half is nonsense. Modern big models only use a small slice of themselves per word, so they can run on modest hardware by keeping most of the model on your hard drive and loading pieces as needed. But a laptop with 128MB of memory cannot even start the model, let alone run it. The honest takeaway: a cheap machine with 32GB or more can run surprisingly large models slowly, your disk speed is the real limit, and any headline promising magic speed is probably measuring the wrong thing.

You can run a large AI model with more than 300 billion total parameters on a laptop that cost less than a mid-range GPU. You cannot run it on 128MB of RAM. Both halves of that sentence are true, and the gap between them is exactly where the viral screenshots live.

If you have seen the "free 321B model on a 128MB laptop" posts going around, here is the one prerequisite nobody mentions. The model file still has to physically exist on fast storage, and your machine still needs enough RAM to hold the *active* slice of that model plus the operating system. Get that right and the rest of the trick is real. Get it wrong and you are reading a benchmark of someone's scroll speed.

This matters right now because the tooling just got frictionless. [Ollama](https://github.com/ollama/ollama) shipped v0.40.19 on November 26, 2026 with one-command launches into [Claude Code](/blog/local-llm-vs-claude-coding-benchmark), Codex, Copilot CLI, and OpenCode, and the local-LLM benchmarking crowd responded with a wave of "giant model, tiny VRAM" posts between November 27 and December 2, 2026. So let me do what none of those posts did: pull the claim apart, show you the actual numbers, and hand you a hardware table you can check your own rig against.

## What Is Disk and Expert Offloading

Disk and expert offloading is the technique of keeping most of a model's weights on storage or system RAM and streaming only the parts needed for the current token into fast memory, so a model far larger than your VRAM can still produce output. It is the reason a 19GB model can run on an 8GB graphics card, and it is the real mechanism hiding behind every "impossible" laptop claim.

![A 3D render of the Nvidia logo on a dark grey panel](https://cdn.sanity.io/images/vzekdneq/production/c9769cabe2e0f16f20fa10783543e706f37d616e-1200x675.webp)

There is nothing magic about it. The inference engine memory-maps the model file, loads the layers it can fit into GPU VRAM, leaves the rest in system RAM, and falls back to reading cold weights off the SSD on demand. Each tier is slower than the one above it. VRAM bandwidth is measured in hundreds of gigabytes per second, system RAM in tens, and even a fast NVMe SSD tops out around 7GB/s. Offloading works. It just moves the bottleneck from "do you have enough VRAM" to "how fast can you read weights off disk."

The part that makes huge models survivable on small hardware is not the disk. It is the architecture. That is where active parameters come in.

## What 'A3B' and Active Parameters Actually Mean

A Mixture-of-Experts (MoE) model splits each layer into many small expert sub-networks and uses a router to pick only a few of them per token. The suffix in a name like `Qwen3-30B-A3B` tells you both halves of the story: 30.5 billion parameters are *stored*, but only about 3.3 billion are *activated* for any given token. The "A3B" literally encodes the active-parameter count.

![Nvidia logo on a green background with abstract spheres](https://cdn.sanity.io/images/vzekdneq/production/dbeab446066aa6f90fb1bbf620a492a8623506e7-1200x675.webp)

As independent ML blogger [Ionel Brulea](https://briologic.ro) laid out in his breakdown of the Qwen3 architecture, the router in each layer might choose 8 of 128 available experts. The other 120 sit idle for that token. Multiply that sparsity across every layer and you get a model with massive capacity that only ever does a small model's worth of math per token.

This is the single most misquoted number in the entire local-LLM conversation. When someone says "321B model," they mean total stored parameters. The compute per token is governed by the active count, which on these large MoE models is often in the 20-40B range or lower. A 321B MoE and a 321B dense model are completely different animals. The dense one needs all 321 billion weights in memory for every token. The MoE one needs the router, the shared layers, and whichever handful of experts got picked.

Is an MoE model better than a dense model of the same total size? For raw quality per stored parameter, usually not. For *quality per dollar of hardware you need to run it*, absolutely. That tradeoff is the whole reason these architectures went mainstream, and it is why Ollama now ships Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, and Gemma out of the box.

## How Offloading Works: mmap, Tensor Split, and llama.cpp

Underneath Ollama sits [llama.cpp](https://github.com/ggml-org/llama.cpp), the C/C++ inference engine founded by [Georgi Gerganov](https://github.com/ggml-org/llama.cpp) and sitting at 137k GitHub stars. This is where the offloading actually happens, and understanding it kills most of the confusion.

![A 3D render of the Nvidia logo on a dark grey panel](https://cdn.sanity.io/images/vzekdneq/production/c9769cabe2e0f16f20fa10783543e706f37d616e-1200x675.webp)

Three mechanics do the heavy lifting:

- **Memory mapping (mmap).** Instead of reading the full model into RAM, the engine maps the file into the virtual address space. The OS pages weights in as they are touched and evicts them when memory pressure rises. A 130GB file can be "opened" on a 32GB machine because mmap only commits the pages you actually read.
- **Layer and tensor offload.** You tell the engine how many layers to push onto the GPU. Everything above that line runs in VRAM at full speed; everything below runs on the CPU against system RAM. The split is a dial, not a switch.
- **On-demand disk streaming.** When the working set exceeds RAM, the cold pages come from the SSD. This is the point where your storage speed becomes your token speed.
The comparison between these two engines is worth understanding before you pick one, and I went deep on it in [Ollama vs llama.cpp](/blog/ollama-vs-llama-cpp). For most people Ollama's defaults are fine. The important thing is that the offload logic is identical, because Ollama is a wrapper around the same ggml core.

MoE changes the economics of all three. Because only a few experts fire per token, the engine can keep hot shared layers in VRAM and leave cold experts on slower tiers without paying for them on every token. A dense model gives you no such luxury. Every weight is a hot weight.

## Memory vs Compute: Why Few Active Experts Keep It Fast

Here is the mental model that makes the whole thing click: inference has two costs, and offloading only taxes one of them.

Compute scales with *active* parameters. A 30B-A3B model does roughly 3.3B parameters' worth of matrix multiplication per token regardless of where the weights live. That is cheap. Even a 2015-era CPU can keep up.

Memory movement scales with *where those active weights are*. If the experts the router picked are already in VRAM, you get full speed. If they are in system RAM, you pay the PCIe and DDR tax. If they are cold on disk, you stall on a page fault while the SSD coughs up the bytes. The genius of MoE offloading is that sparsity keeps the amount of weight you need to move per token small, so the slow tiers hurt less than they would for a dense model.

This is also why the "big model on tiny hardware" claims feel plausible. The compute genuinely is small. What people forget is that the *router can pick any expert*, so over a long generation you will eventually touch most of them, which means they all need to be reachable on reasonably fast storage. Sparsity per token does not mean sparsity over a whole conversation.

Based on the benchmark data I maintain at [kunalganglani.com/llm-benchmarks](/llm-benchmarks), unified memory flips the usual intuition here. On Apple Silicon the CPU and GPU share one pool, so there is no PCIe wall between RAM and VRAM. Big MoE models load comfortably, but throughput, not capacity, becomes the thing you actually trade against.

## Hardware You Actually Need to Run a Large AI Model

No single competitor post gives you one table that maps model size to realistic minimums, so here is mine, distilled from community benchmarks and the runs I track for the site's [LLM Hardware & Local AI](/pillars/llm-hardware-local-ai) guides. These are order-of-magnitude figures for Q4-class quants, not promises.

| Model class | Example | Min usable RAM + VRAM | Storage (size / speed) | Realistic tok/s |
| --- | --- | --- | --- | --- |
| 8B dense | Qwen3-8B | 8GB VRAM *or* 16GB RAM | ~5GB, any SSD | 40-60 |
| 30B MoE (A3B) | Qwen3-30B-A3B | 32GB RAM + 8GB VRAM | 19GB, SATA SSD fine | 15-25 |
| 70B dense | Llama-class 70B Q4 | 48GB unified or 2x24GB VRAM | ~40GB, NVMe preferred | 5-15 |
| 235B MoE | GLM / Qwen large | 64-128GB RAM | 130GB+, NVMe required | 3-10 |
| 600B+ MoE | DeepSeek V3/V4 | 256GB+ RAM or server | 400GB+, fast NVMe | 1-8 |

Do you need a graphics card at all? No. MoE models run on CPU-only machines because the active compute is small. A GPU dramatically improves the VRAM tier and therefore the ceiling on tokens per second, but it is an accelerator, not a hard requirement. If you are buying, I compared the two most common entry cards in [RTX 4060 Ti vs RTX 4070](/blog/rtx-4060-vs-rtx-4070-for-ai), and AMD owners should read the [ROCm](/blog/amd-rocm-vs-cuda-local-ai-open-source-guide) side of the story before assuming CUDA-only.

The pattern in that table is the whole point. Quality holds surprisingly well as you shrink hardware. Speed is what you pay with. When I benchmarked quantized models for the site's GPU guides, the lesson that stuck was that quantization quality cliffs are model-family-specific. A blanket "just run Q4" recommendation is wrong often enough that you should test your specific model before trusting it in a [production AI](/pillars/ai-agents) workflow.

## Real Benchmarks on Constrained Hardware

Numbers settle arguments. On a 2015-era PC with an i5-6600K, 32GB of DDR4, and an 8GB RTX 3060 Ti, where the 19GB Q4_K_M file does **not** fit on the card, Ionel Brulea's benchmark showed Ollama generating Qwen3-30B-A3B at 19.4 tokens per second. For comparison, the smaller Qwen3-8B that fits entirely in VRAM ran at 52.6 tok/s. The offloaded 30B model was slower, but 19.4 tok/s is still faster than most people read. A model that does not fit was perfectly usable.

The quality-versus-latency tradeoff shows up just as cleanly on the small end. A Google Developer Experts benchmark squeezed Gemma 4 E4B onto a 4GB laptop GPU and found it matched an 8GB desktop card's answers in 15 of 16 test settings, while taking 1.59x longer. Quality held. Latency paid the bill. That is the recurring shape of constrained-hardware inference, and it is why "my 16GB laptop can't do this" is almost always false. It can. It will just be slower, and for most local work that is a fine trade. If you are weighing it against an API bill, I ran the actual [LLM cost](/blog/local-llm-cost-breakeven) break-even math separately.

For a full walkthrough of model and hardware pairings, the [Complete Guide to Running Local LLMs in 2026](/blog/local-llms-complete-guide) is the best starting point before you commit to a [local LLM](/blog/local-llms-complete-guide) setup of your own.

## Where Offloading Breaks: Thrashing and the 128MB Lie

Now the debunk. Can you run a 321B-parameter model on 128MB of RAM? No. Not exaggerated, not "with the right tricks." Physically no.

128MB is not enough to boot a modern operating system, let alone hold a model's page tables and the kernel structures that mmap itself requires. The moment your working set exceeds physical RAM, the OS enters [thrashing](https://en.wikipedia.org/wiki/Thrashing_(computer_science)): a nonstop cycle of page faults serviced from disk, where throughput collapses toward zero because the machine spends all its time swapping instead of computing. Offloading assumes you have *enough* RAM for the active working set and the OS. Strip that away and the cleverest tensor split in the world cannot save you.

So where did "128MB" come from? Almost always a misread of 128**GB**, or a conflation of total parameters with active parameters, or a screenshot of a model that was never actually generating. 128GB of RAM running a 300B+ MoE at a few tokens per second? Completely real. 128MB? A headline, not a benchmark.

The real wall for legitimate setups is disk speed. Once your model exceeds RAM and you are streaming experts from storage, your token rate is capped by how fast you can read weights. NVMe at ~7GB/s keeps big MoE models in the single-digit-to-low-teens tok/s range. A SATA SSD at ~550MB/s drops you hard. A spinning HDD makes a 70B+ model effectively unusable. Disk is the floor nobody puts in their viral screenshot.

## The Strata '100 tok/s' Trap

The cleanest cautionary tale this year is the Strata demo. It claimed 100+ tokens per second running DeepSeek V4.1 Flash, a 763B-parameter model, on a 12GB GPU. Enormous model, tiny card, triple-digit speed. It went viral for obvious reasons.

As YouTube creator Kai demonstrated when he actually dug into it, the "100+ tok/s" figure was measuring the UI's token-streaming and reading speed, not the model's true generation throughput. The interface was replaying or rendering tokens faster than they were produced. The real generation rate was a fraction of the headline. Nothing about the hardware was fake. The *metric* was.

Here's the demo and breakdown:

[Watch: You Don't Need an Expensive GPU Anymore (Strata 100 tok/s)](https://www.youtube.com/watch?v=mED-boddeWI)

Internalize this pattern, because the next viral claim will use the same trick. When you see a stunning local-LLM number, ask three questions. Is it quoting total or active parameters? Is it measuring generation throughput or display/streaming speed? And does the hardware have enough RAM for the active working set plus the OS, or is the model partly offloaded to disk in a way the demo conveniently never stress-tests? Nine times out of ten, one of those three answers deflates the headline.

## Set It Up: Ollama + Claude Code Step by Step

The kernel of truth in the viral posts is the genuinely useful part, and it takes about five minutes. Here is the real workflow for pointing an [agentic AI](/pillars/ai-agents) coding assistant at a local MoE model.

1. **Install or update Ollama to v0.40.19 or later.** The one-command launch integrations landed in the November 26, 2026 release, so older versions won't have `ollama launch`.
1. **Pull an MoE model sized to your hardware.** Run `ollama pull qwen3:30b-a3b` for the 30B MoE, or a larger GLM/DeepSeek variant if you have the RAM and NVMe headroom from the table above. Match the quant to your memory, not your ambition.
1. **Confirm it runs standalone first.** `ollama run qwen3:30b-a3b` and send one prompt. Check your real tok/s before wiring it into anything. If it's thrashing, you'll feel it immediately.
1. **Launch Claude Code against the local model.** Run `ollama launch claude`. This wires the Claude Code CLI to your local Ollama endpoint instead of a cloud API, so your agent loop runs entirely on your machine.
1. **Verify the routing.** Give the agent a small coding task and watch the token stream. If it stalls between tokens, you're disk-bound; move to a smaller active-parameter model or a faster SSD.
1. **Tune the offload split if needed.** For models that don't fit in VRAM, adjust how many layers go to the GPU. More layers on the card means faster tokens, right up until you run out of VRAM and it falls over.
That is the whole "free big model in Claude Code" trick, minus the hype. No 128MB miracle, just open weights, a mature inference engine, and honest hardware. If you want to run this across every machine in the house rather than one laptop, the [homelab AI coding server](/blog/homelab-ai-coding-server-opencode) build scales the same idea, and the broader case for ditching the API is in my look at whether [local AI](/blog/local-ai-vs-cloud-ai-2026) has closed the gap.

The interesting shift isn't that you can run a 300B model locally today. It's that the gap between "total parameters" and "active parameters" is going to keep widening, and MoE routing will get smarter about which experts to keep hot. The next viral screenshot will claim something even more absurd. Now you know the three questions that will deflate it before you hit retweet.

Photo by OMAR SABRA on Unsplash.

## FAQ

### Can Claude Code actually run against a local Ollama model?

Yes. Since Ollama v0.40.19 (November 26, 2026), the command ollama launch claude wires the Claude Code CLI to your local Ollama endpoint instead of a cloud API. The agent loop then runs entirely on your machine against whatever model you pulled, with no API key or usage bill.

### How much RAM do I actually need to run a 70B parameter model?

For a Q4-class 70B dense model, plan on roughly 48GB of combined RAM and VRAM as a practical floor, backed by an NVMe SSD. You can go lower by offloading more to disk, but token speed drops fast. A 70B MoE with a small active-parameter count is far more forgiving than a 70B dense model.

### Why did my offloaded model get stuck in a repetition loop or run extremely slowly?

Extreme slowness usually means your working set exceeded physical RAM and the system is thrashing, servicing constant page faults from disk. Repetition loops are a separate issue, often caused by a too-aggressive quantization or sampling settings. Try a model with fewer active parameters, a faster SSD, or a less lossy quant for that model family.
