Latest AI news

Home  /  Open Source  /  ExLlamaV2: Fast Low‑VRAM LLM Inference on Consumer GPUs

ExLlamaV2: Fast Low‑VRAM LLM Inference on Consumer GPUs

ExLlamaV2 is an inference library that lets you run LLaMA‑2 and other open‑source LLMs on consumer‑class GPUs with as little as 8 GB VRAM, using paged attention, dynamic batching and EXL2 quantization to achieve high token‑per‑second rates.

By AI Decodes Editorial  ·  Published  ·  Last verified 27 November 2026

Diagram showing a GPU handling low‑VRAM LLM inference.
ExLlamaV2 enables high‑throughput inference on consumer GPUs.

What core features does ExLlamaV2 provide?

  • Supports Flash‑Attention 2.5.7+ with paged attention, reducing VRAM overhead.
  • Dynamic generator combines single‑step, batched and speculative decoding into one API.
  • Smart prompt caching and K/V cache deduplication lower memory reuse.
  • Works with 4‑bit GPTQ and EXL2 quantization (2‑8 bits per weight), allowing mixed‑precision models.
  • Includes a console chatbot, TabbyAPI server and ExUI web UI.
  • Benchmarks show up to 205 t/s on an RTX 4090 for 7B LLaMA‑2 EXL2 models.

ExLlamaV2 GitHub repository

Which hardware and system setup are required?

  • NVIDIA GPU with CUDA support; minimal VRAM ≈ 8 GB for 7B models, more for larger models.
  • CUDA Toolkit installed.
  • Linux (gcc) or Windows (Visual Studio Build Tools).
  • Compatible PyTorch version (matching CUDA).
  • At least 16 GB system RAM is recommended for large models.

See the repo’s README for exact CUDA and PyTorch compatibility tables.

Block diagram of ExLlamaV2 components.
Core modules that reduce VRAM usage.

How do I quickly install and run ExLlamaV2?

  1. Clone the repo and install dependencies:

git clone https://github.com/turboderp/exllamav2 cd exllamav2 pip install -r requirements.txt pip install.

  1. Optionally skip the C++ extension compile (first run will build it later):

EXLLAMA_NOCOMPILE= pip install.

  1. Or install a pre‑built wheel matching your CUDA/Python version:

pip install https://github.com/turboderp/exllamav2/releases/download/v0.0.12/exllamav2-0.0.12+cu121-cp311-cp311-linux_x86_64.whl

  1. Run the test script:

python test_inference.py -m <path_to_model> -p "Once upon a time,"

  1. Start the sample chatbot:

python examples/chat.py -m <path_to_model> -mode llama -gs auto

  1. For an API server, launch TabbyAPI (FastAPI) and connect any OpenAI‑compatible client.

Full documentation is in the repo’s wiki.

Who should use ExLlamaV2 and who might skip it?

  • Use it if you have a mid‑range GPU (8‑12 GB VRAM) and need fast inference or fine‑tuning of LLaMA‑2 without moving to cloud services.
  • Skip it if you are on older GPUs without CUDA, need out‑of‑the‑box Windows binaries, or prefer a pure‑Python runtime with no compilation steps.
  • Developers comfortable with building C++ extensions and managing PyTorch versions will benefit most.

Related reading: /tools/lm-studio-local-ai-review/

What are three open‑source low‑VRAM alternatives?

  1. llama.cpp – C/C++ inference library that runs on CPU and GPU with ggml quantization (4‑bit, 8‑bit). No CUDA required, but GPU speed is lower than ExLlamaV2. llama.cpp GitHub
  2. exllama (original) – Earlier memory‑efficient rewrite of Hugging Face Transformers for quantized LLaMA models. Lacks Flash‑Attention and dynamic batching introduced in V2. exllama GitHub
  3. text‑generation‑webui – Framework that supports multiple backends, including ExLlamaV2, llama.cpp and others, offering a unified UI but relying on the underlying runtime’s capabilities.

Each alternative trades off speed, VRAM usage and ease of installation differently.

Menus and names can change as products update. If a step looks different, check the product's own help page.

Frequently asked questions

Can ExLlamaV2 run LLaMA‑2 70B on an 8 GB GPU?
No, the 70B model requires more than 8 GB VRAM; ExLlamaV2 can run it on higher‑end GPUs (e.g., RTX 4090) with paging enabled.

Do I need to compile the C++ extension on every run?
Only the first time you use the JIT install; the compiled extension is cached in ~/.cache/torch_extensions for subsequent runs.

Is the repository still actively maintained?
The ExLlamaV2 repo is archived; development has moved to ExLlamaV3, but the current version remains usable.

How does EXL2 quantization differ from GPTQ?
EXL2 supports mixed‑precision (2‑8 bits) per layer and can apply different bit‑widths within a single linear layer, offering finer control over bitrate and error.