LaurentMazare/tch-rs

Rust bindings for the C++ api of PyTorch.

58
/ 100
Established

Provides thin FFI wrappers around libtorch's C++ API, maintaining API parity with the original C++ interface rather than idiomatic Rust abstractions. Includes a higher-level `nn` module for neural network construction with automatic differentiation, variable stores, and optimizers (SGD, Adam). Flexibly links against libtorch via system installation, Python PyTorch, manual paths, or pre-built downloads with optional CUDA support.

5,316 stars. Actively maintained with 5 commits in the last 30 days.

No Package No Dependents
Maintenance 13 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 19 / 25

How are scores calculated?

Stars

5,316

Forks

416

Language

Rust

License

Apache-2.0

Last pushed

Jan 22, 2026

Commits (30d)

5

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/LaurentMazare/tch-rs"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.