lucasjinreal/Crane
A Pure Rust based LLM, VLM, VLA, TTS, OCR Inference Engine, powering by Candle & Rust. Alternate to your llama.cpp but much more simpler and cleaner..
Crane is a software framework for running AI models—especially large language models (LLMs)—quickly on your own computer. It's written in Rust and uses a library called Candle to make the math run fast on different types of hardware.
What it does:
- Speeds up AI inference – the process of getting a model to generate text, recognize speech, or read images. Crane claims to be faster than the popular PyTorch framework and simpler to use than llama.cpp.
- Works on many devices – it can run on a regular CPU, on NVIDIA graphics cards (CUDA), on Apple Silicon chips (Metal), and experimentally on AMD GPUs (ROCm).
- Supports many models out of the box – you can load and run models like Qwen (various versions), Gemma, Hunyuan, and others for tasks like chat, vision (image understanding), speech recognition (ASR), text-to-speech (TTS), and even music transcription.
- Provides an easy API – it includes a server that mimics OpenAI's API, so you can plug it into existing applications without much work.
Key advantages highlighted in the README:
- Blazing-fast inference – outperforms native PyTorch thanks to Candle's optimized kernels (the low-level math routines).
- Rust-powered – avoids C++ complexity while keeping native performance.
- Apple Silicon optimized – uses Metal for GPU acceleration on Macs.
- Hardware agnostic – one codebase runs on CPU, CUDA, Metal, and ROCm.
- OpenAI compatible – supports OpenAI and SGLang interfaces.
How to use it:
- You build the project with Cargo (Rust's build tool), choosing a feature flag for your hardware (e.g.,
--features cudafor NVIDIA). - There's a command-line chat tool (
chat_cli) and a server (crane-serve) that you can start with a model file. - The README includes a short Rust code example showing how to run a Qwen2.5 chat model end-to-end.
What it's not:
- It's not a low-level SDK; it's meant to be used out-of-the-box for common AI tasks.
In short, Crane is a high-performance, cross-platform inference engine that aims to make running AI models easy and fast, with support for many popular models and a simple API.
Related
- Project
- Project
- Project
- Project
- Project