← Back to Leaderboard
Alyogavin

lyogavin/airllm

Disk-backed layer streaming for LLMs that won't fit in GPU memory

View on GitHub ↗
Engineering Health (Methodology)
A+ · 98/100
Maintenance Activity
● Updated yesterday
Latest Release
v4.0.1
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence20/20
License Clarity20/20
Local AIGPUAPI
Total Stars
★ 43,885
24h Growth
+43
7d Growth
+344
Forks
4,555

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

lyogavin/airllm Star History (2023-06-11 - 2026-12-04) ALL-TIME STAR HISTORY (2023-06 – 2026-12) +43.9k in 1272d · avg +35/day 46.3k 23.2k 0 2023-06-11: ★ 12023-09-02: ★ 8902023-11-25: ★ 1,1222024-02-17: ★ 2,2772024-05-04: ★ 2,8342024-07-27: ★ 3,1902024-10-19: ★ 4,2332025-01-04: ★ 5,1282025-03-29: ★ 5,3772025-06-14: ★ 5,4312025-09-06: ★ 5,5722025-11-29: ★ 6,1032026-02-14: ★ 10,8262026-05-09: ★ 17,1212026-07-25: ★ 23,6792026-10-17: ★ 38,9912026-12-04: ★ 43,885 ★ 43.9k 2023-06 2025-03 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

AirLLM is a Python inference library built around disk-backed execution. AutoModel.from_pretrained(...) takes a Hugging Face model ID or a local path and prepares per-layer shards. During each decode step, the runtime streams those layers through the GPU rather than keeping the full checkpoint resident. Weight residency is therefore driven by layer size rather than total checkpoint size, but runtime state such as the KV cache still needs memory.

The inference code and examples sit under air_llm/. Integration uses PyTorch tensors and a Transformers-style tokenizer and generate flow. The root manifest points Transformers at Git and lists bitsandbytes==0.39.0, which is relevant to optional weight compression. That root pin is not a substitute for checking the installed package and selected model together. profiling_mode exposes timings, while the documented prefetch option overlaps loading and compute only for AirLLMLlama2.

Key Capabilities & Differentiators

AutoModel provides a common loading entry point for examples spanning Llama, Qwen, ChatGLM, Baichuan, InternLM, and Mistral. Chat models use their tokenizer's chat template, and Transformers TextStreamer can surface tokens during generation. Example VRAM figures include ~4 GB for full-precision Llama 3.x 70B and ~12 GB for DeepSeek-V3. These are configuration-specific fit figures, not throughput guarantees or universal memory budgets.

Layer streaming works without quantization. Optional 4-bit or 8-bit blockwise compression reduces the amount of weight data read; in v4.0.1 it applies only to matrices, leaving one-dimensional tensors such as norm weights and biases unquantized. Streamed LoRA is a separate fine-tuning path for the supported Qwen variants: frozen base weights stream from disk, adapters stay on GPU, and the example scripts accept either plain-text training records or instruction pairs with loss applied only to the completion.

Trade-offs & Limitations

Choose AirLLM when running a specific checkpoint matters more than generation speed. GPU-resident runtimes avoid rereading weights at every decode step, so a smaller model or an acceptable quantized checkpoint that fits in VRAM is a better starting point for interactive or concurrent inference. AirLLM frees up VRAM at the cost of storage reads and weight transfers; compression can reduce bytes read, but it does not remove that per-step work. Streaming text makes progress visible, not faster.

Size the system with separate budgets for peak disk usage during conversion, host memory, GPU runtime state, and sustained read bandwidth. A low VRAM figure alone does not establish that the model fits the whole machine or meets latency targets. Benchmark with the actual checkpoint, prompt lengths, and expected concurrency. AirLLM is Apache-2.0, but checkpoint licenses and gated-access terms must be reviewed separately.

Hardware & Deployment Guide

Start with pip install airllm in a Python environment with PyTorch and a working GPU runtime for the chosen platform. Install a compatible bitsandbytes build if using compression. Local checkpoints avoid fetching model weights at startup; for gated Hugging Face downloads, pass hf_token. Initial conversion needs space for the original files and new shards. Use layer_shards_saving_path to place shards on an appropriately sized drive. Enable delete_original only if you are willing to remove the source copy. On macOS, the MLX and PyTorch path is Apple Silicon only and limited to LlamaForCausalLM and MistralForCausalLM.

v3.3.0 added Flash-Next streaming with its n-gram table mapped from a file on the host. v4.0.0 introduced streamed LoRA; the Flash-Next path needs a Transformers build that includes qwen4_exp. v4.0.1 corrected the NF4 free-space check to multiply by the estimated compressed size ratio (~0.28×), rather than divide by it. For a reproducible rollout, record the working package versions and model revision, then smoke-test both initial shard creation and generation before staging a large checkpoint.

Execution: Splits checkpoints into layer shards and streams weights during generation instead of keeping the full model in VRAM.
Compression: Optional 4-bit or 8-bit blockwise quantization targets weight matrices; v4.0.1 leaves one-dimensional tensors unquantized.
Model loading: AutoModel.from_pretrained accepts Hugging Face IDs and local paths; layer_shards_saving_path selects where converted shards go.
Profiling: profiling_mode reports timing; configurable prefetching is documented only for AirLLMLlama2.
Fine-tuning: Streamed LoRA keeps frozen base weights on disk and adapters on GPU, with example scripts for two Qwen variants.
Platform scope: The Apple Silicon path uses MLX and PyTorch and is limited to LlamaForCausalLM and MistralForCausalLM.
Best For

Local model evaluation and occasional generation on a single GPU when the required checkpoint exceeds VRAM and sufficient disk capacity and bandwidth are available.

Skip If

You need predictable interactive latency, sustained concurrent throughput, or a turnkey HTTP service, or an acceptable model already fits entirely in VRAM.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Local AIGPUAPI
pip install airllm

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
airllm ★43.9k+344Jupyter NotebookApache-2.0Disk-backed layer streaming for LLMs that won't fit in GPU memory
ollama189k+703GoMITGo-based LLM serving layer for local model management and inference
BitNet42.6k+106C++MITNative C++ kernels for running compatible 1.58-bit LLMs on local CPUs
nano-vllm16.7k+95PythonMITA compact vLLM-style Python engine for offline GPU batch inference

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/lyogavin/airllm.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

lyogavin/airllm Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about airllm

Is AirLLM a drop-in replacement for an HTTP inference server?

No. The integration path is the Python API: call AutoModel.from_pretrained with a Hugging Face model ID or a local checkpoint path, then use the tokenizer and generate. For chat models, apply the tokenizer's chat template. TextStreamer prints tokens as they arrive; it does not expose a network endpoint.

Does the ~4 GB figure for a 70B model tell me what hardware to buy?

No. The reported ~4 GB for Llama 3.x 70B is a VRAM figure, not a total system requirement. Budget disk space for the checkpoint and layer shards, host memory for staging, and GPU headroom for runtime state. Measure peak VRAM and decode time at your intended context length and output length before committing.

Can I use or redistribute AirLLM in a commercial self-hosted product?

AirLLM's Python code uses Apache-2.0, which permits commercial use and modification subject to its terms. Comply with the applicable license and notice obligations when redistributing it. Separately review the checkpoint's license and gated-access terms; AirLLM's license does not grant rights to model weights.

When should I use AirLLM instead of a quantized model that fits in VRAM?

If an acceptable model fits in VRAM, start with GPU-resident inference and compare quality and latency on your own prompts. AirLLM is most useful when a specific checkpoint cannot fit and you can tolerate slow decoding. Its optional 4-bit and 8-bit compression reduce the weight data read per step, but do not remove layer streaming.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining lyogavin/airllm? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature lyogavin/airllm on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare