Hanzo ML
A fast, multi-backend tensor and machine-learning framework for Rust — the compute substrate behind Hanzo inference.
Backends
One tensor API across CPU (SIMD / MKL / Accelerate), CUDA — including unified/managed memory for NVIDIA GB10 / DGX Spark — Metal (Apple Silicon), Vulkan, and ROCm (AMD RDNA3.5 APUs).
Features
- Quantization — the full GGUF/GGML zoo (Q/K, legacy, IQ1–4, TQ) plus GPTQ / AWQ / AFQ / MXFP4, much of it bit-exact and GPU-resident.
- Multimodal — text, vision, audio, and 3D.
- WebAssembly — run models in the browser.
- Rust-native — memory-safe, zero-cost abstractions; pairs with Hanzo Engine for serving.
Quick start
use ;
let device = Cpu; // or Device::new_cuda(0)?, Device::new_metal(0)?
let a = randn?;
let b = randn?;
println!; // Tensor[[2, 4], f32]
See the repository for examples, the guide book, and the model zoo.
Derived from candle and rebuilt for the Hanzo stack. Dual-licensed MIT / Apache-2.0.
Models and weights: huggingface.co/hanzoai · huggingface.co/zenlm.