Candle

Candle

โ˜… 4.2 ๐Ÿ”– 100 saves ๐Ÿ’ฐ Freemium GitHub

Candle is Hugging Face’s minimalist machine learning framework for Rust. It has become one of the most-starred Rust ML projects on GitHub with more than 21,000 stars, has trended repeatedly over the years, and remains actively maintained with updates in October 2026 under the Apache-2.0 license.

Overview

Rust developers historically had to leave their ecosystem to do serious machine learning. Candle changes that with a lean, PyTorch-flavored tensor framework written entirely in Rust. It focuses on inference performance and simplicity: small binaries, easy deployment, and backends for CPU, CUDA, and Apple Metal. Its example collection shows production-shaped implementations of popular models, including large language models like Llama, speech models like Whisper, and image models like Stable Diffusion, which makes Candle a practical way to ship ML features inside Rust applications and serverless functions.

Key Features

  • Pure-Rust tensor framework with a familiar, PyTorch-like API
  • CPU, CUDA, and Metal backends for flexible deployment
  • Ready-made examples for LLMs, Whisper, Stable Diffusion, and more
  • Lightweight binaries suited to serverless and edge deployments
  • Support for common model formats used across the HF ecosystem
  • WebAssembly demos showing models running in the browser
  • Backed by Hugging Face and a large contributor community

The codebase is organized into focused crates: a core tensor library, neural-network building blocks, and a transformers crate with ready implementations of well-known architectures. That structure keeps the framework hackable; researchers can read a model implementation end to end in ordinary Rust instead of untangling a monolith. Candle deliberately emphasizes inference and simplicity over being a full training platform, which keeps its surface area small and its behavior predictable. It powers many of Hugging Face’s lightweight demos and has become a foundation for Rust-based ML tooling, from local LLM runners to embedded inference in larger applications.

๐Ÿ’ณ Pricing

Candle is free and open source under the Apache-2.0 license. There are no fees or paid editions; you bring your own compute.

Who Is It For

Candle is for Rust developers and platform teams who want to embed fast ML inference directly in Rust services, CLIs, and edge deployments without depending on Python or heavyweight external runtimes.

๐Ÿš€ Visit Candle Official Site

๐Ÿšฉ Report an issue