Model or dataset
pegainfer-project/pegainfer avatar
pegainfer-project/pegainfer

PegaInfer: A Rust and CUDA Inference Server With No Python in the Serving Path

Pure Rust + CUDA LLM inference engine — no PyTorch, OpenAI-compatible, serves Qwen3 to Kimi-K2

698 stars107 forksRustApache-2.0

At a glance

What is it?
PegaInfer serves Qwen3 through an OpenAI-compatible API from a single Rust process with hand-written CUDA kernels, and the README's own numbers put its idle footprint at 771 MB against 3814 MB for a vLLM 0.24.0 process tree on the same RTX 5090. The trade is a narrow model matrix and a build step that still reaches for Python on some model lines.
Who is it for?
Adopt PegaInfer if you are serving Qwen3-4B or Qwen3-8B on a single compute capability 8.x to 12.x NVIDIA card with driver 580 or newer and you want an OpenAI-compatible endpoint without a Python runtime in the serving path. Do not adopt it as a general-purpose multi-model gateway: the README states that each model owns its own scheduler, state, and kernels, and the release history so far is two versions, with v0.1.0 shipping under the name OpenInfer.
Can I use it commercially?
Yes. Apache-2.0 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 5 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 PegaInfer Removes From the Serving Path

Most open source LLM servers inherit a build and launch path that includes a Python interpreter, a tensor framework, and a graph compilation step. PegaInfer's README states the project's position in one line: no PyTorch or Python runtime. The server is a Rust binary that talks to CUDA and cuBLAS directly, and the Qwen3 build is documented as needing no Python at all. The audience is narrow and specific. It is the engineer who has a fixed set of checkpoints, a known GPU, and a reason to care what the process looks like at rest: memory that is not shared with a Python heap, a startup that does not wait on a compile cache, and a deployment artifact that is one executable rather than an environment. The README's own comparison on a single RTX 5090 with Qwen3-4B in BF16 at TP1 reports 771 MB resident when loaded and idle for PegaInfer revision 70888b2, against 3814 MB for a vLLM 0.24.0 process tree serving the same model, with cold startup to HTTP ready at 2.99 s versus 70.0 s and warm startup at roughly 3.0 s versus 32.7 s. Those figures come from the project's own report and are a single snapshot on one card, so treat them as a claim to reproduce rather than a settled result. Anyone without a GPU in that class is not the target user.

One Scheduler Per Model, Shared Serving and KV Infrastructure

PegaInfer's architecture is stated in a single sentence in the README: each model owns its scheduler, state, and kernels, while serving and KV infrastructure are shared. That is an unusual split and it explains most of the project's other properties. The shared layer is what the OpenAI-compatible HTTP surface sits on, along with the KV cache machinery, which the repository topics describe as paged attention. The per-model layer is where the real work lives: a scheduler tuned to that model's attention pattern, its own state handling, and its own CUDA kernels. The practical consequence is that the model crates are not plugins over a common compute graph. They are separate implementations that happen to share a request path. The README's performance section names dense, hybrid-attention, and MoE models as distinct categories with separate benchmark panels, and the model list spans Qwen3, Qwen3.5, Gemma 4, GLM-5.2, DeepSeek, and Kimi-K2. A mixture-of-experts model and a dense 4B model do not exercise the same kernels or the same memory movement, so writing them as separate crates is a defensible reading of that constraint. It also means the maintenance surface grows with each model line rather than staying flat.

Installing the Qwen3-Only Binary and Its Hardware Floor

The fastest path is the prebuilt binary, and the README is explicit about what it contains. The Qwen3-only release bundles CUDA 13 and cuBLAS and requires Linux x86_64, an NVIDIA GPU with compute capability 8.x through 12.x, driver 580 or newer, glibc 2.35 or newer, and OpenSSL 3. Weights are not included. The install command is a curl pipe to bash against install.sh on the main branch, and PEGAINFER_VERSION selects an exact version if you do not want the latest. After downloading Qwen3-4B into models/Qwen3-4B, the server starts with pegainfer --model-path models/Qwen3-4B and listens on port 8000. If the binary lands outside your path, the README gives export PATH="$HOME/.local/bin:$PATH". Note the version boundary: the prebuilt release pins CUDA 13 and driver 580, while a source build of the default Qwen3 configuration has a lower documented floor of R545 and CUDA 12.3. If your fleet sits on an older driver, the prebuilt path is closed to you and you are building from source.

Building From Source, and Where Python Still Appears

The source build uses the toolchain pinned in rust-toolchain.toml, a CUDA Toolkit providing nvcc and cuBLAS, and a compatible driver. From the repository root with the checkpoint downloaded, the README's sequence is export CUDA_HOME=/usr/local/cuda followed by cargo run --release -- --model-path models/Qwen3-4B. The --release flag is called out as mandatory for GPU builds, which is worth taking literally: a debug build of a CUDA inference engine is not a meaningful test of anything. The server entrypoint is pegainfer-server, and on Windows the documented invocation is cargo run --release -p pegainfer-server with CUDA_PATH set to the toolkit directory. Four environment variables are documented: CUDA_HOME, PEGAINFER_CUDA_SM for setting the target architecture when detection fails, PEGAINFER_TRITON_PYTHON for Qwen3.5, and PEGAINFER_TILELANG_PYTHON for K3 kernel generation. That last pair is the interesting part. The no-Python claim applies to the serving runtime, not to every build. Qwen3.5 uses Triton AOT kernels and needs Python and Triton at build time, with the README showing a uv venv, a uv pip install triton, and PEGAINFER_TRITON_PYTHON pointed at the virtualenv interpreter. On Windows the same line uses triton-windows<3.7. K3 TileLang kernel generation is a separate build-time Python dependency again.

The Model Matrix Is the Cost of the Per-Model Scheduler Design

The strongest argument against PegaInfer as a default choice is the shape of its own documentation. The prebuilt binary covers Qwen3 only. Qwen3.5 needs a feature flag, a Python build dependency, and a different checkpoint. Other model lines, in the README's words, have their own hardware and build requirements and should be followed through the model guides. There is no single configuration that turns on everything. This is the direct cost of giving each model its own scheduler and kernels: the porting work is per model, and the release artifact reflects that. A team that needs to serve whatever checkpoint the product team picked this quarter will spend its time on build plumbing. A second limitation is the hardware floor. Compute capability 8.x to 12.x excludes older data center parts, and the prebuilt path additionally demands driver 580 or newer, which is a recent driver line. A third is version maturity. The release history shows v0.1.0 in June 2026 under the name OpenInfer and v0.1.1 in August 2026 under the current name, with the most recent push in September 2026. Two releases and a rename are not a stability record, and the README's advice to run cargo run --release -- --help for the compiled-in CLI suggests the flag surface is still moving.

PegaInfer Versus vLLM: Two Different Bets About Where Complexity Lives

The README benchmarks PegaInfer against vLLM 0.24.0 directly, which makes the comparison concrete rather than rhetorical. The difference in approach is where each project puts its abstraction. vLLM is a Python serving stack built around a common execution and scheduling layer, with model support added through that layer and hardware coverage broadened through the same path. PegaInfer inverts it: the shared surface is thin, and each model gets a dedicated Rust implementation and hand-written kernels. The claimed payoff shows up in the numbers the README reports for a small dense model on one consumer card, where the absence of a Python process and a compilation step is most visible. The cost shows up in breadth. A model that has no PegaInfer crate is not a configuration problem, it is a porting project. That makes the choice less about raw throughput than about your checkpoint list. If it is short and stable, the per-model work has already been done for you. If it is long or changes often, vLLM's model coverage is the feature you are actually buying, and the memory and startup figures are the price of it.

Maintenance, Releases, and the Apache-2.0 Boundary

PegaInfer is licensed Apache-2.0, which permits commercial use, modification, and redistribution provided the licence and notice requirements are met, and it includes a patent grant. That is the permissive end of the spectrum and removes the licensing question from most adoption decisions. This is not legal advice; read the LICENSE file and your own counsel's guidance before shipping. The maintenance picture is harder to assess from the material available. The repository is not archived, the last push is September 2026, and there are two releases. The project runs a Slack community and publishes an engineering blog at pegainfer.org, and the README links benchmark reports that record revision hashes such as ffb959c4, e7a41975, ea02a9f7, and 70888b2. That habit of pinning measurements to revisions is a good sign for reproducibility. What cannot be confirmed from the supplied material is the cadence of kernel updates, how quickly a new checkpoint gets a crate, or how much of the per-model code is shared versus duplicated. Upgrade cost is therefore the open question. Because each model crate carries its own kernels, a CUDA toolkit bump or a driver change can require revalidation per model rather than once, and the README's separate driver floors for the prebuilt binary and the source build mean those two paths can diverge.

Editorial conclusion

Adopt PegaInfer if you are serving Qwen3-4B or Qwen3-8B on a single compute capability 8.x to 12.x NVIDIA card with driver 580 or newer and you want an OpenAI-compatible endpoint without a Python runtime in the serving path. Do not adopt it as a general-purpose multi-model gateway: the README states that each model owns its own scheduler, state, and kernels, and the release history so far is two versions, with v0.1.0 shipping under the name OpenInfer. Before committing, verify the exact command-line flags with cargo run --release -- --help, since the README defers to the compiled-in CLI, and confirm that your target checkpoint has a model guide under docs/models, because the prebuilt Qwen3-only release bundles CUDA 13 and will not cover the Qwen3.5, Gemma 4, or GLM-5.2 paths.

Official sources

  1. License: Apache-2.0
  2. pegainfer-project/pegainfer on GitHub
  3. Project website
  4. README
  5. Releases
Community notes

Community notes