||    _ __ __ _ _ __ _____   ____ _ _ __ ___  _ __     ||
 ||   | '__/ _` | '_ ` _ \ \ / / _` | '_ ` _ \| '_ \    ||
 ||:  | | | (_| | | | | | \ V / (_| | | | | | | |_) |  :||
 ||   |_|  \__,_|_| |_| |_|\_/ \__,_|_| |_| |_| .__/    ||
 ||                                           |_|       ||

Run 26-30B MoE models in about 4 GB of RAM. No GPU required.

A Rust runtime that streams experts from NVMe. It runs Qwen3-30B-A3B on the CPU of a Linux x86_64 machine, at about 2.8 tokens per second on a DRAM-less QLC NVMe drive, trading speed for memory.

CI status License: MIT OR Apache-2.0 Latest release

Install the runtime

curl -sSL https://y0sif.github.io/ramvamp/install.sh | bash

Linux x86_64 only. Puts ramvamp and ramvamp-repack in /usr/local/bin, or ~/.local/bin without root or sudo. Re-run it later to upgrade. On any other platform it refuses and installs nothing, because io_uring is a Linux interface and the fast kernels are AVX2 plus F16C.

Then install a model

ramvamp-repack install --output ~/models/qwen3-30b-a3b.rvmp

This is a 17.35 GiB download, so the installer will not start it for you. It streams the source GGUF straight into the packed layout, so it needs 17.35 GiB free and not twice that. Put the path on an NVMe SSD.

Then run it

ramvamp chat --model ~/models/qwen3-30b-a3b.rvmp --tui

Or ramvamp serve for an OpenAI-compatible endpoint on loopback, with streaming SSE and tool calls.

Also available as a prebuilt tarball / from source

Speed and memory

Qwen3-30B-A3B Q4_K_M, cold page cache, inside a memory.max=4G cgroup with memory.swap.max=0, on the reference machine: Intel Core Ultra 9 185H, CPU only, Micron 2400 DRAM-less QLC NVMe, with the machine in ordinary use.

Decode about 2.8 tok/s 2.78 to 2.81 at context 512, 1.96 at context 3,961, on this DRAM-less QLC drive
Prefill about 25 tok/s at context 512, 18.2 at context 3,961
Peak memory 3,690 to 4,020 MiB cgroup memory.peak, of a 4,096 MiB ceiling, context 512 to 3,961
Model on disk 17.35 GiB about a 4.4x memory saving over loading it
Fidelity 1.04e-2 mean KL full-vocab, against llama.cpp on identical weights, top-1 agreement 8/8

Decode is I/O-bound: it reads up to about 1.1 GB of expert weights per token. Full table and conditions: docs/benchmarks.md.

How it works

Experts live on disk

In a fine-grained MoE model the routed experts are most of the weights, and a token needs 8 of the 128 in each layer. They stay in a page-aligned packed format on NVMe and are fetched only when the router asks.

Explicit reads, never mmap

Expert reads go through io_uring with O_DIRECT, batched per layer. That bypasses the page cache, so expert traffic costs the memory budget nothing. Demand paging is the alternative, and TurboFieldfare measured mmap 3.54x slower per cold expert read on its machine.

Common weights are read in once

Embeddings, attention, routers, norms and the lm_head are about 1,023 MiB, touched on every token, so they are read into anonymous memory at load, where a swap-off cgroup cannot reclaim them.

A small LFU cache

Nineteen slots per layer out of 128 experts at the default budget, absorbing about two thirds of requests. Hits dispatch immediately and hide the latency of the misses behind compute.

Install repacks, it does not convert

The GGUF is streamed into the packed layout in one pass. Quantized bytes are copied unchanged, nothing is requantized, and no shard is ever materialized in heap memory.

CPU-first kernels

AVX2 and FMA, with F16C for attention, detected at runtime, with one compute thread per physical performance core on a hybrid CPU. There is a scalar fallback, and it is slower.

An OpenAI-compatible server

ramvamp serve speaks /v1/chat/completions on loopback with streaming SSE, tool calls, and KV prefix reuse across requests. It refuses n above 1, a non-empty stop and a forced tool_choice with a 400, and ignores other fields (the list).

A context dial you can price

ramvamp plan costs a configuration before loading anything, and refuses an impossible one. Named profiles store a setup, such as a 32K context, under a name you pass to --profile.

What it needs

Component Requirement
OSLinux, x86_64
Kernel5.6 or newer, for io_uring reads. On 5.1 to 5.5 every expert read fails
CPUAny x86_64. AVX2, FMA and F16C are detected at runtime, with a scalar fallback
RAMAbout 4 GB for the default 4,096-token context, or 3 GB with a smaller expert cache (--cache-bytes 1440M). Larger contexts cost more and plan will tell you how much
Disk17.35 GiB free on an NVMe SSD. It runs on slower storage, well below these figures
GPUNone
Rust1.88 or newer, and only if you build from source. The prebuilt binary needs no toolchain
ModelQwen3-30B-A3B is the v0 model. The repacker accepts qwen3moe GGUFs and refuses anything else by name

FAQ

How does a 30B model fit in 4 GB of RAM?

Only 8 of 128 experts per layer are needed for a given token, so the common weights are read into memory once at about 1,023 MiB and the experts stay on disk, read on demand through a per-layer cache. Measured peak memory (cgroup memory.peak) is 3,690 to 4,020 MiB inside a 4,096 MiB ceiling.

How fast is ramvamp?

About 2.8 tokens per second of decode at context 512, and 1.96 at 3,961, on the reference machine's Micron 2400 DRAM-less QLC NVMe drive. Prefill is about 25 tok/s at context 512. Decode is I/O-bound, so a faster drive should raise it; by how much is unmeasured.

Do I need a GPU?

No, ramvamp runs on the CPU and has no GPU path. Its fast kernels use AVX2 and FMA, with F16C for attention, detected at runtime, and a scalar fallback runs without them.

Do I need an NVMe SSD?

Yes, for the published numbers. Decode reads up to about 1.1 GB of expert weights per token, so the drive sets the throughput. It runs on SATA or a spinning disk, far slower than any figure published here.

What do I have to download?

The runtime is one tarball holding two binaries, and the model is a separate 17.35 GiB download. ramvamp-repack install streams it straight into the packed layout, so it needs 17.35 GiB free rather than twice that. The installer prints that command and stops without starting the download.

Why Linux x86_64 only?

ramvamp's expert streamer is built on io_uring, a Linux kernel interface, and its fast kernels are AVX2 plus F16C, which is x86_64. On any other platform the installer refuses rather than ship a binary that would run only on fallback paths no published figure describes.

Is it finished?

It is a working early release for one model. Qwen3-30B-A3B generates coherent text on CPU inside a 4 GB cgroup with a cold page cache and passes every validation gate against llama.cpp on identical weights. The plan, including what is not done, is in docs/roadmap.md.

Documentation

install.mdRequirements, every repacker subcommand, building from source, and uninstalling
benchmarks.mdEvery published number, with its conditions and its drive
architecture.mdThe packed format, the streamer, the cache, the kernels
comparison.mdHow five related projects handle experts, and why explicit reads beat mmap
server.mdThe OpenAI-compatible surface, its routes and its refusals
configuration.mdProfiles, the context dial, and the precedence chain
roadmap.mdThe plan of record: what is done and what is open