#62 · Primary category: Deep Learning Frameworks
tch-rs
Rust bindings for the C++ api of PyTorch.
Project last updated:08/23/26
GitHub Stars
5.5K
Forks
452
Contributors
82
License
Apache-2.0
Why we included this project
Teams working in Rust who want PyTorch's capabilities without leaving the language get a thin, faithful wrapper around libtorch's C++ API. You get tensors, automatic differentiation, optimizers like SGD and Adam, and the familiar nn module for composing layers, all callable from ordinary Rust code. Because the bindings mirror the upstream C++ surface closely, PyTorch's own docs and examples carry over and you stay aligned with upstream behavior. Installation adapts to your setup: link a system libtorch, point the build at a Python torch install, or let the build script pull a prebuilt CPU or CUDA binary. That flexibility suits both production services needing fast tensor math and small teams prototyping custom architectures entirely in Rust.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
tensorflow
An Open Source Machine Learning Framework for Everyone
pytorch
Tensors and Dynamic neural networks in Python with strong GPU acceleration
keras
Deep Learning for humans
nanoGPT
The simplest, fastest repository for training/finetuning medium-sized GPTs.
ray
Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.