burn  by tracel-ai

Deep learning framework prioritizing flexibility, efficiency, and portability

Created 3 years ago
12,910 stars

Top 3.9% on SourcePulse

GitHubView on GitHub
Project Summary

Burn is a next-generation deep learning framework built in Rust, prioritizing flexibility, efficiency, and portability. It targets researchers and engineers seeking high performance across diverse hardware without the typical friction of Python-based frameworks, offering automatic optimizations and a robust backend system.

How It Works

Burn leverages Rust's ownership system for thread-safe building blocks and employs automatic kernel fusion to optimize computations dynamically, creating custom kernels that rival handcrafted GPU implementations. It features an asynchronous execution model for improved responsiveness and framework overhead reduction. Intelligent memory management, including memory pooling and in-place mutation tracking, further enhances efficiency.

Quick Start & Requirements

  • Install via cargo add burn.
  • Requires Rust toolchain.
  • For GPU acceleration, specific backend dependencies (CUDA, Metal, Vulkan, WGPU) are needed.
  • See The Burn Book for detailed guidance.

Highlighted Details

  • Automatic Kernel Fusion: Dynamically generates optimized kernels (e.g., WGSL for WGPU) for custom operations.
  • Backend Agnostic Design: Supports multiple backends (CUDA, ROCm, Metal, Vulkan, WGPU, NdArray, LibTorch, Candle) via a generic Backend trait.
  • Decorator Pattern: Backends can be enhanced with features like Autodiff and Fusion through composition.
  • no_std Support: Core components are compatible with bare-metal embedded environments (currently via NdArray backend).

Maintenance & Community

Licensing & Compatibility

  • Licensed under MIT and Apache 2.0.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

  • The project is in active development, with potential for breaking changes.
  • ONNX support is limited to a subset of operators.
  • WGPU backends may require increasing the Rust recursion limit (#![recursion_limit = "256"]).
  • Loading model records from versions older than 0.14.0 requires the record-backward-compat feature flag.
Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
117
Issues (30d)
55
Star History
324 stars in the last 30 days

Explore Similar Projects

Starred by Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory), Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), and
1 more.

VeOmni by ByteDance-Seed

3.4%
1k
Framework for scaling multimodal model training across accelerators
Created 5 months ago
Updated 3 weeks ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Pawel Garbacki Pawel Garbacki(Cofounder of Fireworks AI), and
11 more.

Liger-Kernel by linkedin

0.6%
6k
Triton kernels for efficient LLM training
Created 1 year ago
Updated 1 day ago
Starred by François Chollet François Chollet(Author of Keras; Cofounder of Ndea, ARC Prize), Chaoyu Yang Chaoyu Yang(Founder of Bento), and
13 more.

neon by NervanaSystems

0%
4k
Deep learning framework (discontinued)
Created 11 years ago
Updated 4 years ago
Feedback? Help us improve.