Burn
A Rust tensor library and deep learning framework that unifies training and inference in one codebase, JIT-compiling tensor operations with automatic kernel fusion across CUDA, ROCm, Metal, Vulkan and WebGPU.
Burn is both a tensor library and a deep learning framework for numerical computing, training and inference. Rather than training a model in Python and exporting it to a separate production format such as ONNX, a step that is often brittle, Burn runs the same code used for training directly in production across multiple hardware platforms through one unified API.
It keeps the dynamic shapes and graphs of a PyTorch-like programming style, but JIT-compiles streams of tensor operations with automatic kernel fusion, so dynamic graphs do not cost the usual performance penalty. Incremental compilation keeps edit-compile-run cycles under five seconds even in release mode, addressing Rust's usual slow build times for research work.
Burn is the core of a wider open-source Rust AI ecosystem: CubeCL is the GPU compute language and compiler behind its accelerated backends, targeting CUDA, ROCm, Metal, Vulkan and WebGPU from Rust kernels written once; burn-onnx imports ONNX models as native Rust code; burn-store loads and saves model weights, including PyTorch and Safetensors formats; and burn-vision, burn-rl and burn-dataset add computer vision, reinforcement learning and dataset-loading building blocks. It is released under the Apache 2.0 license.