Skip to main content
AirLLM: Run a 70B LLM on a Single 4GB GPU (How It Works, and the Catch)

Image: AirLLM logo (lyogavin/airllm on GitHub), Apache 2.0

AirLLM: Run a 70B LLM on a Single 4GB GPU (How It Works, and the Catch)


Quick answer: AirLLM is a free, open-source Python library that lets a 70B parameter model run inference on a GPU with as little as 4GB of VRAM, without quantization, pruning, or distillation. It does this by never loading the full model into VRAM at all; it streams one layer at a time from disk, runs it, releases it, and moves to the next. The tradeoff is speed: this is a way to make an otherwise-impossible task possible, not a way to make it fast.

How AirLLM Actually Works

Every other way to fit a big model into a small GPU changes the model: quantization shrinks the weights, pruning removes parameters, distillation trains a smaller model to imitate the big one. AirLLM changes none of that. The 70B model stays exactly as trained, at full precision if you want it. What changes is that it’s never fully in VRAM at the same time.

A transformer is just a stack of near-identical layers run in sequence. AirLLM splits the model into those layers on disk, then during inference it loads layer 1 into VRAM, runs the forward pass through it, frees that VRAM, loads layer 2, runs it, frees it, and so on through the whole stack. At any given moment, VRAM only has to hold one layer’s worth of weights, not the whole model. That’s how a model with 140GB of FP16 weights can run on a 4GB card: you never need more than a few hundred MB in VRAM at once.

This is a form of offloading, taken to its logical extreme. Our GPU benchmarks post covers the “offloading penalty” when a model partially spills from VRAM to system RAM over PCIe. AirLLM pushes that same idea further: instead of offloading to RAM, it offloads to disk, and instead of offloading part of the model, it offloads all of it, one layer at a time.

What Model Sizes Fit at What VRAM

These are the numbers from the project’s own documentation, current as of its 2026 releases:

ModelParametersVRAM with AirLLMNotes
Llama 3.x / similar dense 70B70B~4 GBThe headline case; dense model, full layer streaming
Llama 3.1 405B405B~8 GBDense model, same layer-streaming approach
DeepSeek-V3671B (MoE)~12 GBSparse MoE, only active experts stream per token
Qwen3-235B-A22B235B (MoE)~3 GB22B active parameters per token keep VRAM low
Kimi K32.8T (MoE)~3.7 GBLargest open-weight model released to date, per-expert streaming

Why the MoE models need less VRAM relative to their size: Mixture-of-experts models like DeepSeek-V3 and Kimi K3 don’t run every parameter on every token, they route each token to a small subset of “expert” sub-networks. AirLLM streams only the experts a token actually needs rather than the entire layer, which is why a 2.8 trillion parameter model can run in under 4 GB while a dense 70B model needs roughly the same amount.

The Speed Tradeoff Nobody Puts in the Headline

Here’s the part that matters more than the “70B on 4GB” headline: reading model weights from disk on every forward pass is fundamentally slower than reading them from VRAM. GDDR7 on an RTX 5090 moves data at 1,792 GB/s. Even a fast PCIe 5.0 NVMe tops out around 14 GB/s sequential, and inference read patterns aren’t always sequential. That gap, over 100x, doesn’t disappear because the model technically runs.

In practice this means AirLLM is not something you’d use for interactive chat. It’s a way to run a forward pass on a model you otherwise have zero access to on your hardware, for evaluation, one-off inference, testing whether a model’s outputs are even worth pursuing further, or research on a budget. The project does offer optional block-wise 4-bit/8-bit compression that the maintainer reports gives up to a 3x speedup with close to no accuracy loss, and prefetching to overlap loading with compute, both of which help, but neither changes the fundamental disk-bound nature of the technique.

Practical read: if your bottleneck is “I want to fit and query a 70B model at all,” AirLLM solves that. If your bottleneck is “I want a 70B model to talk back at a usable pace,” you still need either enough native VRAM, a quantized version that fits, or cloud GPU time.

When AirLLM Makes Sense vs. the Alternatives

You want to just see a model’s output once or twice

AirLLM is the right tool. No cloud signup, no renting a GPU for an hour minimum, no downloading a re-quantized version. Point AutoModel.from_pretrained() at the Hugging Face repo ID and go.

You want to chat with a 70B model regularly

Look at a quantized GGUF build first. If a Q4 quant still doesn’t fit your VRAM, renting a GPU by the hour on RunPod or Vast.ai gets you real VRAM-speed inference for less than the cost of buying a bigger card, especially for occasional use.

You’re evaluating whether a model is worth building around

AirLLM is genuinely useful here. You can pull down a model that would otherwise need an A100 and run a handful of prompts through it on a laptop GPU before deciding if it’s worth a proper hardware investment.

You do this often enough that speed matters

At that point you’ve outgrown AirLLM’s use case. See our RAM for local LLMs guide and GPU comparison for building a rig sized to run the models you actually use at real speed.

Getting Started

Installation is a single pip package:

pip install airllm

Then point it at any supported Hugging Face repo ID:

from airllm import AutoModel

model = AutoModel.from_pretrained("Qwen/Qwen3-32B")

input_text = ["What is the capital of United States?"]
input_tokens = model.tokenizer(input_text, return_tensors="pt",
    return_attention_mask=False, truncation=True, max_length=128, padding=False)

generation_output = model.generate(
    input_tokens['input_ids'].cuda(),
    max_new_tokens=20,
    use_cache=True,
    return_dict_in_generate=True)

output = model.tokenizer.decode(generation_output.sequences[0])
print(output)

On first run, AirLLM downloads the model and splits it into layer-wise shards on disk, so budget disk space roughly equal to the model’s full size before it starts serving requests. The project is Apache 2.0 licensed and actively maintained, with MoE and FP8 support added as recently as mid-2026.

Frequently Asked Questions

Is AirLLM actually free?

Yes. AirLLM is an open-source Python package (Apache 2.0 license, pip install airllm) from developer Gavin Li. There’s no paid tier, API key, or usage limit; it runs entirely on your own hardware.

How fast is inference with AirLLM?

Slow compared to a GPU with native VRAM headroom. Because most of each forward pass streams model weights from disk rather than reading them from VRAM, throughput is bounded by your storage speed, not your GPU’s compute. Expect well under 1 token per second on a 70B model with a SATA SSD, and low single digits on a fast PCIe 4.0/5.0 NVMe. It is not a substitute for a GPU with enough VRAM if you need interactive chat speed.

Does AirLLM work with any model?

It supports most popular open-weight architectures through a single AutoModel.from_pretrained() call: Llama 3.x/4, Qwen3, DeepSeek V2/V3, Phi-4, Gemma, ChatGLM, Mistral, and more. For MoE models like DeepSeek-V3 and Kimi K3, it streams only the experts a given token actually routes to, which is why those run in less VRAM than their total parameter count would suggest.

Does AirLLM run on a MacBook?

Yes, on Apple Silicon. It uses mlx alongside torch and works through the same AutoModel API as the Linux/CUDA path, though you’re still bound by the same disk-streaming bottleneck as on a PC.

Is AirLLM better than just using a quantized GGUF model?

They solve different problems. Quantization (GGUF, AWQ, GPTQ) shrinks a model’s weights so more of it fits in VRAM, trading some accuracy for size. AirLLM doesn’t shrink the model at all; it keeps full weights on disk and streams them layer by layer, trading speed for capability. If a quantized version of the model fits in your VRAM, quantization will run circles around AirLLM. AirLLM exists for the case where it genuinely does not, even at 4-bit.

Want the Model to Actually Run Fast?

AirLLM answers “can this run at all.” For “can this run well,” see our AI Workstation Build Guide.