Vahana: Bit-Exact Mixture-of-Experts Inference Across CPUs and GPUs
The same language model, given the same prompt and the same sampling seed, usually produces different logits on different hardware, and often different tokens. The cause is ordinary floating-point arithmetic: reductions are evaluated in an order that depends on the processor, the kernel library, the batch size and the degree of parallelism. We describe Vahana, an open-source inference engine for Mixture-of-Experts (MoE) language models that removes this dependence. Every operation in the forward pass is defined by a single canonical arithmetic, built only from correctly rounded IEEE-754 operations in a fixed order, and each CPU and GPU backend implements that definition exactly. Sampling uses a counter-based generator and an exponential written in basic operations, so a seeded sample is also hardware-independent. On a laptop CPU, a 4 GB laptop GPU, a server CPU and an NVIDIA H100, Vahana produces identical logits, identical token log-probabilities for six MoE families, and identical per-question results for an unmodified lm-evaluation-harness run. Because the output is a pure function of the weights, prompt and settings, an answer can be accompanied by a compact receipt that anyone can re-check on different hardware; for attention models the check costs one prefill pass. Exactness does not cost accuracy relative to standard bf16 inference, and on a laptop with a 4 GB GPU Vahana decodes a 30B-parameter MoE model 1.41x faster than llama.cpp. Code: https://github.com/vahana-ai/Vahana
Authors
- Aditya Sai Teja B (ORCID: https://orcid.org/0009-0002-5066-3374)
Institutions
- Indraprastha Institute of Information Technology Delhi (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-12-02
- DOI
- https://doi.org/10.5281/zenodo.24743665
- Primary Topic
- Numerical Methods and Algorithms
- Type
- preprint