
The phrase AirLLM AI appears in more and more conversations about running large language models at home. Yet many explanations jump straight into code. This article steps back and explains, in plain language, the problem AirLLM solves, the idea behind it and what that idea means for anyone who wants to use large models without expensive hardware.
The memory wall
A language model is essentially a huge collection of numbers called parameters. A 70-billion-parameter model stored at 16-bit precision needs about 140 GB just to hold those numbers. Graphics cards are fast at the maths language models require, but consumer cards typically have between 4 and 24 GB of memory. The traditional approach, loading the entire model into GPU memory, simply does not fit.
The usual responses are expensive or lossy: buy multiple data-centre GPUs, rent cloud servers, or compress the model heavily through quantization, distillation or pruning. Each option has drawbacks in cost, privacy or quality.
The insight: a model is a stack of layers
Large language models are built from dozens of nearly identical transformer layers stacked one on top of another. Text enters at the bottom, each layer refines its internal representation, and the final layer produces a prediction for the next word. Crucially, a layer only needs its own weights and the output of the layer below it. It does not need the other layers to be in memory at the same time.
AirLLM builds on exactly that observation. If each layer can run on its own, the GPU only ever needs room for one layer.
How layer-wise inference works
- Split. On first use, AirLLM divides the model checkpoint into separate files, one per layer, and saves them to disk.
- Load. To process a token, it loads the first layer's weights into the GPU.
- Compute. The GPU runs that layer and passes the small intermediate result onward.
- Release. The layer's weights are freed and the next layer is loaded.
- Repeat. This continues through every layer until the next token is predicted.
Peak GPU memory ≈ the largest single layer + the activations passed between layers.
For a typical 70B model, the largest layer is roughly 2 GB in 16-bit precision, which is why a 4 GB card is enough.
Making it practical: prefetching and compression
A naive version would leave the GPU idle while each layer loads from disk. AirLLM uses prefetching to load the next layer while the current one is computing, overlapping the two tasks. It also offers optional block-wise compression of the stored weights to 8-bit or 4-bit, which shrinks the files and speeds up loading. Because only weights are compressed, not activations, the effect on accuracy is small.
For mixture-of-experts models, AirLLM goes a step further and loads only the experts a token actually needs, which is how very large models such as DeepSeek-V3 and Kimi K3 become reachable.
What you gain
- Access: run 70B models on 4 GB cards and far larger models on 8 to 12 GB cards.
- Fidelity: run models at their original precision when you choose.
- Privacy: keep every prompt and answer on your own machine.
- Cost: use hardware you already own instead of renting servers.
What you give up
The trade-off is speed. Every token requires reading every layer from storage again. Even with a fast NVMe drive, that means seconds to minutes per token for the biggest models. AirLLM therefore suits tasks where waiting is acceptable: research, evaluation, private analysis and batch processing. Our AirLLM speed guide explains how to reduce the wait.
How AirLLM fits among other tools
| Approach | Memory need | Speed | Quality |
|---|---|---|---|
| Full GPU loading | Very high | Fast | Original |
| Heavy quantization | Moderate | Fast | Slightly reduced |
| CPU offloading | High system RAM | Slow | Original |
| AirLLM layer-wise | Very low | Slow | Original or near-original |
A short history
AirLLM emerged in late 2023 from the Anima project, an open effort around large Chinese and English language models. It quickly gained attention for running 70B models on a single 4 GB GPU. Later versions added macOS support for Apple silicon, CPU inference, Llama 3.1 405B on 8 GB, FP8 model support, a unified AutoModel interface and support for frontier MoE models. The project is released under the Apache-2.0 licence.
An everyday analogy
Imagine a chef preparing a complex dish from a recipe book with a hundred pages, working in a tiny kitchen with space for only one page at a time. A chef with a large kitchen spreads every page across the worktops and moves quickly from step to step. The chef in the small kitchen fetches page one from the shelf, completes that step, returns the page and fetches page two. The finished dish is identical; it simply takes longer because of all the trips to the shelf. AirLLM is the chef in the small kitchen. The shelf is your SSD, the worktop is your GPU memory, and the speed of each trip depends on how fast your drive can deliver the next page.
Why the results are identical
A common worry is that splitting a model must change its answers. It does not, because the mathematics is the same. Each layer receives exactly the same input and applies exactly the same weights as it would in a fully loaded model. The only difference is when the weights arrive in memory. Without compression, AirLLM's outputs match conventional inference, aside from tiny numerical variations that any change of hardware or library version can introduce. With compression enabled, weights are approximated, which can alter outputs slightly; that choice is optional and yours to make.
Who benefits most
- Students and educators who want to study large models on school or personal hardware.
- Researchers evaluating many models without access to large GPU clusters.
- Professionals handling confidential material who cannot send documents to external services.
- Developers prototyping applications that will later run on bigger infrastructure.
- Hobbyists curious about frontier-scale models who value learning over speed.
Where the idea goes next
Layer-wise and expert-wise streaming benefit directly from faster storage, and consumer drives keep getting quicker. Each generation of NVMe technology reduces AirLLM's time per token without any change to the software. Improvements in compression formats and native low-precision models, such as FP8 checkpoints, push in the same direction by shrinking the data that must move. The core idea is simple and durable: when memory is scarce and storage is fast, stream the model instead of holding it.
Where the memory goes during generation
The first number to understand is the size of the weights that must be available for the current computation. AirLLM changes which weights occupy the GPU by streaming them on demand, but it still needs intermediate tensors and room for the backend to perform each operation. The memory report from a real run therefore tells you more than a calculation based on parameter count alone. A model can load successfully and still run out of memory after you supply a longer prompt.
The second number is time to first token. Reading weights and processing the input both contribute to that delay. Later tokens have a different cost because generation reuses information from earlier tokens where supported. They still require the model to move through the layers again. A concise answer may be practical on a machine that would take too long to produce a full article. Measure the workload you intend to run before deciding what fits.
Try the same short question with two output limits. Record how long model preparation takes and how long generation takes after the first token. Then repeat with a longer input while keeping the output limit fixed. This simple exercise shows whether weight movement, prompt processing or output length is the constraint you notice most. Keep the model and backend constant during these comparisons. Record peak memory for every run and note any other applications that share the GPU. Those observations make it easier to choose a model and an output budget for local AirLLM work.
Frequently asked questions
AirLLM is open-source software that runs very large AI language models on small graphics cards. It does this by loading the model one layer at a time instead of all at once, so the card only needs enough memory for a single layer.
No. AirLLM is an inference engine, meaning the software that runs models. The intelligence comes from the model you load, such as Llama, Qwen or DeepSeek.
Not by default. Layer-wise inference computes the same results as normal inference. Quality only changes slightly if you enable optional 4-bit or 8-bit compression.
AirLLM is maintained on GitHub by the developer known as lyogavin. It grew out of the Anima project and is released under the Apache-2.0 licence.
Conclusion
AirLLM AI is not a new model but a clever way of running existing ones. By treating a model as a sequence of self-contained steps rather than a single block, it replaces a hard memory limit with a softer time cost. For anyone curious about large models, privacy-minded professionals and researchers working on modest budgets, that trade opens doors that were previously closed. Ready to try it? Start with how to use AirLLM.


