Open Source
Open Source

4GB VRAM Holds 2.8 Trillion Parameters

AirLLM (lyogavin/airllm) takes the opposite approach: instead of quantizing, distilling or pruning weights, it streams them layer by layer into VRAM, trading speed for capacity. Verified via GitHub API on October 12, 2026: 36,747 stars, 3,829 forks, Apache-2.0, created 2023-06-12, pushed 2026-10-12, 160 open issues, primary language Jupyter Notebook - which makes it more of a research tool than a production component. Repo: github.com/lyogavin/airllm. README measurements (vendor self-reported, not reproduced here): Qwen3.8-27B dense VL in 3.33GB (RTX 3090 end-to-end, needs transformers 5.8+); Qwen3.8-Flash-Next 125B in 5.95GB (RTX 4090, n-gram table file-mapped to host, ~64GB-class RAM, ~360GB checkpoint); Kimi K3 2.8T in 3.72GB (RTX 6000 Ada, per-expert streaming by token routing, requires compressed-tensors + flash-attn + a CUDA 12 torch build + transformers 4.56.x); DeepSeek-V3 671B around 12GB; training support since September 2026 runs 125B under 6GB (RTX 3060 Ti). Honest limits: the headline 70B-in-4GB claim carries no hardware; the README publishes no tokens-per-second figure, so none is invented here; layer-wise streaming means interactive token-by-token use stays awkward; disk and host RAM are the real gates; and Kimi K3 weights use a modified MIT license, not the standard one - read the LICENSE before commercial use. Positioning: our existing tool comparison covers deployment tools, this piece covers the memory-strategy dimension.

Published October 12, 202610 min read
<!-- airllm-4gb-llm-inference-resource | open-source | 4GB VRAM Holds 2.8 Trillion Parameters -->

Look at almost any local LLM deployment project and you will find the same underlying move: make the model smaller. Quantization, pruning, distillation, sparsity — all of them exist to squeeze weights into VRAM. One project runs the opposite strategy. lyogavin/airllm does not quantize, does not distill, does not prune. It carries the model into VRAM one layer at a time, and swaps the next layer in as soon as the current one finishes. Repository address: github.com/lyogavin/airllm.

Per the README, this layer-wise streaming approach fits a 70B model onto a single 4GB card, and even runs Kimi K3 — a 2.8-trillion-parameter model — below 4GB. The repository currently sits at 36,747 stars and 3,829 forks under the Apache-2.0 license, was created on June 12, 2023, and was last pushed on October 12, 2026 (all figures verified directly through the GitHub API on 2026-10-12).

What makes this approach interesting is not the size of the numbers, but that it changes which axis you sacrifice. When "it does not fit" is the only hard constraint, you can trade time instead of trading away the model itself.

What It Actually Does

The default assumption in conventional inference is that all weights live in VRAM at once: the bigger the model, the bigger the card you must buy. Quantization routes shrink the weights until they fit, and the bill comes due as accuracy loss. AirLLM starts from the opposite premise. VRAM can be tiny; time can be long. It splits the checkpoint by layer, reads each layer into VRAM during inference, releases it once it has contributed to the computation, and keeps only the current layer plus the necessary intermediate state. Peak memory therefore shifts from "the whole model" to "one layer's weights plus activations." Finer layer splits mean a lower peak and more transfer operations.

The direct corollary is that VRAM usage becomes largely decoupled from total parameter count. The gap between 2.8 trillion parameters and 27 billion parameters on the memory curve gets absorbed by transfer volume.

One point is easy to get wrong here. AirLLM does not save the space the weights themselves would occupy; it saves the space of having all the weights resident simultaneously. The practical result is that model capacity is no longer capped by VRAM at all — it is capped by disk and host memory instead. A cheap small card buys you freedom over model size, and the bill moves elsewhere. The same logic pays off harder for mixture-of-experts models: sparse experts that never fire need never enter VRAM, and that per-expert streaming is why Kimi K3 became the most eye-catching line in this project's README.

The README Numbers, With Their Prerequisites

The README lists several checkable figures, all following the project's own measurements, and every one is tied to specific hardware and version prerequisites. Quoted without those prerequisites, they mean nothing.

  • A 70B model in under 4GB on a single card is the headline marketing claim, with no specific hardware named.
  • Qwen3.8-Flash-Next (125B, Qwen4ExpForConditionalGeneration architecture, including roughly 51B of n-gram embeddings) at 5.95GB VRAM, end-to-end on an RTX 4090.
  • Qwen3.8-27B (a dense multimodal model mixing Gated DeltaNet with Gated Attention, natively vision-capable) at 3.33GB VRAM, end-to-end on an RTX 3090, requiring transformers 5.8 or later.
  • Kimi K3 (2.8T) at 3.72GB VRAM, end-to-end on an RTX 6000 Ada.
  • DeepSeek-V3 (671B) at roughly 12GB VRAM.

The training side has figures too, from a September 2026 update: training Qwen3.8-Flash-Next (125B) stays under 6GB VRAM on an RTX 3060 Ti, and training Qwen3.8-27B takes roughly 2GB VRAM at sequence length 512.

Note that every one of those numbers is VRAM, not speed. The project publishes no tokens-per-second figure, and this article will not invent one.

Why 3.33GB Is Plausible

The Qwen3.8-27B row is the one worth thinking hardest about. A dense 27-billion-parameter model occupying 3.33GB means VRAM can barely hold the current layer. Three conditions make that work. First, weights stream in layer by layer, so the peak is roughly one layer. Second, the checkpoint must be split and written to disk in advance, which is an installation cost rather than an inference cost. Third, 3.33GB is a measured end-to-end peak, not an average, so the memory curve is jagged.

There is a companion requirement that is easy to miss. Qwen3.8-Flash-Next maps its n-gram table files into host memory, which calls for a machine with 64GB-class RAM; its checkpoint sits at roughly 360GB on disk, and after splitting you can reclaim the original with delete_original=True. VRAM was saved, and the bill for disk and host memory was simply reissued somewhere else.

Versions are a second lock. Qwen3.8-27B requires transformers 5.8 or newer; Qwen3.8-Flash-Next depends on the in-tree qwen4_exp support and needs transformers installed from source; Kimi K3 requires transformers 4.56.x. Three models, three version requirements, and a mismatch means the thing simply will not start.

The Kimi K3 Row: 2.8 Trillion Into 3.72GB

Kimi K3 is the most extreme case in the lineup. It totals 2.8 trillion parameters, activates roughly 104 billion per token (16 of 896 experts selected), and carries a 1M-token context window. AirLLM handles it not layer by layer but per-expert streaming: a mixture-of-experts structure routes each token through only a few experts, so the remaining thousand-plus stay parked on disk. Fitting 2.8T into 3.72GB costs one thing, and that is an enormous amount of disk reads per token.

Kimi K3's own license deserves a plain statement: it uses a modified MIT license, not the standard MIT text, so check the original LICENSE yourself before redistributing or using it commercially. The environment requirements are hard constraints as well. K3's model code forces flash attention, requiring compressed-tensors and flash-attn, plus a CUDA 12 build of torch, since flash-attn ships no prebuilt wheels for CUDA 13. And the realistic prerequisites should be spelled out: K3 launched in July 2026 and opened its full weights later that month, and holding 2.8 trillion parameters on a single node means a terabyte-scale disk bill. AirLLM pushes the VRAM requirement to 3.72GB, but not the storage requirement to zero. The phrase "2.8T runs in under 4GB" describes VRAM, not the whole machine.

The Honest Cost: Speed Is How This Bill Gets Paid

Every number above points at memory. Not one of them points at speed. That gap has to be closed explicitly.

First, this trades speed for VRAM. Layer-by-layer transfer means every forward pass reads weights from disk or host memory into VRAM, so PCIe bandwidth and memory bandwidth set token generation speed directly. On consumer hardware the resulting experience typically lands in the minutes-to-hours range per interaction, nowhere near what interactive dialogue feels like.

Second, the official numbers are memory, not speed. The README contains no tokens-per-second value, and no third party publishes an apples-to-apples benchmark, so any specific throughput figure you encounter is an extrapolation rather than a measurement.

Third, the ecosystem has real rough edges. The GitHub API shows 160 open issues on the repository right now. For a project sitting at 36,747 stars and still being pushed, that is a high number, and it says the matrix of versions, model adaptations, and hardware combinations forks far more widely than a single page of documentation suggests. Worth flagging separately: the repository's primary language on GitHub is Jupyter Notebook, not Python or C++. For an inference framework doing heavy computation, that usually means the core implementation lives in notebook-shaped examples and docs rather than a polished installable package, so treating it as a research tool rather than a production component is the more realistic frame.

Fourth, disk is the hidden threshold. Qwen3.8-Flash-Next needs roughly 360GB on disk, and Kimi K3 is a 2.8T-scale weight set, so terabyte-class storage is the real prerequisite. The "4GB of VRAM" figure sounds light; the storage cost behind it is not.## Training Support: Frozen Weights Stream Too

A September 2026 update carried the same idea to the training side: frozen weights still stream in layer by layer, while only the trainable adapter stays resident in VRAM. The README reports training a 125B model in under 6GB VRAM on an RTX 3060 Ti, and training a 27B model in roughly 2GB VRAM at sequence length 512.

That drops the hardware floor for fine-tuning considerably, but the boundary needs stating: this path applies to adapters and similar small trainable parameter sets, not to full-parameter training of a 2.8T model inside 6GB of VRAM. The frozen weights still have to stream off disk, so I/O pressure is unchanged.

Where It Sits in the Ecosystem

Boundaries against our existing coverage should be drawn clearly. We previously published a comparison of local LLM deployment tools (Local LLM Deployment Tools Compared), which pits Ollama, LM Studio, vLLM, llama.cpp, and GPT4All against each other. AirLLM changes the axis entirely: it asks which memory strategy to use when the model will not fit, not which tool to pick. The two read well back to back.

Placed in the full strategy map, AirLLM occupies the "smallest VRAM, slowest speed" end. The other end compresses the model until it fits, and the GGUF quantization route has the most mature ecosystem — installation and pitfall-avoidance live in our Ollama Local LLM Deployment SOP. Between the two sit CPU offload hybrids that keep some layers on the card and push the rest to host memory, with speed governed by PCIe and memory bandwidth; distillation into small models, trading away flagship capability; or simply calling a remote API, where the VRAM problem does not exist — a route covered in the hosted-API layer of our Qwen3.8-Flash-Next Three-Tier Deployment SOP.

If your goal is not "see if it runs" but a coding assistant you use daily, then model quality is the deciding factor, and our Local Coding Model Comparison covers selection. If you want to start at a specific scale, the Mellum 2.1 Local Deployment SOP and the LingBot World Small Local Deployment SOP walk through two different sizes end to end.

Who Should Use It

Three kinds of people fit. First, anyone who wants to touch a model far too large for their hardware, running it once just to see the output — evaluating an ultra-large model's reasoning quality, or processing one long document. Second, anyone doing runnability validation, needing to confirm on constrained hardware that a particular checkpoint loads and emits tokens. Third, anyone studying layer-wise streaming itself, for whom this implementation is excellent reference code.

Two kinds of people do not fit. Anyone needing per-token interaction, such as real-time conversation or interactive code completion. And anyone whose disk and host memory are also tight: AirLLM moves pressure from VRAM onto storage without conjuring resources from nothing. There is also a time threshold worth computing before you start. The first deployment downloads and splits a checkpoint; Qwen3.8-Flash-Next at roughly 360GB and K3 at terabyte scale means downloads measured in hours, and interrupted transfers are not rare.

FAQ

Q1: Is AirLLM a quantization scheme?

No. The README is explicit that it does not quantize, does not distill, and does not prune; weights load in their original precision, streamed from disk into VRAM layer by layer. Its memory numbers look better than quantized alternatives for one reason: the model itself was never compressed, so the entire cost moved to time.

Q2: What speed does the project actually report?

It does not. Every number in the README is VRAM usage — 3.33GB, 5.95GB, 3.72GB, roughly 12GB — and the training figures are memory rather than throughput as well. No third party publishes an apples-to-apples tokens-per-second benchmark either, so any specific throughput number is extrapolation, not measurement.

Q3: Can Kimi K3 run under AirLLM?

Yes. The README records a 3.72GB VRAM end-to-end measurement on an RTX 6000 Ada, using per-expert streaming with per-token routing. Keep in mind that Kimi K3 itself uses a modified MIT license rather than standard MIT, that it mandates flash attention, and that the environment needs a CUDA 12 build of torch plus transformers 4.56.x.

Q4: Why does it still fail after I follow the README exactly?

The most frequent cause is a version matrix mismatch: Qwen3.8-27B needs transformers 5.8 or newer, Qwen3.8-Flash-Next needs the in-tree qwen4_exp support from transformers (installed from source), and Kimi K3 needs 4.56.x plus compressed-tensors and flash-attn. Next most common is disk and host memory: checkpoints run to hundreds of gigabytes or terabytes, and the n-gram table mapping assumes 64GB-class host memory.

Q5: With AirLLM available, do I still need tools like Ollama?

The two routes solve different problems. AirLLM keeps the model intact without quality loss and pays in speed; the GGUF quantization route (Ollama, llama.cpp) compresses weights for memory and delivers usable speed with some quality loss, and its ecosystem is by far the most mature. Choose by scenario: use AirLLM to run a huge model once in a while, and a quantized solution for daily interaction.

Closing

AirLLM demonstrates one thing: when VRAM runs short, the third option is "slow." It converts large models from "must be resident in VRAM" to "take turns being resident, layer by layer," decoupling parameter count from memory requirement almost entirely. The project is still actively maintained, but 160 open issues and per-model version requirements show this path's engineering cost is real. If you try it, starting with the 3.33GB Qwen3.8-27B is more realistic than starting with 2.8T.

This article is AI-assisted and human-edited. Last updated: 2026-10-12

FAQ

Is AirLLM a quantization scheme?
No. The README is explicit that it does not quantize, does not distill, and does not prune; weights load in their original precision, streamed from disk into VRAM layer by layer. Its memory numbers look better than quantized alternatives for one reason: the model itself was never compressed, so the entire cost moved to time.
What speed does the project actually report?
It does not. Every number in the README is VRAM usage — 3.33GB, 5.95GB, 3.72GB, roughly 12GB — and the training figures are memory rather than throughput as well. No third party publishes an apples-to-apples tokens-per-second benchmark either, so any specific throughput number is extrapolation, not measurement.
Can Kimi K3 run under AirLLM?
Yes. The README records a 3.72GB VRAM end-to-end measurement on an RTX 6000 Ada, using per-expert streaming with per-token routing. Keep in mind that Kimi K3 itself uses a modified MIT license rather than standard MIT, that it mandates flash attention, and that the environment needs a CUDA 12 build of torch plus transformers 4.56.x.
Why does it still fail after I follow the README exactly?
The most frequent cause is a version matrix mismatch: Qwen3.8-27B needs transformers 5.8 or newer, Qwen3.8-Flash-Next needs the in-tree qwen4_exp support from transformers (installed from source), and Kimi K3 needs 4.56.x plus compressed-tensors and flash-attn. Next most common is disk and host memory: checkpoints run to hundreds of gigabytes or terabytes, and the n-gram table mapping assumes 64GB-class host memory.
With AirLLM available, do I still need tools like Ollama?
The two routes solve different problems. AirLLM keeps the model intact without quality loss and pays in speed; the GGUF quantization route (Ollama, llama.cpp) compresses weights for memory and delivers usable speed with some quality loss, and its ecosystem is by far the most mature. Choose by scenario: use AirLLM to run a huge model once in a while, and a quantized solution for daily interaction.

Related

Field SOP

Running 27B on 4GB VRAM: Disk, Not VRAM, Stops You First

A five-step SOP for layer-wise inference with airllm (October 12, 2026; figures are vendor self-reported): (1) respect the triple version lock - torch must be a CUDA 12 build (no prebuilt flash-attn wheel for CUDA 13), plus flash-attn, plus a transformers branch that depends on the model (4.56.x for Kimi K3, 5.8+ for Qwen3.8-27B, an in-tree qwen4_exp build for Flash-Next), verified with both nvidia-smi and torch.cuda.is_available(); (2) pick a tier from the README measurements - the most realistic entry point is Qwen3.8-27B at 3.33GB (RTX 3090); (3) the first run pays for the download (Flash-Next checkpoint around 360GB, K3 in the TB class), finish it once and keep the cache directory, and reclaim pre-split originals with delete_original=True; (4) watch VRAM peaks with nvidia-smi and manage expectations - layer-wise streaming moves far more bytes than it computes, the vendor publishes no tokens-per-second figure so none is invented here, and slow is the design, not a bug; (5) wire it into agent or API workflows: fine for one-shot task-shaped work, wrong for token-by-token interactivity; training takes a different path (frozen weights streamed layer by layer, adapters kept on GPU). Five dedicated trap sections: the version matrix, the hundred-GB-to-TB first download that stalls, the hidden disk and host-RAM gates (64GB-class RAM to start), structurally slow output, and K3's hard flash-attn plus CUDA 12 constraints. Repo: github.com/lyogavin/airllm (Apache-2.0).

Oct 12, 202610 min read
Hardcore Reviews

Half the VRAM, Nothing Runs: Five Ways Out

A five-way comparison of routes for running large models when VRAM runs short, arranged by fit rather than a ranking: (1) layer-wise streaming (airllm - no quantization, no pruning, weights move in layer by layer, smallest VRAM footprint and slowest tokens); (2) GGUF quantization (Ollama / llama.cpp / LM Studio, trading model fidelity for VRAM, lossy but by far the most mature ecosystem); (3) CPU offload hybrids (layers split between VRAM and system RAM, speed bounded by PCIe and memory bandwidth); (4) distillation or simply smaller models (least engineering effort, largest quality loss); (5) hosted APIs (no VRAM problem at all, cost moved per token to a provider). Five axes: VRAM footprint, speed, quality loss, deployment complexity, who it suits. Every airllm figure is README-sourced with hardware attached (27B 3.33GB on RTX 3090, Flash-Next 125B 5.95GB on RTX 4090, Kimi K3 2.8T 3.72GB on RTX 6000 Ada, DeepSeek-V3 671B around 12GB - all vendor self-reported, not reproduced here); no cross-route speed benchmarks, only qualitative placement, and no tokens-per-second number is invented where none exists; Kimi K3 is 2.8T total with 104B active across 16 of 896 experts per token, under a modified (not standard) MIT license. Division of labor with our deployment-tool comparison is explicit: that piece compares tools, this one compares memory strategies - the tool is what executes the strategy. The real question is not which method is strongest, but whether you are short on VRAM, short on RAM, or short on speed.

Oct 12, 202610 min read
Open Source

From 2% to 47%: JetBrains' RL Bet on Mellum2.1

JetBrains shipped Mellum2.1 on October 8, 2026 (HF verified via hf-mirror: ungated, Apache 2.0, early-stage 198 downloads/77 likes). Repo: huggingface.co/JetBrains/Mellum2.1-12B-A2.5B-Thinking. Architecture is identical to June's Mellum2 (12B MoE / 2.5B active / 131K context); what shipped is a training recipe - RL moved from a finishing stage to the main pipeline across millions of sandboxed runs in thousands of environments, with new math/competition/science/tool-use/software-engineering tasks and filtered sources. JetBrains self-reported benchmarks (Pi harness v0.73.1, thinking mode, no third-party rerun): SWE-bench Verified jumped 2.0 to 47.0, but Qwen3.5-9B sits at 50.0 - Qwen wins real-repo long tasks while Mellum wins LiveCodeBench v6 (82.0) and BFCL v4 (62.3); cite each vendor's own table, most figures exist only as charts. Speed: "almost twice Qwen3.5-9B throughput under heavy load on H200" is an official claim; the 1.6x single-request gain rides on MTP speculative decoding and the MTP head was not released with the weights (coming soon) - you cannot buy that speedup today; GGUF (llama.cpp/Ollama/LM Studio) is also coming soon. Deployment: vLLM supported today (reasoning-parser qwen3), BF16 weights around the 24GB class (estimate), no hosted API. Positioning: agent density on a fixed GPU budget with code that never leaves your servers - not a blanket Qwen beater.

Oct 10, 202610 min read