autograph
Library Listed Dormant
A machine learning library for Rust.
- Downloads
- 25
- Dependents
- 0
- Stars
- 333
- Forks
- 20
- Contributors
- 4
- Commits
- 801
- Latest release
- 0.2.1 ·
About
A machine learning library for Rust.
GPGPU kernels implemented with krnl.
Read the full README
Neural Networks
#[derive(Layer, Forward)]
#[autograph(forward(Variable4, Output=Variable2))]
struct LeNet5 {
conv1: Conv2,
relu1: Relu,
pool1: MaxPool2,
conv2: Conv2,
relu2: Relu,
pool2: MaxPool2,
flatten: Flatten,
dense1: Dense,
relu3: Relu,
dense2: Dense,
relu4: Relu,
dense3: Dense,
}
impl LeNet5 {
fn new(device: Device, scalar_type: ScalarType) -> Result<Self> {
let conv1 = Conv2::builder()
.device(device.clone())
.scalar_type(scalar_type)
.inputs(1)
.outputs(6)
.filter([5, 5])
.build()?;
let relu1 = Relu;
let pool1 = MaxPool2::builder().filter([2, 2]).build();
let conv2 = Conv2::builder()
.device(device.clone())
.scalar_type(scalar_type)
.inputs(6)
.outputs(16)
.filter([5, 5])
.build()?;
let relu2 = Relu;
let pool2 = MaxPool2::builder().filter([2, 2]).build();
let flatten = Flatten;
let dense1 = Dense::builder()
.device(device.clone())
.scalar_type(scalar_type)
.inputs(16 * 4 * 4)
.outputs(128)
.build()?;
let relu3 = Relu;
let dense2 = Dense::builder()
.device(device.clone())
.scalar_type(scalar_type)
.inputs(128)
.outputs(84)
.build()?;
let relu4 = Relu;
let dense3 = Dense::builder()
.device(device.clone())
.scalar_type(scalar_type)
.inputs(84)
.outputs(10)
.bias(true)
.build()?;
Ok(Self {
conv1,
relu1,
pool1,
conv2,
relu2,
pool2,
flatten,
dense1,
relu3,
dense2,
relu4,
dense3,
})
}
}
let mut model = LeNet5::new(device.clone(), ScalarType::F32)?;
model.init_parameter_grads()?;
let y = model.forward(x)?;
let loss = y.cross_entropy_loss(t)?;
loss.backward()?;
model.update(learning_rate, &optimizer)?;
See the Neural Network MNIST example.
Benchmarks
NVIDIA GeForce GTX 1060 with Max-Q Design
LeNet5(training, batch_size = 100)
autograph | tch | candle | |
|---|---|---|---|
bf16_host | 498.54 ms (✅ 1.00x) | 75.26 ms (🚀 6.62x faster) | N/A |
f32_host | 8.25 ms (✅ 1.00x) | 3.14 ms (🚀 2.63x faster) | 34.17 ms (❌ 4.14x slower) |
bf16_device | 1.76 ms (✅ 1.00x) | 17.63 ms (❌ 10.02x slower) | N/A |
f32_device | 1.73 ms (✅ 1.00x) | 1.19 ms (✅ 1.45x faster) | 9.76 ms (❌ 5.64x slower) |
LeNet5(inference, batch_size = 1,000)
autograph | tch | candle | |
|---|---|---|---|
bf16_host | 1.81 s (✅ 1.00x) | 193.60 ms (🚀 9.37x faster) | N/A |
f32_host | 15.56 ms (✅ 1.00x) | 9.46 ms (✅ 1.64x faster) | 94.23 ms (❌ 6.06x slower) |
bf16_device | 4.65 ms (✅ 1.00x) | 48.63 ms (❌ 10.46x slower) | N/A |
f32_device | 4.65 ms (✅ 1.00x) | 1.84 ms (🚀 2.52x faster) | 10.81 ms (❌ 2.33x slower) |
See the Neural Network benchmark.
License
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Optional
- Binds native code: curl-sys (feature mnist), libz-sys (feature mnist)
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
A machine learning library for Rust. |
25 downloads over 30 days | 0 | 333 | 0.2.1 | GPU support unknown | Binds native code: curl-sys (feature mnist), libz-sys (feature mnist) | Apache-2.0 OR MIT |
|
burn Featured
Flexible and Comprehensive Deep Learning Framework in Rust Also in Tensors and GPU compute. |
521,465 downloads over 30 days | 391 | 16,257 | 0.22.1 | CUDA, WebGPU, Metal, ROCm, Vulkan | Binds native code: netlink-sys (feature iroh), nvml-wrapper-sys (feature sys-metrics), torch-sys (feature tch) | Apache-2.0 OR MIT |
|
mlx-rs Featured
Unofficial rust wrapper for Apple's mlx machine learning library. Also in Train models. |
33,398 downloads over 30 days | 36 | 389 | 0.34.0 | Metal | Binds native code: mach-sys, mlx, mlx-sys. Build uses a native toolchain: bindgen, cc, cmake | Apache-2.0 OR MIT |
|
boostr Listed
ML framework on numr for training and inference on CPU, CUDA and WebGPU: attention, quantization, inference scheduling and distributed execution. Models include LLaMA, Mamba2, Qwen3.5, Whisper, Kokoro, VITS, VoxCPM2, Silero VAD, CLAP and super-resolution. Loads SafeTensors and GGUF. Also in Tensors and GPU compute. |
1,265 downloads over 30 days | 7 | 20 | 0.11.2 | CUDA, WebGPU | Binds native code: ring (feature distributed) | Apache-2.0 |
|
Machine Learning Framework for Hackers Also in Train models. |
110 downloads over 30 days | 0 | 5,539 | 0.2.1 | CUDA | No native code found | Apache-2.0 OR MIT |
|
Machine Learning Framework for Hackers Also in Tensors and GPU compute. |
14 downloads over 30 days | 5 | 1,129 | 0.3.0 | CUDA | Binds native code: cublas, cudnn, rcublas-sys, rcudnn-sys. Build uses a native toolchain: pkg-config, bindgen (feature generate) | Apache-2.0 OR MIT |
|
A learning-focused, high-performance tensor computation library built from scratch in Rust, featuring automatic differentiation and CPU/CUDA backends. Also in Tensors and GPU compute. |
Not measured | Not applicable | 79 | Not measured | Not measured | Not measured | MIT |
All projects in Tensors and GPU computeAll projects in Train models
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 333 stars, 20 forks and 4 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
- The project is dormant and not finished. Dormancy rule
What else the check found
- The last activity is on 19 Aug 2024, 812 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule
- The latest release requires the deprecated dependency paste. RUSTSEC-2024-0436 Rot signals rule
Not measured: Latest release fails cargo check.
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.2.1 base 300, raised to the 365-day floor: E = 365 daysdormancy: last activity 2024-08-19, 812 days ago, E = 365: dormantrot: deprecated requirement `paste (RUSTSEC-2024-0436, https://rustsec.org/advisories/RUSTSEC-2024-0436.html)`featured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 333 (needs 4539), forks 20 (needs 434), contributors 4 (needs 79); dormant and not stablelisted: listed: no archive, new or featured rule applies
Crates2 crates
- autograph Primary
- autograph_derive
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 0 | crates.io database dump | Yes | |
| New dependents (365 days) | 0 | crates.io database dump | Yes | |
| Peak active dependents | 0 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 2 years ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2024-08-19 | GitHub repository | Yes | |
| Latest release | 2024-08-19 | crates.io database dump | Yes | |
| First release | 2019-11-14 | crates.io database dump | Yes | |
| Latest version | 0.2.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | paste (RUSTSEC-2024-0436, https://rustsec.org/advisories/RUSTSEC-2024-0436.html) | crates.io database dump | Yes |
Distribution7 releases, 25 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 7 | crates.io database dump | Yes | |
| Downloads over 30 days | 25 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository333 stars, 20 forks, 4 contributors, 801 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 333 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 20 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 4 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 801 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: curl-sys (feature mnist), libz-sys (feature mnist) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 0 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.