tracel-ai/burn

Burn is a next generation tensor library and Deep Learning Framework that doesn't compromise on flexibility, efficiency and portability.

What it solves

Burn addresses the brittle and lossy process of exporting models from Python-based training environments to production engines. It unifies training and inference into a single codebase, allowing the exact same code to be used for both, which simplifies on-device personalization and federated learning.

How it works

Burn is a tensor library and deep learning framework written in Rust. It uses a unified API to execute tensor operations across multiple platforms. To maintain performance without sacrificing flexibility, it JIT-compiles streams of tensor operations and performs automatic kernel fusion. It is designed for incremental compilation, ensuring that model changes recompile in under 5 seconds.

Who it’s for

It is designed for researchers and developers who want the speed and safety of Rust with a Python-like feedback loop, as well as teams looking to deploy models across diverse hardware, from embedded devices (no_std) to large GPU clusters and web browsers via WebAssembly.

Highlights

  • Multi-platform Backend Support: Supports CUDA, ROCm, Metal, Vulkan, WebGPU, and CPU backends.
  • Backend Decorators: Uses decorators to add functionality like autodifferentiation (Autodiff) and kernel fusion (Fusion) to any base backend.
  • Model Interop: Ability to import ONNX models as native Rust code and load weights from PyTorch or Safetensors.
  • Deployment Flexibility: Supports inference in the browser via WebAssembly and bare-metal embedded environments via no_std support.
  • Integrated Tooling: Includes a terminal UI dashboard for real-time training monitoring and a dedicated benchmarking suite.

Related

  • Project
  • Project
  • Project
  • Project
  • Project