xInfer: Pure-Rust LLM Inference Without a Python Runtime
Blazing-fast LLM inference in pure Rust. No PyTorch and Python runtime.
At a glance
- What is it?
- xInfer is an MIT-licensed Rust inference server that targets CUDA, Metal and legacy GPUs, with OpenAI and Anthropic compatible APIs and a 2 to 4 bit KV cache called TurboQuant. The interesting part is the deployment shape, not the benchmark table.
- Who is it for?
- Adopt xInfer if you are deploying on hardware you already own, especially V100 or other SM70-class cards, and you want a single binary with an OpenAI-compatible endpoint rather than a Python service tree. Do not adopt it if you need a model architecture outside the README list, or if your team cannot absorb a fast release cadence on a project whose core scheduling logic is under 5000 lines.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 6 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The Python runtime is the thing xInfer removes
Most self-hosted LLM serving stacks carry a Python process, a PyTorch install, and a set of CUDA Python bindings underneath the scheduler. That chain is what makes a container image large, what makes a driver upgrade risky, and what makes a deployment on an older GPU a research project. xInfer's README states the goal directly: pure Rust backend, no PyTorch, no CUDA Python bindings. The scheduling and attention logic is described as under 5000 lines of Rust, which is a claim about auditability as much as about speed. A team that has to review what runs on a production box can read that much code. It is aimed at people who already own GPUs and want to serve models on them without maintaining a Python environment, and at operators who want one binary that behaves the same on Linux CUDA, Windows CUDA and macOS Metal. The supported model list is broad but finite: LLaMa, Qwen2 and Qwen3 plus MoE variants, Mistral, GLM4 and GLM4 MoE, DeepSeek V3/R1/V3.2/V4, Phi3 and Phi4, Gemma3 and Gemma4, Qwen3-VL, and MiroThinker. If your model is not on that list, nothing else in this article matters.
What actually sits between the request and the tokens
The README names the mechanisms rather than describing an architecture diagram: native Flash Attention, FlashInfer, CUDA Graphs, continuous batching, prefix caching, and PD disaggregation. Those are the standard components of a modern serving engine, and their presence tells you what the request path looks like. Continuous batching means the scheduler admits new sequences into a running batch instead of waiting for the batch to drain. Prefix caching means shared prompt prefixes are not recomputed per request. CUDA Graphs mean the decode step is captured as a graph and replayed, which removes per-token launch overhead. PD disaggregation splits prefill and decode across separate workers, which is a deployment topology decision rather than a flag you flip casually. On top of that sits TurboQuant, the KV cache compression path. The README describes it as a Walsh-Hadamard transform rotation followed by per-head absmax quantization, producing a 2 to 4 bit cache. The rotation spreads outliers across the head dimension before the absmax step, which is the usual reason this transform appears in low-bit quantisation work. The claimed effect is a 3.7x to 4.7x context extension depending on the setting, and the table gives concrete numbers: a Qwen3.6-27B FP8 model with a 7 GB KV budget goes from 112k tokens at BF16 to 434k at turbo4. A separate path, ISQ, quantises weights on the fly at load time, including a 2-bit W2 mode that re-packs MXFP4 routed experts for DeepSeek V4.
Getting a server up: the commands in the README
There are two install paths and both are single commands. The first pipes an install script from the project's GitHub Pages site: curl -sSL https://guoqingbao.github.io/xinfer/install.sh | bash. The second is npm install -g xinfer-ai. Note what the first one is: a remote shell script executed directly. That is normal for this category and still worth reading before you pipe it. Once installed, the binary is xinfer. Serving a model from HuggingFace looks like xinfer --m Qwen/Qwen3.6-27B-FP8 --kvcache-dtype turbo4 --ui-server, and a local path with explicit device selection looks like xinfer --m /home/Qwen3.6-35B-A3B --d 0,1 --ui-server. The --d flag takes a comma-separated device list, so --d 0,1 is tensor parallelism across two GPUs. --kvcache-dtype accepts fp8, turbo8, turbo4 or turbo3, with no flag meaning BF16. --ui-server turns on the built-in chat interface, which the README says listens on port 8001, while the OpenAI-compatible API base URL is http://IP:8000/v1/. Speculative decoding has two forms. If the model ships MTP heads, add --num-speculative-tokens 3. If you have a separate draft model, add --draft-model with an id or path and raise --num-speculative-tokens to 7. There is also a Python entry point for people who want one: python3 -m xinfer.server with the same flags, or python3 -m xinfer.chat.
TurboQuant is a memory trade, and the README does not price it fully
The compression table is the most concrete thing in the repository and also the place where the documentation is thinnest. It gives compression ratios (1x, 2x, 2.6x, 3.7x, 4.7x) and a quality column that reads baseline, near-lossless, 79 to 100 percent throughput, best balance, and max compression. Only one of those five entries is a quantitative quality statement, and it is about throughput rather than accuracy. The README says turbo4 extends context with minimal quality loss, but minimal is not a number, and no perplexity or task-accuracy figure appears in the material available here. The GPU requirement column is more useful: fp8, turbo8 and turbo4 need SM70 or newer, or an Apple M1 or newer, while turbo3 is listed as SM70+ with no Apple entry. That means the most aggressive setting is the one with the narrowest hardware support, which is the opposite of what you might assume. The second thing the table does not address is decode cost. Reading a 4-bit KV cache requires dequantisation on every attention step, and the README's own quality column hints at this for turbo8 with a throughput range as wide as 79 to 100 percent. Treat the context extension numbers as an upper bound on what you can fit, not as a promise about what you can serve at a given latency.
V100 support is the genuinely unusual part
The README claims first-ever NVFP4 plus low-bit KV cache on V100, with coherent output on legacy GPUs and no hardware FP4 requirement. The benchmark table backs this up with a specific entry: Qwen3-30B-A3B in NVFP4 decoding at 72.86 tokens per second on a V100 using what the table calls Software FP4, against 197.29 tokens per second for the same model on an RTX 5090. That is a roughly 2.7x gap, and it is the honest cost of emulating FP4 on hardware that does not have it. It also means the V100 result is real rather than aspirational, which matters because V100s are cheap and plentiful and most modern serving stacks have quietly dropped them. The same pattern appears for GLM4.7 Flash at 79 tokens per second on Hopper with software FP4, and for MiniMax-M2.5 at 64.50 tokens per second on Hopper with TP=2. If your fleet is older hardware and your alternative is buying new cards, that entry is the reason to read further. If you already run Hopper or newer, the software FP4 path is not for you; you want the hardware path and the higher numbers.
Where xInfer is the wrong choice
The release cadence is the first constraint. Versions v0.14.3, v0.14.4 and v0.14.5 landed on 14 August, 20 August and 9 September 2026, which is roughly one release every two to three weeks at the 0.x stage. The README's supported model list includes architectures dated well past the point where most serving engines have caught up, which is consistent with a project that moves fast to track new models. Fast is good if you need the newest architecture on day one. It is bad if you need a frozen artifact with a long support window, because a 0.x version series carries no compatibility promise and the API surface here is a CLI plus an HTTP endpoint, both of which can change between minor versions. The second constraint is the model list itself. It is long but it is a list, and anything not on it is unsupported rather than untested. The third is that the quality claims for low-bit KV cache are not quantified in the available material, so a workload that is sensitive to long-context recall should not assume turbo4 is free. The fourth is the install script. Piping a remote script into bash is convenient and it is also the least auditable part of an otherwise auditable project.
The alternative you are actually choosing between
The obvious comparison is vLLM, which the repository lists as a topic. The difference is not primarily speed; it is what has to be installed. vLLM is a Python project built on PyTorch, which means a Python runtime, a PyTorch build matched to your CUDA version, and the usual dependency resolution when any of those move. xInfer replaces that with a single Rust binary and, optionally, a PyO3 wheel described as lightweight for when you need a Python entry point. The second difference is hardware reach. vLLM's practical floor is newer GPUs with working FP8 and FP4 paths; xInfer explicitly targets V100 with software FP4 and lists SM70 as the floor for its low-bit KV modes. The third difference is scope. vLLM carries a much wider model zoo and a larger ecosystem of integrations, and if your model is not in xInfer's list, that settles the question immediately. The fourth is the KV cache. TurboQuant is specific to this project, and the README's claim of running 30B-plus MoE models with millions of context on a single 24 or 32 GB GPU is not something you get by default elsewhere. If you are on modern hardware, running mainstream architectures, and already comfortable with Python packaging, vLLM is the lower-risk choice. If you are on V100s, or you want to avoid the Python stack entirely, xInfer is the one addressing your problem.
Maintenance cost, licence, and what to check before you commit
The licence is MIT, which is permissive and imposes no copyleft obligation on your own code. It also means there is no patent grant clause of the kind Apache 2.0 includes, and no contributor licence agreement structure to lean on. That is a factual difference, not a recommendation; whether it matters depends on your legal posture, and this is not legal advice. On maintenance, the material supports a few concrete observations. The project is not archived and last received a push on 9 September 2026, the same day as the v0.14.5 release. Releases arrive every two to three weeks. The core is described as under 5000 lines of Rust, which caps how much code you would ever have to read to understand a regression, but the surrounding surface (CUDA kernels, Metal backend, quantization paths, the Web UI, MCP tool calling, embedding and tokenizer endpoints) is much larger than that number suggests. Upgrading means re-testing the flags you depend on, particularly --kvcache-dtype, since the quality and hardware columns differ per setting and the project is still at 0.x. The first thing to verify is whether your model appears in the supported list. The second is whether the quantisation format you plan to serve is one of Safetensors, GGUF or ISQ. The third is whether turbo4 output quality holds on your own evaluation set, because the README gives compression ratios but no accuracy figures. Establish those three before you build anything on top of the server.
Editorial conclusion
Adopt xInfer if you are deploying on hardware you already own, especially V100 or other SM70-class cards, and you want a single binary with an OpenAI-compatible endpoint rather than a Python service tree. Do not adopt it if you need a model architecture outside the README list, or if your team cannot absorb a fast release cadence on a project whose core scheduling logic is under 5000 lines. Before committing, verify three things yourself: that your exact model architecture appears in the supported list, that the quantisation format you intend to serve is one of Safetensors, GGUF or ISQ, and that the TurboQuant quality numbers hold for your task rather than for the benchmark table. The install script at guoqingbao.github.io/xinfer/install.sh is the fastest way to establish the first two.
Community notes