Candle: Torch Replacement in Rust

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • candle

    Minimalist ML framework for Rust

  • I sense that most folks will end up using this via a Python wrapper, much like how HF has Transformers written in Rust but with a Python wrapper.

    This library is targeting production, a much smaller subset of engineers. See the 'why candle' section: https://github.com/huggingface/candle#why-candle

  • syntaxdot

    Neural syntax annotator, supporting sequence labeling, lemmatization, and dependency parsing.

  • I am so happy about them releasing this. A few years ago I wrote a multi-task syntax annotator in Rust using Laurent Mazare's excellent tch-rs binding (it seems like he is also working on Candle):

    https://github.com/tensordot/syntaxdot

    However, the deployment story was always quite difficult. The PyTorch C++ API is not stable, so a particular version of tch-rs will only work with a particular PyTorch version. So, anyone wanting to use SyntaxDot always had to get exactly the right version of libtorch (and set some environment variables) to build the project.

    The idea of making an abstraction over Torch and Rust ndarray (similar to Burn) crossed my mind several times, but there is only so much that I could do as a solo developer. So Candle would be a god-given if I was still working on this project.

    Seeing Candle wants to make me port curated-transformers to Candle for fun:

    https://github.com/explosion/curated-transformers

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • llama2.rs

    A fast llama2 decoder in pure Rust.

  • Nowhere near as neat as candle or ggml, but just released a 4-bit rust llama2 implementation with simd. Runs pretty fast.

    https://github.com/srush/llama2.rs/

  • rust-gpu

    🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧

  • I don't do anything related to data science, but I feel like doing it in Rust would be nice.

    You get operator overloading, so you can have ergonomic matrix operations that are typed also. Processing data on the CPU is fast, and crates like https://github.com/EmbarkStudios/rust-gpu make it very ergonomic to leverage the GPU.

    I like this library for creating typed coordinate spaces for graphics programming (https://github.com/servo/euclid), I imagine something similar could be done to create refined types for matrices so you don't do matrix multiplication matrices of invalid sizes

  • euclid

    Geometry primitives (basic linear algebra) for Rust

  • I don't do anything related to data science, but I feel like doing it in Rust would be nice.

    You get operator overloading, so you can have ergonomic matrix operations that are typed also. Processing data on the CPU is fast, and crates like https://github.com/EmbarkStudios/rust-gpu make it very ergonomic to leverage the GPU.

    I like this library for creating typed coordinate spaces for graphics programming (https://github.com/servo/euclid), I imagine something similar could be done to create refined types for matrices so you don't do matrix multiplication matrices of invalid sizes

  • rust

    Empowering everyone to build reliable and efficient software.

  • 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

    Deep learning in Rust, with shape checked tensors and neural networks

  • 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...

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • burn

    Discontinued Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals. [Moved to: https://github.com/Tracel-AI/burn] (by burn-rs)

  • Burn (deep learning framework in rust) has WGPU backend (WebGPU) already. Check it out https://github.com/burn-rs/burn. It was released recently.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Are there some machine or deep learning crates on Rust?

    2 projects | /r/rust | 29 Apr 2023
  • Burn: Deep Learning Framework built using Rust

    1 project | news.ycombinator.com | 24 Apr 2024
  • Burn Deep Learning Framework Release 0.12.0 Improved API and PyTorch Integration

    1 project | news.ycombinator.com | 31 Jan 2024
  • Supercharge Web AI Model Testing: WebGPU, WebGL, and Headless Chrome

    2 projects | news.ycombinator.com | 16 Jan 2024
  • Burn Deep Learning Framework 0.11.0 Released: Just-in-Time Automatic Kernel Fusion & Founding Announcement

    1 project | /r/rust | 3 Dec 2023