Inference Engine.
Built in Rust.

A fast, memory-safe LLM engine built in pure Rust for high-throughput local model deployments.

Start Building View Benchmarks GitHub Repository
$ git clone https://github.com/Kem0wow/rustylm.git
$ cd rustylm
$ cargo build --release

High Performance Core

No garbage collection pauses, optimized matrix operations.

High Throughput

Written from scratch in idiomatic Rust with SIMD vectorization and zero runtime allocations during generation.

Memory Safety

Guaranteed safety at compile-time via Rust's borrow checker. No data races or buffer overflows under high concurrency.

CUDA & CPU Support

Native support for NVIDIA CUDA GPU acceleration and CPU SIMD native instructions.

VRAM Offloading

Dynamic VRAM capping via RUSTYLM_VRAM_CAP balances weights between VRAM and system memory.

Frequently Asked Questions

Everything you need to know about RustyLM engine.

Which model formats and architectures are supported?
RustyLM loads Hugging Face model directories directly containing config.json + tokenizer.json + *.safetensors. Supports Qwen2/2.5, Llama, and Gemma family checkpoints in f32, f16, and bf16 precision. Architecture and chat templates are automatically detected from config.json.
How does VRAM capping (`RUSTYLM_VRAM_CAP`) work?
Set RUSTYLM_VRAM_CAP=800 (in MiB) to limit how much GPU VRAM RustyLM consumes. Any remaining layers are offloaded to system RAM and executed by CPU SIMD threads.
What hardware backends can I run on?
RustyLM runs on CPU (with SIMD acceleration) and NVIDIA GPUs (with CUDA acceleration). Use -d auto, --cuda, or --cpu flags to select your backend.
Is RustyLM free and open source?
Yes. RustyLM is released under the permissive MIT License for open-source and commercial use.