AirLLM: Run very large language models on a small GPU
Added · Updated
Made by Gavin Li
View profile on GitHub (opens in a new tab)Load a big open language model from Hugging Face and generate text on a GPU with only a few GB of memory.
For Python users without large hardware.
What it does
A language model is built from many stacked layers. Instead of loading the whole model into GPU memory (VRAM), AirLLM first splits it into separate layers saved on disk, then loads and runs them one at a time. The creators say this lets 70B models run on a single 4GB GPU without quantization, distillation or pruning (common ways of shrinking a model), and report runs of DeepSeek V3 (671B) in 12GB. An optional 4-bit or 8-bit compression setting trades a little accuracy for speed.
How to use it
Input → action → output: in Python, call AutoModel.from_pretrained with a Hugging Face model ID or a local path, turn your prompt into tokens with the model's tokenizer, and call generate. You get the model's text reply back, the same way as with a regular Transformers model. Gated models need a Hugging Face token.
Common use cases
- Pass a Hugging Face model ID and a question such as the capital of the United States, and print the model's short text answer.
- Try a model far larger than your GPU memory on one consumer graphics card to compare its answers with a smaller model.
- Fine-tune adapters on a large Qwen model with the training example scripts while the frozen base weights stream from disk.
Can I use this?
Requirements Run pip install airllm. Some newer models need extra packages or a specific transformers version listed in the source. Make sure the Hugging Face cache folder has room for the split model; delete_original can remove the original download afterwards. Apache-2.0 licensed, so it is open source.
Caveat Memory figures are the creators' own measurements on specific GPUs. The creators say reading layers from disk is the main bottleneck, and the source gives no generation speed figures.
Worth knowing Generation speed is not documented. Splitting a model needs large disk space, up to about 360GB for one model. On macOS only Llama-style models run for now.
Why it's here
Not trending this week
Last seen on the GitHub trending list on 30 October 2026. It stays on BuildTube so you can still find it.
- 41,968 people have starred it on GitHub.
Numbers checked on 8 November 2026; not refreshed since.
Behind it
View sourceBuildTube has not run or verified this project. Everything above is written from what the creator published.
Made this?
Quick questions
- What is AirLLM?
- A language model is built from many stacked layers.
- What can I use AirLLM for?
- Pass a Hugging Face model ID and a question such as the capital of the United States, and print the model's short text answer; Try a model far larger than your GPU memory on one consumer graphics card to compare its answers with a smaller model; Fine-tune adapters on a large Qwen model with the training example scripts while the frozen base weights stream from disk
- Can I run AirLLM on my computer?
- Yes. AirLLM is a Python library you install with pip and use inside your own code. It needs a GPU (the creators also list CPU and Apple silicon support) and a lot of free disk space, up to about 360GB for one model.
- What do I need to use AirLLM?
- Python and pip install airllm, a GPU (the creators also list CPU and Apple silicon support) and a lot of free disk space, since each model is split into layers on disk first.
- What license does AirLLM use?
- Apache-2.0 licensed, so it is open source.
More from this week
- kimi-k3-in-c Run a 2.78-trillion-parameter model on 8 GB of RAM
Get text answers from the huge Kimi K3 AI model using one CPU and no graphics card.
- P-H3-Image-Comfy Make and edit 8-megapixel images in ComfyUI
Turn short text requests into 8-megapixel images and edit pictures on your own graphics card.
- Astryx Build React app screens from ready-made accessible components
Build React app interfaces with 150+ ready-made components and themes.
Explore by topic
Post this
Download share imageFor makers
Made this? Show it’s on BuildTube — add the badge to your README or embed the card on your site.
README badge (Markdown)
[](https://buildtube.app/p/gh-lyogavin-airllm/)Embed card (HTML)
<iframe src="https://buildtube.app/embed/gh-lyogavin-airllm/" width="560" height="240" style="border:0;max-width:100%" loading="lazy" title="AirLLM on BuildTube"></iframe>