One Layer at a Time

how a 70B model fits in 4 GB of VRAM, and what each token costs

What you will learn

Layer-streaming inference keeps one layer of the model on the GPU at a time and reads the rest from disk, for every token. VRAM stops being a function of model size: a 70B model fits in 4 GB.

The price is time and disk traffic. Generating one 16-token sentence this way, at 4 GB on an NVMe, reads about 2.2 TB off the disk and takes ~15 minutes. With every layer resident (a 142 GB card), the same sentence takes ~2 s: four hundred times faster, same model.

What to do

Pick a GPU size, a model and a disk. Press Generate and watch the layers travel, token by token, at the speed the hardware dictates. The meters count real disk traffic.

verdict for this config
tokens
0 / 16
elapsed (simulated)
0.0 s
read from disk
0 GB
layer trips so far
0

How this works, with sources

The physics model, simple and declared:

time/token = (layers that don't fit) x (layer GB / disk GB/s) + (all layers) x (layer GB / 1000 GB/s GPU ingest)

constantvaluesource
bytes/param fp162arithmetic
VRAM for 70B fp16~4 GBairllm README table (measured by author)
VRAM for 27B / 180B / 671B3.33 / 5.95 / ~12 GBairllm README (2026/07-08 releases)
NVMe / SATA / HDD read2.5 / 0.5 / 0.12 GB/sdeclared typical sequential
GPU weight ingest1000 GB/sdeclared RTX-4090-class
VRAM overhead1.2 GBdeclared (activations + runtime)
4bit weightsbytes / 4airllm compression (block-wise, paper 2212.09720); author reports 3x end-to-end, our load-only model gives ~4x
real datapoints28.6 s/token (3B, Windows) · 30 min/query (20B)airllm issues #364 and #374

This is a simulation with measured anchors: your SSD, your GPU and the framework's prefetching shift the constant, not the shape. The shape is the lesson: cost per token is set by the layers that have to travel, and it is paid every token. Reported Windows pathologies (#364) can be far slower than this model.