Open-source · C++20 · CPU · GGUF

MemVanta — Low-Memory CPU LLM Inference for GGUF

A memory-first C++ LLM inference runtime for quantized GGUF models on CPUs with limited RAM. MemVanta uses mmap-backed model access, paged KV cache, Q4/Q8 kernels, and bounded adaptive prefetching.

47.54% lower peak RSS in the published OpenLLaMA 7B v2 Q4_0 same-model CPU A/B test: 3.80 GiB for MemVanta vs 7.24 GiB for pinned llama.cpp. llama.cpp is substantially faster in this test.

OpenLLaMA 7B memory benchmark vs llama.cpp

3.80 GiB
MemVanta peak RSS
7.24 GiB
pinned llama.cpp peak RSS
47.54%
peak-RSS reduction in this test
MetricMemVantapinned llama.cpp
OpenLLaMA 7B v2 Q4_0 peak RSS3.80 GiB7.24 GiB
Prompt processing2.70 tok/s12.82 tok/s
Token generation1.81 tok/s8.03 tok/s

Results are scoped to the tested model, settings, host, and pinned comparison runtime. Read the benchmark interpretation · Raw evidence

Run your first GGUF model

Build the project, then use memvanta_real for trained-model text generation with a supported Llama-family GGUF file.

git clone https://github.com/sauravsingla/MemVanta.git
cd MemVanta
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j

./build/memvanta_real \
  --model /path/to/model.gguf \
  --prompt "Hello from MemVanta" \
  --n 64 --threads 4 --ctx 2048 --temperature 0

memvanta_real is the text-generation CLI. memvanta run <file> is a separate mapped streaming/cache telemetry path.

Memory-efficient GGUF inference on CPU

MemVanta is built for local AI, edge systems, and constrained machines where resident memory is a primary bottleneck. The project focuses on a transparent memory/performance trade-off rather than claiming throughput leadership.

Learn how the low-memory design works or explore the runtime architecture.

Current model support

Trained-model execution currently supports GGUF models with general.architecture=llama. The GGUF parser also validates pinned Qwen2 files, but Qwen2 inference is not implemented.

MemVanta is an active research prototype with trained-model evidence up to 7B. Independent reproduction is welcome.

Evidence and reproducibility

Published benchmark numbers are generated from machine-readable repository evidence. The methodology requires matched model artifacts and workloads, a pinned comparison runtime, repeated runs, and throughput reporting alongside memory.