autograph

Library Listed Dormant

A machine learning library for Rust.

Checked · Sources

Downloads
25
Dependents
0
Stars
333
Forks
20
Contributors
4
Commits
801
Latest release
0.2.1 ·

About

From the project README ·

A machine learning library for Rust.

GPGPU kernels implemented with krnl.

  • Host and device execution.
  • Tensors emulate ndarray
    • Host tensors can be borrowed as arrays.
  • Tensors, models, and optimizers can be serialized with serde.
    • Portable between platforms.
    • Save and resume training progress.
  • Fully extensible, in Rust.
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)

autographtchcandle
bf16_host498.54 ms (✅ 1.00x)75.26 ms (🚀 6.62x faster)N/A
f32_host8.25 ms (✅ 1.00x)3.14 ms (🚀 2.63x faster)34.17 ms (❌ 4.14x slower)
bf16_device1.76 ms (✅ 1.00x)17.63 ms (❌ 10.02x slower)N/A
f32_device1.73 ms (✅ 1.00x)1.19 ms (✅ 1.45x faster)9.76 ms (❌ 5.64x slower)

LeNet5(inference, batch_size = 1,000)

autographtchcandle
bf16_host1.81 s (✅ 1.00x)193.60 ms (🚀 9.37x faster)N/A
f32_host15.56 ms (✅ 1.00x)9.46 ms (✅ 1.64x faster)94.23 ms (❌ 6.06x slower)
bf16_device4.65 ms (✅ 1.00x)48.63 ms (❌ 10.46x slower)N/A
f32_device4.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.

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.

autograph beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
autograph This page Listed Dormant

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
leaf Listed Dormant

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
juice Listed Dormant

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
RustTensor App Listed Dormant

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
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 days
  • dormancy: last activity 2024-08-19, 812 days ago, E = 365: dormant
  • rot: 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 stable
  • listed: listed: no archive, new or featured rule applies
Crates2 crates

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
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents0crates.io database dumpYes
New dependents (365 days)0crates.io database dumpYes
Peak active dependents0crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 2 years ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2024-08-19GitHub repositoryYes
Latest release2024-08-19crates.io database dumpYes
First release2019-11-14crates.io database dumpYes
Latest version0.2.1crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementpaste (RUSTSEC-2024-0436, https://rustsec.org/advisories/RUSTSEC-2024-0436.html)crates.io database dumpYes
Distribution7 releases, 25 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases7crates.io database dumpYes
Downloads over 30 days25crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository333 stars, 20 forks, 4 contributors, 801 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars333GitHub repositoryYes — one part of the repository route
GitHub forks20GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account4GitHub contributorsYes — one part of the repository route
Commits on the default branch801GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: curl-sys (feature mnist), libz-sys (feature mnist)crates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly0crates.io database dumpNo

Corrections and review history

Report a correction

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.