Fastest AirLLM-style inference engine for consumer GPUs
Run 7Bβ70B+ LLMs on GPUs with as little as 4GB VRAM
Installation β’ Quick Start β’ Ollama / GGUF β’ CLI β’ How It Works β’ API Reference β’ Troubleshooting
AirCELA (Compute-Efficient Layer Architecture) is a high-performance AirLLM alternative that lets you run models far larger than your GPU VRAM by streaming one transformer layer at a time.
While AirLLM pioneered the concept, AirCELA takes it to the next level with Double-Buffer Prefetching and Zero-Copy Memory Mapping, reducing the I/O bottleneck by up to 80%.
| Feature | AirLLM | AirCELA |
|---|---|---|
| Streaming Style | Sequential | Asynchronous Double-Buffered |
| I/O Hiding | β (GPU waits for disk) | β (Prefetches while computing) |
| Disk Access | Standard I/O | Zero-Copy mmap |
| Attention | Standard | Flash Attention (cuDNN fused) |
| Model Support | HF only | HF + GGUF (Ollama) |
| Dequantization | Standard | Vectorized NumPy Kernels |
| CLI tool | β | β
(aircela chat, aircela bench) |
git clone https://github.com/gauravbatule/AirCELA.git
cd AirCELA
pip install -r requirements.txt
Note: This installs PyTorch, NumPy, transformers, huggingface_hub, safetensors, psutil, and accelerate.
pip install -e .
This gives you the aircela and cela commands system-wide. Without this step, you can still use python -m aircela.cli or the Python API directly.
The simplest way to start β downloads the model automatically:
# File: my_test.py
import sys
sys.path.insert(0, ".") # Only needed if you didn't pip install
from aircela import CELAEngine
# Load a model (downloads automatically on first run)
engine = CELAEngine.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
# Generate text β tokens stream one at a time
for token in engine.generate("What is the capital of France?", max_tokens=50):
print(token, end="", flush=True)
print()
Run it:
cd AirCELA
python my_test.py
Or use the included example:
python examples/basic_generation.py
AirCELA can directly load GGUF models you've already downloaded with Ollama.
ollama pull mistral-small:22b
# List available Ollama models on your system
python examples/ollama_inference.py
# Run a model (without tokenizer β outputs raw token IDs)
python examples/ollama_inference.py mistral-small:22b
# Run with a HuggingFace tokenizer for readable text
python examples/ollama_inference.py mistral-small:22b mistralai/Mistral-Small-Instruct-2409
import sys
sys.path.insert(0, ".")
from aircela import CELAEngine
# Load a GGUF model from Ollama or a direct file path
engine = CELAEngine.from_gguf(
"C:/Users/YourName/.ollama/models/blobs/sha256-<hash>",
tokenizer_id="mistralai/Mistral-Small-Instruct-2409" # optional
)
for token in engine.generate("Explain quantum computing.", max_tokens=100):
print(token, end="", flush=True)
print()
Tip: Run
python examples/ollama_inference.pywith no arguments to see all available Ollama models and their file paths.
Prerequisite: You must install AirCELA as a package first:
pip install -e .
aircela info β Show hardware infoaircela info
Shows your GPU name, VRAM, RAM, and compute capability.
aircela chat β Interactive chataircela chat -m "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
Options:
-m MODEL β HuggingFace model ID (required)-n NUM β Max tokens to generate (default: 200)-t TEMP β Temperature 0.0β1.0 (default: 0.7)In-chat commands: /quit, /clear, /reset
aircela run β Single prompt generationaircela run -m "TinyLlama/TinyLlama-1.1B-Chat-v1.0" -p "Tell me a joke"
Options:
-m MODEL β HuggingFace model ID (required)-p PROMPT β Input prompt (required)-n NUM β Max tokens (default: 100)-t TEMP β Temperature (default: 0.7)aircela bench β Benchmark hardwareaircela bench
Tests RAM bandwidth, GPU bandwidth, GEMM performance, and SSD read speed.
pip installIf you haven't installed the package, you can use the CLI via Python module:
python -m aircela.cli info
python -m aircela.cli chat -m "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
python -m aircela.cli bench
Token β Embed β [Layer 0 β Layer 1 β ... β Layer N] β Norm β LM Head β Token
β GPU β prefetch next β GPU
| Optimization | What It Does |
|---|---|
| Double-Buffer Prefetching | Loads next layer in background while GPU computes current one. Hides 90% of disk I/O latency. |
| Zero-Copy mmap | OS-level memory mapping for weight files. No redundant copies. |
| Fast GGUF Parser | mmap-based parser reads 12GB GGUF headers in <10ms by skipping tokenizer metadata. |
| Vectorized Dequantization | Q4_0/Q6_K dequant uses NumPy C-extensions, 100x faster than Python loops. |
| Flash Attention | PyTorch scaled_dot_product_attention for fused cuDNN kernels. |
| Lazy Module Loading | Heavy imports (torch, transformers) only load when actually needed. |
| Format | Status | Bits | Description |
|---|---|---|---|
| F32 | β | 32 | Full precision float |
| F16 | β | 16 | Half precision float |
| Q4_0 | β | 4 | 4-bit quantization (most common in Ollama) |
| Q4_1 | β | 4 | 4-bit with minimum offset |
| Q8_0 | β | 8 | 8-bit quantization |
| Q6_K | β | 6 | 6-bit K-quant (high quality) |
CELAEngine.from_pretrained(model_name)Load any HuggingFace model. Downloads and caches automatically.
from aircela import CELAEngine
engine = CELAEngine.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
CELAEngine.from_gguf(path, tokenizer_id=None)Load a GGUF model file (from Ollama or llama.cpp).
engine = CELAEngine.from_gguf("/path/to/model.gguf")
# Or with a tokenizer for readable text output:
engine = CELAEngine.from_gguf("/path/to/model.gguf", tokenizer_id="org/model-name")
engine.generate(prompt=..., input_ids=..., max_tokens=100, temperature=0.7, top_k=50, stream=True)Generate text. Yields tokens one by one when stream=True.
# From a text prompt (requires tokenizer)
for token in engine.generate("Hello!", max_tokens=50):
print(token, end="")
# From raw token IDs (no tokenizer needed)
import torch
ids = torch.tensor([[1, 4071, 28747]])
for tok in engine.generate(input_ids=ids, max_tokens=20):
print(tok, end=" ")
engine.reset()Clear KV caches to start a fresh conversation.
AirCELA/
βββ .github/
β βββ ISSUE_TEMPLATE/
β β βββ bug_report.md # Bug report template
β β βββ feature_request.md # Feature request template
β βββ PULL_REQUEST_TEMPLATE.md
βββ aircela/ # Main package
β βββ __init__.py # Lazy imports (fast startup)
β βββ engine.py # Core inference engine
β βββ transformer.py # Transformer layer (RoPE, GQA, Flash Attention)
β βββ prefetch.py # Double-buffer layer prefetcher
β βββ gguf.py # Fast GGUF parser (mmap-based)
β βββ quantize.py # Dequantization kernels (Q4_0, Q6_K, etc.)
β βββ huggingface.py # HuggingFace model loader
β βββ device.py # Hardware auto-detection
β βββ cli.py # Command-line interface
βββ examples/
β βββ basic_generation.py # HuggingFace model example
β βββ ollama_inference.py # Ollama/GGUF model example
βββ _legacy/ # Old prototypes (not part of the package)
βββ CONTRIBUTING.md # How to contribute
βββ CODE_OF_CONDUCT.md # Community standards
βββ SECURITY.md # Security policy
βββ CHANGELOG.md # Version history
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Package configuration
βββ LICENSE # CELA Proprietary License
βββ README.md # This file
Cause: PyTorch's first import can take 1β3 minutes on Windows due to CUDA detection and DLL loading.
Fix: This is a one-time cost per Python process. AirCELA uses lazy imports so the aircela package itself loads instantly β torch only loads when you actually call CELAEngine.
Speed it up:
Cause: GGUF models from Ollama don't include tokenizers.
Fix: Provide a HuggingFace tokenizer ID:
engine = CELAEngine.from_gguf("model.gguf", tokenizer_id="mistralai/Mistral-7B-v0.1")
Or use input_ids directly:
import torch
ids = torch.tensor([[1, 4071]])
for tok in engine.generate(input_ids=ids, max_tokens=20):
print(tok)
Cause: Large models (22B+) require significant RAM for dequantization.
Fix:
Cause: The model uses a quantization format AirCELA doesn't support yet.
Supported: F32, F16, Q4_0, Q4_1, Q8_0, Q6_K
We welcome contributions! See our community docs:
| Gaurav Batule | Creator & Lead Developer |
| AirCELA was built by Gaurav Batule to solve the problem of running large language models on consumer hardware. The engine's core architecture β layer streaming with double-buffer prefetching, native GGUF support, and automatic hardware optimization β was designed, developed, and validated by Gaurav. | |
| π LinkedIn β’ π GitHub β’ β Buy Me a Coffee | |
π€ Vibe Code Notice: Portions of this codebase were developed with AI assistance. All architecture decisions, core algorithms, testing, and validation were performed by Gaurav Batule.
CELA Proprietary License β See LICENSE
Contact: gauravbatule@gmail.com
Built with β€οΈ by Gaurav Batule
Making large LLMs accessible on consumer hardware
LinkedIn β’
GitHub β’
β Support
If AirCELA helped you, consider buying me a coffee!
9 commits
Python
100.0%
Fastest AirLLM-style inference engine for consumer GPUs
Run 7Bβ70B+ LLMs on GPUs with as little as 4GB VRAM
Installation β’ Quick Start β’ Ollama / GGUF β’ CLI β’ How It Works β’ API Reference β’ Troubleshooting
AirCELA (Compute-Efficient Layer Architecture) is a high-performance AirLLM alternative that lets you run models far larger than your GPU VRAM by streaming one transformer layer at a time.
While AirLLM pioneered the concept, AirCELA takes it to the next level with Double-Buffer Prefetching and Zero-Copy Memory Mapping, reducing the I/O bottleneck by up to 80%.
| Feature | AirLLM | AirCELA |
|---|---|---|
| Streaming Style | Sequential | Asynchronous Double-Buffered |
| I/O Hiding | β (GPU waits for disk) | β (Prefetches while computing) |
| Disk Access | Standard I/O | Zero-Copy mmap |
| Attention | Standard | Flash Attention (cuDNN fused) |
| Model Support | HF only | HF + GGUF (Ollama) |
| Dequantization | Standard | Vectorized NumPy Kernels |
| CLI tool | β | β
(aircela chat, aircela bench) |
git clone https://github.com/gauravbatule/AirCELA.git
cd AirCELA
pip install -r requirements.txt
Note: This installs PyTorch, NumPy, transformers, huggingface_hub, safetensors, psutil, and accelerate.
pip install -e .
This gives you the aircela and cela commands system-wide. Without this step, you can still use python -m aircela.cli or the Python API directly.
The simplest way to start β downloads the model automatically:
# File: my_test.py
import sys
sys.path.insert(0, ".") # Only needed if you didn't pip install
from aircela import CELAEngine
# Load a model (downloads automatically on first run)
engine = CELAEngine.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
# Generate text β tokens stream one at a time
for token in engine.generate("What is the capital of France?", max_tokens=50):
print(token, end="", flush=True)
print()
Run it:
cd AirCELA
python my_test.py
Or use the included example:
python examples/basic_generation.py
AirCELA can directly load GGUF models you've already downloaded with Ollama.
ollama pull mistral-small:22b
# List available Ollama models on your system
python examples/ollama_inference.py
# Run a model (without tokenizer β outputs raw token IDs)
python examples/ollama_inference.py mistral-small:22b
# Run with a HuggingFace tokenizer for readable text
python examples/ollama_inference.py mistral-small:22b mistralai/Mistral-Small-Instruct-2409
import sys
sys.path.insert(0, ".")
from aircela import CELAEngine
# Load a GGUF model from Ollama or a direct file path
engine = CELAEngine.from_gguf(
"C:/Users/YourName/.ollama/models/blobs/sha256-<hash>",
tokenizer_id="mistralai/Mistral-Small-Instruct-2409" # optional
)
for token in engine.generate("Explain quantum computing.", max_tokens=100):
print(token, end="", flush=True)
print()
Tip: Run
python examples/ollama_inference.pywith no arguments to see all available Ollama models and their file paths.
Prerequisite: You must install AirCELA as a package first:
pip install -e .
aircela info β Show hardware infoaircela info
Shows your GPU name, VRAM, RAM, and compute capability.
aircela chat β Interactive chataircela chat -m "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
Options:
-m MODEL β HuggingFace model ID (required)-n NUM β Max tokens to generate (default: 200)-t TEMP β Temperature 0.0β1.0 (default: 0.7)In-chat commands: /quit, /clear, /reset
aircela run β Single prompt generationaircela run -m "TinyLlama/TinyLlama-1.1B-Chat-v1.0" -p "Tell me a joke"
Options:
-m MODEL β HuggingFace model ID (required)-p PROMPT β Input prompt (required)-n NUM β Max tokens (default: 100)-t TEMP β Temperature (default: 0.7)aircela bench β Benchmark hardwareaircela bench
Tests RAM bandwidth, GPU bandwidth, GEMM performance, and SSD read speed.
pip installIf you haven't installed the package, you can use the CLI via Python module:
python -m aircela.cli info
python -m aircela.cli chat -m "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
python -m aircela.cli bench
Token β Embed β [Layer 0 β Layer 1 β ... β Layer N] β Norm β LM Head β Token
β GPU β prefetch next β GPU
| Optimization | What It Does |
|---|---|
| Double-Buffer Prefetching | Loads next layer in background while GPU computes current one. Hides 90% of disk I/O latency. |
| Zero-Copy mmap | OS-level memory mapping for weight files. No redundant copies. |
| Fast GGUF Parser | mmap-based parser reads 12GB GGUF headers in <10ms by skipping tokenizer metadata. |
| Vectorized Dequantization | Q4_0/Q6_K dequant uses NumPy C-extensions, 100x faster than Python loops. |
| Flash Attention | PyTorch scaled_dot_product_attention for fused cuDNN kernels. |
| Lazy Module Loading | Heavy imports (torch, transformers) only load when actually needed. |
| Format | Status | Bits | Description |
|---|---|---|---|
| F32 | β | 32 | Full precision float |
| F16 | β | 16 | Half precision float |
| Q4_0 | β | 4 | 4-bit quantization (most common in Ollama) |
| Q4_1 | β | 4 | 4-bit with minimum offset |
| Q8_0 | β | 8 | 8-bit quantization |
| Q6_K | β | 6 | 6-bit K-quant (high quality) |
CELAEngine.from_pretrained(model_name)Load any HuggingFace model. Downloads and caches automatically.
from aircela import CELAEngine
engine = CELAEngine.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
CELAEngine.from_gguf(path, tokenizer_id=None)Load a GGUF model file (from Ollama or llama.cpp).
engine = CELAEngine.from_gguf("/path/to/model.gguf")
# Or with a tokenizer for readable text output:
engine = CELAEngine.from_gguf("/path/to/model.gguf", tokenizer_id="org/model-name")
engine.generate(prompt=..., input_ids=..., max_tokens=100, temperature=0.7, top_k=50, stream=True)Generate text. Yields tokens one by one when stream=True.
# From a text prompt (requires tokenizer)
for token in engine.generate("Hello!", max_tokens=50):
print(token, end="")
# From raw token IDs (no tokenizer needed)
import torch
ids = torch.tensor([[1, 4071, 28747]])
for tok in engine.generate(input_ids=ids, max_tokens=20):
print(tok, end=" ")
engine.reset()Clear KV caches to start a fresh conversation.
AirCELA/
βββ .github/
β βββ ISSUE_TEMPLATE/
β β βββ bug_report.md # Bug report template
β β βββ feature_request.md # Feature request template
β βββ PULL_REQUEST_TEMPLATE.md
βββ aircela/ # Main package
β βββ __init__.py # Lazy imports (fast startup)
β βββ engine.py # Core inference engine
β βββ transformer.py # Transformer layer (RoPE, GQA, Flash Attention)
β βββ prefetch.py # Double-buffer layer prefetcher
β βββ gguf.py # Fast GGUF parser (mmap-based)
β βββ quantize.py # Dequantization kernels (Q4_0, Q6_K, etc.)
β βββ huggingface.py # HuggingFace model loader
β βββ device.py # Hardware auto-detection
β βββ cli.py # Command-line interface
βββ examples/
β βββ basic_generation.py # HuggingFace model example
β βββ ollama_inference.py # Ollama/GGUF model example
βββ _legacy/ # Old prototypes (not part of the package)
βββ CONTRIBUTING.md # How to contribute
βββ CODE_OF_CONDUCT.md # Community standards
βββ SECURITY.md # Security policy
βββ CHANGELOG.md # Version history
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Package configuration
βββ LICENSE # CELA Proprietary License
βββ README.md # This file
Cause: PyTorch's first import can take 1β3 minutes on Windows due to CUDA detection and DLL loading.
Fix: This is a one-time cost per Python process. AirCELA uses lazy imports so the aircela package itself loads instantly β torch only loads when you actually call CELAEngine.
Speed it up:
Cause: GGUF models from Ollama don't include tokenizers.
Fix: Provide a HuggingFace tokenizer ID:
engine = CELAEngine.from_gguf("model.gguf", tokenizer_id="mistralai/Mistral-7B-v0.1")
Or use input_ids directly:
import torch
ids = torch.tensor([[1, 4071]])
for tok in engine.generate(input_ids=ids, max_tokens=20):
print(tok)
Cause: Large models (22B+) require significant RAM for dequantization.
Fix:
Cause: The model uses a quantization format AirCELA doesn't support yet.
Supported: F32, F16, Q4_0, Q4_1, Q8_0, Q6_K
We welcome contributions! See our community docs:
| Gaurav Batule | Creator & Lead Developer |
| AirCELA was built by Gaurav Batule to solve the problem of running large language models on consumer hardware. The engine's core architecture β layer streaming with double-buffer prefetching, native GGUF support, and automatic hardware optimization β was designed, developed, and validated by Gaurav. | |
| π LinkedIn β’ π GitHub β’ β Buy Me a Coffee | |
π€ Vibe Code Notice: Portions of this codebase were developed with AI assistance. All architecture decisions, core algorithms, testing, and validation were performed by Gaurav Batule.
CELA Proprietary License β See LICENSE
Contact: gauravbatule@gmail.com
Built with β€οΈ by Gaurav Batule
Making large LLMs accessible on consumer hardware
LinkedIn β’
GitHub β’
β Support
If AirCELA helped you, consider buying me a coffee!
9 commits
Python
100.0%