cd /news/artificial-intelligence/introducing-vahana-run-moe-models-bi… · home › topics › artificial-intelligence › article
[ARTICLE · art-178198] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Introducing Vahana: run MoE models bigger than your GPU, with the same bits on every device

A developer released Vahana, an Apache-2.0 open-source inference engine that runs Mixture-of-Experts models larger than available GPU memory by keeping attention and hot experts on the GPU while offloading the rest to RAM or disk. Vahana fixes the arithmetic order across C++ (AVX-512, AVX2, NEON, scalar) and Triton kernels so the same request produces bit-identical tokens and logits regardless of device, batch neighbours or padding, and it ships a `vahana verify` command that recomputes every token's logits on CPU and passes only on an exact match. On a 4 GB RTX 3050 Ti laptop it runs Qwen3-30B-A3B 4-bit, and on a server it serves DeepSeek-Coder-V2 236B at 7.49 tok/s within a 16 GB GPU budget, with exactness costing +1.8% per decode step.

key takeaway

Fixing the dot-product reduction order (16 fp32 FMA lanes, fixed reduction tree, bf16 rounding at the same points) across CPU and Triton kernels makes MoE outputs bit-identical across devices and batch sizes at a cost of +1.8% per decode step.

by read4 min views6 publishedNov 29, 2026

My 4 GB laptop GPU runs a 30-billion-parameter model faster than llama.cpp, and the same laptop's CPU can check every answer bit for bit. This post introduces the engine that does it: Vahana, open source under Apache-2.0.

Real output, unedited, waits sped up: Qwen3-30B 4-bit answers on the laptop's RTX 3050 Ti (4 GB) and writes a receipt; then vahana verify recomputes every token's logits on the CPU and says PASS.

Mixture-of-Experts models like Qwen3-30B-A3B, Mixtral or DeepSeek-V2 are huge on disk but only use a few experts per token. That makes them a good fit for ordinary hardware: keep attention and the most-used experts on the GPU, and the rest in RAM or on disk.

The catch is that once a model is split across a GPU and a CPU, the arithmetic is split too. GPU kernels and CPU kernels add numbers in different orders, so they round differently, and the output depends on where each expert happened to run. The same is true of batching: in most engines, a request's output changes with the requests batched around it (I measured this in my previous post).

Vahana's answer to both is the same: fix the arithmetic, everywhere.

The same request gives bit-identical tokens and logits regardless of:

Not "close". The same bits. Every rule in the next section exists to make that true.

Every dot product follows one rule: 16 fp32 FMA lanes accumulate in ascending order, a fixed reduction tree combines them, and bf16 rounding happens at the same points. That rule is implemented identically in C++ (AVX-512, AVX2, NEON, scalar) and in Triton for NVIDIA GPUs, so an expert gives the same bits on either device. Kernels reduce each row in an order that depends only on that row, so batch neighbours and padding can't move a rounding.

For 4-bit checkpoints, the product of a 4-bit weight and its group scale is exact in fp32, so the same rule carries over unchanged.

Because the bits don't depend on the machine, an answer can be checked by anyone with the same weights:

vahana run    models/Qwen3-30B-A3B-w4a16 --prompt "..." --receipt answer.json
vahana verify answer.json --model models/Qwen3-30B-A3B-w4a16 --device cpu   # PASS or FAIL

A receipt records the prompt's token ids, the decoding settings, a fingerprint of the weights, the output tokens, and a SHA-256 of every step's logits. vahana verify recomputes all of it in one teacher-forced pass and passes only on an exact match. There is no tolerance. In the GIF, 48 tokens of Qwen3-30B check in 8.3 s on the laptop CPU.

Against llama.cpp (b12494, Q4_K_M) on the same machines, each engine at its own tuned best setting, alternating runs:

Quality, against the bf16 original on WikiText-2: the 4-bit checkpoint Vahana runs has a mean KL divergence of 0.065, vs 0.093 for Q4_K_M (both scored with llama.cpp's own statistics).

On a server: DeepSeek-Coder-V2 236B (438 GB) runs at 7.49 tok/s with a 16 GB GPU budget, and Qwen3-30B-A3B serves 64 requests at once at 130 tok/s aggregate, with every response bit-identical to running it alone. On the GPU, exactness costs +1.8% per decode step.

Every number above comes from a pre-registered experiment in the repo, including the bars it missed. The sources: docs/benchmarks.md, experiments/v15_decode, experiments/v15_quality, and the one-command reproduction in experiments/reproduce.

18 MoE families pass the exactness selftest. Real checkpoints are validated for Mixtral, DeepSeek-V2 (Lite and 236B), Qwen1.5-MoE, Qwen3-MoE, Qwen3.5-MoE and OLMoE; DeepSeek-V3, GLM-4-MoE, MiniMax-M2, gpt-oss (bf16 experts) and others are validated on the real architecture with tiny weights. Not yet supported: MXFP4 and FP8 checkpoints, Llama 4, DBRX. One NVIDIA GPU or none; Macs run on the CPU.

pip install torch "vahana[gpu]"     # omit [gpu] without an NVIDIA GPU
vahana selftest                     # does this machine give the reference bits?
hf download allenai/OLMoE-1B-7B-0924 --local-dir models/OLMoE-1B-7B-0924
vahana run models/OLMoE-1B-7B-0924 --prompt "The capital of France is" --max-tokens 16 --receipt answer.json
vahana verify answer.json --model models/OLMoE-1B-7B-0924 --device cpu

There's also an OpenAI-compatible server (vahana serve ... --slots 32) with continuous batching, where every response equals the same request run alone.

Run it on your machine and tell me what you get, especially where it loses. Speed numbers from other GPUs and CPUs, models that fail to load, and receipts that don't verify across machines are all exactly the reports I want.

pip install vahana Next posts: how the CPU and GPU kernels are made to agree bit for bit, and how the expert cache fits a 30B model in 4 GB.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @vahana 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/introducing-vahana-r…] indexed:0 read:4min 2026-11-29 · —