dfdx
candle
| dfdx | candle | |
|---|---|---|
| 22 | 27 | |
| 1,905 | 20,408 | |
| 0.0% | 1.4% | |
| 5.8 | 9.3 | |
| almost 2 years ago | 3 days ago | |
| Rust | Rust | |
| GNU General Public License v3.0 or later | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dfdx
- Shape Typing in Python
-
Candle: Torch Replacement in Rust
I keep checking the progress on dfdx for this reason. It does what I (and, I assume from context, you) want: Provides static checking of tensor shapes. Which is fantastic. Not quite as much inference as I'd like but I love getting compile-time errors that I forgot to transpose before a matmul.
It depends on the generic_const_exprs feature which is still, to quote, "highly experimental":
https://github.com/rust-lang/rust/issues/76560
Definitely not for production use, but it gives a flavor for where things can head in the medium term, and it's .. it's nice. You could imagine future type support allowing even more inference for some intermediate shapes, of course, but even what it has now is really nice. Like this cute little convnet example:
https://github.com/coreylowman/dfdx/blob/main/examples/night...
- Dfdx: Shape Checked Deep Learning in Rust
- Are there some machine or deep learning crates on Rust?
-
[Discussion] What crates would you like to see?
And for transformers, it's really early days for dfdx, but it's a library that aims to sit basically at the Pytorch level of abstraction, that the difference is it's not just coded in Rust, but it follows the Rust-y/functional-y philosophy of "if it compiles it runs".
-
rapl: Rank Polymorphic array library for Rust.
Wow that is super interesting. I actually tried to use GATs at first to be generic over shapes, but I couldn't do it, I'm sure it would be possible in the future though. There is this library dfdx that does something similar to what you mentioned, but it feels a little clumsy to me.
-
Announcing cudarc and fully GPU accelerated dfdx: ergonomic deep learning ENTIRELY in rust, now with CUDA support and tensors with mixed compile and runtime dimensions!
Awesome, I added an issue here https://github.com/coreylowman/dfdx/issues/597. We can discuss more there! The first step will just be adding the device and implementing tensor creation methods for it.
-
In which circumstances is C++ better than Rust?
The next release of dfdx includes a CUDA device and implements many ops. The same dev created a new crate, cudarc, for a wrapper around CUDA toolkit.
- This year I tried solving AoC using Rust, here are my impressions coming from Python!
-
Deep Learning in Rust: Burn 0.4.0 released and plans for 2023
A question I have is: what are the philosophical/design differences with dfdx? As someone who's played around with dfdx and only skimmed the README of burn, it seems like dfdx leans into Rust's type system/type inference for compile time checking of as much as is possible to check at compile time. I wonder if you've gotten a chance to look at dfdx and would like to outline what you think the differences are. Thanks!
candle
-
How RAG Applications in Rust Achieve Sub-Second Response Times
The Candle framework from Hugging Face became our foundation. Unlike PyTorch, Candle runs inference without Python overhead. Combined with the ONNX Runtime bindings for Rust, we could execute our Gemma-3 embedding model directly on CPU with SIMD optimisations that Python simply cannot match.
-
Ask HN: What are you working on? (Jan 2026)
Was getting annoyed having to work out which video call platform to use for intro meetings, so I’m currently working on https://simplevc.blazingbanana.com.
It’s a private, simple browser video chat. No accounts. You can create a new chat or join via link/code. It also has in browser transcription using Whisper (using https://github.com/huggingface/candle/).
Currently fighting getting background blur to work smoothly on Chrome on Android, which is proving surprisingly harder than getting browser transcription working...
Also still working on small updates to Whistle, my completely free offline transcription app, available on Android, macOS, Windows and Linux (with CUDA builds for Windows/Linux) - https://blazingbanana.com/work/whistle
-
Executorch: On-device AI across mobile, embedded and edge for PyTorch
If you need WASM, I think Candle is your current best bet: https://github.com/huggingface/candle
-
Running Microsoft's Phi-3 on CPU with Rust & Candle
[package] name = "rust-phi3" version = "0.1.0" edition = "2021" [dependencies] anyhow = "1.0" tokenizers = "0.19.1" clap = { version = "4.4", features = ["derive"] } candle-core = { git = "https://github.com/huggingface/candle.git", branch = "main" } candle-transformers = { git = "https://github.com/huggingface/candle.git", branch = "main" } candle-nn = { git = "https://github.com/huggingface/candle.git", branch = "main" }
-
Building a CUDA-Accelerated Neural Network Library in Rust
The Rust ML ecosystem is still young. There are great projects like burn and candle, but there's room for more exploration and different approaches. Even if CorrosiveNet never becomes production-ready, understanding how ML frameworks work under the hood is valuable.
- Running GPT-OSS-120B at 500 tokens per second on Nvidia GPUs
- Show HN: I rewrote my Mac Electron app in Rust (app went from 1GB to 172MB)
-
Conduit: A UI-less node-based system
I intend to grow this into an open-source project because deep inside, this is ideally how I would like ComfyUI to be. There's still a long journey ahead for building all the custom nodes, which is especially challenging given that the majority of code for AI workflows is written in Python. However, with my hands-on experience with Candle and Burn libraries, I may be able to get pretty close!
-
Lm.rs Minimal CPU LLM inference in Rust with no dependency
You are correct. This project is "on the CPU", so it will not utilize your GPU for computation. If you would like to try out a Rust framework that does support GPUs, [Candle](https://github.com/huggingface/candle/tree/main) may be worth exploring
-
Vector search in Manticore
While looking into how to create text embeddings quickly and directly, we discovered a few helpful tools that allowed us to achieve our goal. Consequently, we created an easy-to-use PHP extension that can generate text embeddings. This extension lets you pick any model from Sentence Transformers on HuggingFace. It is built on the CandleML framework, which is written in Rust and is a part of the well-known HuggingFace ecosystem. The PHP extension itself is also crafted in Rust using the php-ext-rs library. This approach ensures the extension runs fast while still being easy to develop.
What are some alternatives?
burn - Burn is a next generation tensor library and Deep Learning Framework that doesn't compromise on flexibility, efficiency and portability.
tch-rs - Rust bindings for the C++ api of PyTorch.
executorch - On-device AI across mobile, embedded and edge for PyTorch
Universal-G-Code-Sender - A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.
gamma - Computational graphs with reverse automatic differentation in the GPU