lyogavin/airllm
AirLLM 70B inference with single 4GB GPU
What it solves
AirLLM allows users to run massive large language models (LLMs) on consumer-grade hardware with very limited VRAM. It eliminates the need for quantization, distillation, or pruning to fit huge models—such as Llama 3.1 405B or DeepSeek-V3 671B—onto single GPUs with as little as 4GB to 12GB of memory.
How it works
Instead of loading the entire model into GPU memory, AirLLM decomposes the model and streams it layer-by-layer. By keeping only one layer on the GPU at a time, the VRAM requirement is determined by the size of a single layer rather than the total model size. For sparse Mixture-of-Experts (MoE) models, it further optimizes this by streaming only the experts that a token actually routes to.
Who it’s for
Developers and researchers who want to run state-of-the-art, high-parameter LLMs on low-end commodity computers or single hobbyist GPU cards without sacrificing model precision.
Highlights
- Extreme Memory Efficiency: Run 70B models on 4GB VRAM and 671B models on ~12GB VRAM.
- Broad Model Support: Compatible with Llama, Qwen, DeepSeek, Mistral, Mixtral, Phi, Gemma, and Kimi K3.
- Wide Hardware Support: Works on Linux, Windows, and Apple Silicon (MacOS).
- Optional Speed-up: Supports block-wise quantization (4-bit or 8-bit) to reduce disk loading bottlenecks and increase inference speed by up to 3x.
- Simple Integration: Uses an
AutoModelclass that mimics the Hugging Face transformers API for easy adoption.
Related
- Dispatch
- Project
- Project
- Project
- Project