Rai
Run 4-bit quantized large language models efficiently on CPU-only hardware using pure Rust.
Rai is a unique CPU-only LLM inference engine crafted entirely in Rust, designed to run 4-bit quantized language models with exceptional efficiency. It distinguishes itself by eschewing GPUs, Python runtimes, and heavyweight ML frameworks, opting instead for hand-written AVX2 kernels for all matrix multiplications. This lean architecture ensures a minimal dependency footprint, allowing users to load `.raimodel` files and generate text on any modern x86-64 laptop without requiring dedicated machine learning hardware. It features on-the-fly 4-bit weight dequantization within registers, a simple `.raimodel` format, and advanced techniques like speculative decoding, alongside a local HTTP chat server and a REST/MCP server for agent integration.