pegainfer-project/pegainfer

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

What it solves

PegaInfer provides a high-performance, production-ready way to serve Large Language Models (LLMs) without relying on a Python runtime or PyTorch. It is designed to minimize overhead and maximize efficiency by using a specialized Rust-based architecture that gives each model full control over its own scheduling and hardware execution.

How it works

The system uses an OpenAI-compatible API, allowing you to connect standard tools to your model. Internally, it separates the frontend (which handles requests and chat templates) from the model-specific engines. Each model manages its own state, kernels, and scheduling logic, while sharing common infrastructure for GPU memory and key-value (KV) caching. This modular approach allows for optimized execution tailored to specific model architectures.

Who it’s for

This project is for developers and engineers who need to deploy LLMs in production environments where performance, low memory footprint, and fast startup times are critical. It is best suited for users comfortable with Rust and CUDA environments who want to move away from Python-heavy inference stacks.

Highlights

  • No Python/PyTorch dependency: Built entirely in Rust for better performance and lower resource usage.
  • OpenAI-compatible API: Easily integrate with existing applications using standard API endpoints.
  • Model-specific optimization: Each supported model has its own dedicated scheduler and kernel implementation for maximum efficiency.
  • Production-ready features: Supports advanced capabilities like tensor parallelism, prefix caching, and KV offloading.
  • Fast startup: Significantly lower memory usage and faster cold-start times compared to traditional Python-based inference servers.

Related

  • Project
  • Project
  • Project
  • Project
  • Project