talira

A Rust tensor library and deep learning framework for training and inference on any hardware.

open sourceMIT OR Apache-2.0self-hostablefree

Burn trains and runs neural networks in Rust with one API, so the code you train with is the code that ships, without exporting to another runtime. It keeps PyTorch-like dynamic graphs and shapes, but a just-in-time compiler streams tensor operations, fuses kernels automatically and auto-tunes them for the hardware. Its CubeCL backends run on CUDA, ROCm, Metal, Vulkan, WebGPU and the CPU through LLVM, and a pure-Rust Flex backend runs on Wasm and no_std; you can swap backends without changing model code, use several at once, and add autodiff, fusion or remote execution on top. ONNX models import as native Rust code, and weights load from PyTorch and Safetensors files. Model code recompiles in under 5 seconds, even in release mode. Made by Tracel.

Problems it solves

  • train and deploy a neural network in Rust without Python
  • exporting our PyTorch model to ONNX for production keeps breaking
  • run the same model on NVIDIA, AMD and Apple GPUs without rewriting it
  • run a deep learning model in the browser with WebGPU or Wasm
  • deep learning on an embedded device with no standard library
  • import an ONNX model into a Rust application
  • load PyTorch weights into a Rust model

Features

  • one API for training and inference
  • dynamic graphs and shapes
  • JIT compiler with automatic kernel fusion and autotuning
  • CubeCL backends: CUDA, ROCm, Metal, Vulkan, WebGPU and CPU
  • pure-Rust Flex backend for Wasm and no_std
  • swap or combine backends without changing model code
  • autodiff, fusion and remote-execution decorators
  • ONNX import as Rust code
  • load PyTorch and Safetensors weights
  • benchmarking tool
View 1 more
  • incremental compilation under 5 seconds

Limitations

  • The LibTorch backend was deprecated in 0.22 and removed from main.1

Capabilities

Has official SDKsplan not known

Alternatives

The same job

These do what Burn does.

  1. ort Fast ML inference & training for ONNX models in Rust
  2. candle Minimalist ML framework for Rust
  3. TensorFlow An Open Source Machine Learning Framework for Everyone
  4. PyTorch Tensors and dynamic neural networks in Python with strong GPU acceleration
  5. MLX An array framework for Apple silicon
  6. Keras Deep Learning for humans

Compare Burn with the top 3