Democratizing LLMs: Memory Mapping for Low-Resource Devices
This technique is crucial for running large models like LLaMA 2 13B or Mixtral 8x7B on systems with limited RAM (e.g., 6-8GB), extending `llama.cpp`'s reach to laptops, Raspberry Pis, and older CPUs without requiring a dedicated GPU, by leveraging the disk as an extension of RAM.
The top 3
- LLM RAM Reduction: Up to 75% Savings with Memory Mapping: Memory mapping combined with 4-bit quantization allows Large Language Models (LLMs) to run with significantly less RAM, reducing the memory footprint of a 7B parameter model from a typical 14GB down to 4GB, a saving of 70-75%. This also enables 100x faster model loading by avoiding unnecessary memory page copying.
- Lowest RAM Footprint: Running 7B LLMs on 4GB Devices: Memory mapping, particularly within `llama.cpp` using the GGUF model format and 4-bit quantization, has enabled 7B parameter LLMs to run with as little as 4-6GB of RAM. This makes models accessible on devices like older laptops, small servers, and even some Android devices or a 4GB Raspberry Pi.
- Top 3 LLMs Democratized by Memory Mapping: Llama, Mistral, Gemma: Memory mapping, especially through `llama.cpp` and its GGUF format, has significantly democratized access to powerful LLMs. Key models that became widely runnable on consumer hardware include Meta's Llama series (e.g., Llama 2 7B), Mistral 7B, and Google's Gemma 7B, among almost all open-source LLMs on Hugging Face.
Sources
Open the full topic