Quantifying mmap's Impact: 100x Faster Load, Half the RAM

The adoption of `mmap()` in `llama.cpp` led to dramatic performance gains, enabling LLaMA models to load up to 100 times faster on Linux and 10 times faster on Windows/macOS, while also reducing memory usage by half. This efficiency allows users to safely load models twice as large and run multiple `llama.cpp` processes concurrently, as `MAP_SHARED` ensures read-only weights are shared, using only one physical copy of the model across instances.

Sources

Open the full topic