hal

Library Listed Dormant

HAL: a machine learning library that is able to run on Nvidia, OpenCL or CPU BLAS based compute backends. It currently provides stackable classical neural networks, RNN's and soon to be LSTM's.

Checked · Sources

Downloads
2
Dependents
0
Stars
92
Forks
11
Contributors
2
Commits
201
Latest release
0.2.0 ·

About

From the project README ·

HAL : Hyper Adaptive Learning

Rust based Cross-GPU Machine Learning.

Why Rust?

This project is for those that miss strongly typed compiled languages. Rust was chosen specifically because of this Furthermore, we can offer fine grained control of your operations. This means being able to grab dimensions of tensors at any stage, none of that unknown shape nonsense. We can also micro-control steps. An example of this working with each individual forward timesteps on say an LSTM. Usually these are controlled by inner loops [Theano/Tensorflow, etc].

Features

  • Multi GPU [model based] support
  • OpenCL + CUDA + Parallel CPU support
  • LSTM's with internal RTRL [Work in Progress]
  • RNN's [Work in Progress]
  • Perceptrons, AutoEncoders, ConvNets**[TODO]**
  • Optimizers: [SGD, Adam, AdaGrad**[TODO]**]
  • Activations: [Linear, Sigmoid, Tanh, ReLU, LReLU, Softmax]
  • Initializations: [Lecun Uniform, Glorot Normal, Glorot Uniform, Normal, Uniform]
  • Data Gatherers: [SinSource, MNIST**[In Progress], CIFAR10[TODO]**]
  • Loss Functions: [MSE, L2, Cross-Entropy]
  • OpenGL based plotting and image loading, see here for more info
  • Multi GPU [horizontal] support [TODO]
Read the full README

Requirements

Use from Crates.io

To use the rust bindings for ArrayFire from crates.io, the following requirements are to be met first.

  1. Download and install ArrayFire binaries based on your operating system.
  2. Set the evironment variable AF_PATH to point to ArrayFire installation root folder.
  3. Make sure you add the path to library files to your path environment variables.
    • On Linux & OSX: do export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$AF_PATH/lib
    • On Windows: Add %AF_PATH%\lib to your PATH environment variable.
  4. Add hal-ml as a dependency in your Cargo.toml

Build from Source

Edit build.conf to modify the build flags. The structure is a simple JSON blob. Currently Rust does not allow key:value pairs to be passed from the CLI. To use an existing ArrayFire installation modify the first three JSON values. You can install ArrayFire using one of the following two ways.

To build arrayfire submodule available in the rust wrapper, you have to do the following.

git submodule update --init --recursive
cargo build

This is recommended way to build Rust wrapper since the submodule points to the most compatible version of ArrayFire the Rust wrapper has been tested with. You can find the ArrayFire dependencies below.

Examples

cargo run --example autoencoder
cargo run --example xor_rnn

Testing

HAL utilizes RUST's test framework to extensively test all of our modules.
We employ gradient checking on individual functions as well as layers.
Testing needs to run on one thread due to our device probing methods.
Furthermore, graphics needs to be disabled for testing [glfw issue].

AF_DISABLE_GRAPHICS=1 RUST_TEST_THREADS=1 cargo test

If you would like to see the results of the test (as well as benchmarks) run:

AF_DISABLE_GRAPHICS=1 RUST_TEST_THREADS=1 cargo test -- --nocapture

Credits

  • Thanks to the arrayfire team for working with me to get the rust bindings up.
  • Keras for inspiration as a lot of functions are similar to their implementation (minus the theano nonsense).
  • Dr. Felix Gers for his insight into internal RTRL
  • Dr. Sepp Hochreiter for advise on LSTM's
Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
None found
  • No native code found
Python bindings
No Python binding crate found
License
BSD-3-Clause

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.

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

HAL: a machine learning library that is able to run on Nvidia, OpenCL or CPU BLAS based compute backends. It currently provides stackable classical neural networks, RNN's and soon to be LSTM's.

2 downloads over 30 days 0 92 0.2.0 GPU support unknown No native code found BSD-3-Clause
mlx-rs Featured

Unofficial rust wrapper for Apple's mlx machine learning library.

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
rustyml Listed

Machine learning models, neural networks, metrics, and data utilities in Rust

59 downloads over 30 days 0 345 0.17.0 GPU support unknown No native code found MIT
oxidizr App Listed

Trains GPT-style language models from a YAML config and a tokenized dataset: dense GQA transformers, Mamba 1, 2 and 3, MLA and MoE layers on CPU or CUDA. Runs the training loop, optimizer, checkpoints, evaluation and metrics on boostr, and builds speech corpora through voxr.

27 downloads over 30 days Not applicable 8 0.1.1 CUDA Binds native code: nvml-wrapper-sys (feature cuda) Apache-2.0
rust-lstm Listed

A complete LSTM neural network library with training capabilities, multiple optimizers, and peephole variants.

15 downloads over 30 days 0 24 0.10.0 GPU support unknown No native code found 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.

Not measured Not applicable 79 Not measured Not measured Not measured MIT
xaynet Archived

The Xayn Network project is building a privacy layer for machine learning so that AI projects can meet compliance such as GDPR and CCPA. The approach relies on Federated Learning as enabling technology that allows production AI applications to be fully privacy compliant.

0 downloads over 30 days 0 202 0.11.0 GPU support unknown Binds native code: libsodium-sys Apache-2.0
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 92 stars, 11 forks and 2 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
  • Docs are missing: the primary crate publishes no README.
  • The project is dormant and not finished. Dormancy rule

What else the check found

  • The last activity is on 22 Oct 2016, 3670 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule
  • The latest release requires the deprecated dependency rustc-serialize. RUSTSEC-2025-0025 Rot signals rule

Not measured: Latest release fails cargo check.

Check notes

  • the repo manifest Cargo.toml declares the crate, and no release commit proves the link

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.0 base 80, capped at 1 releases = 50, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2016-10-22, 3670 days ago, E = 365: dormant
  • rot: deprecated requirement `rustc-serialize (RUSTSEC-2025-0025, https://rustsec.org/advisories/RUSTSEC-2025-0025.html)`
  • featured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 92 (needs 4539), forks 11 (needs 434), contributors 2 (needs 79); docs missing; dormant and not stable
  • listed: listed: no archive, new or featured rule applies

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: 10 years ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2016-10-22GitHub repositoryYes
Latest release2016-06-17crates.io database dumpYes
First release2016-06-17crates.io database dumpYes
Latest version0.2.0crates.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 repotruerepo manifestYes
Published docsfalsecrates.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 requirementrustc-serialize (RUSTSEC-2025-0025, https://rustsec.org/advisories/RUSTSEC-2025-0025.html)crates.io database dumpYes
Distribution1 releases, 2 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases1crates.io database dumpYes
Downloads over 30 days2crates.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
Repository92 stars, 11 forks, 2 contributors, 201 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars92GitHub repositoryYes — one part of the repository route
GitHub forks11GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account2GitHub contributorsYes — one part of the repository route
Commits on the default branch201GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseBSD-3-Clausecrates.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 dependenciesNo native code foundcrates.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.