Lowest RAM Footprints: LLMs on Consumer Hardware with llama.cpp

llama.cpp enables running 7B parameter models with as little as 4-5GB of RAM and 13B models with 8-10GB, achieved through 4-bit quantization, making powerful LLMs accessible on consumer CPUs, laptops, and even devices like the Raspberry Pi.

The top 3

  1. Top 3 Quantization Levels for RAM Efficiency: For optimal RAM efficiency with llama.cpp, Q4_K_M offers the best balance, reducing model size by ~75% (e.g., 7B model uses ~5-6 GB RAM). Q5_K_M provides very good quality with ~65% size reduction (~6-7 GB for 7B), while Q6_K maintains near-original quality with ~55% size reduction.
  2. Least RAM Hungry LLMs on Consumer PCs via llama.cpp: Phi-3 Mini (3.8B parameters), when 4-bit quantized, can run with as little as 2.1GB VRAM or ~3GB system RAM. Mistral 7B (7.3B parameters) in Q4_K_M requires approximately 4.0-4.3 GB VRAM or ~4GB RAM. Llama 3 8B (8B parameters) in 4-bit quantization typically needs around 5-6 GB of VRAM or system RAM.
  3. Minimum RAM for Popular LLMs with llama.cpp: A 7B parameter LLM, when 4-bit quantized, can run on consumer hardware with approximately 4-5GB of RAM. Larger models like Llama 2 13B and Mixtral 8x7B can operate with 6-8GB RAM using `llama.cpp`'s optimizations.

Sources

Open the full topic