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.
- Downloads
- 2
- Dependents
- 0
- Stars
- 92
- Forks
- 11
- Contributors
- 2
- Commits
- 201
- Latest release
- 0.2.0 ·
About
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
- Rust 1.8 +
- Download and install ArrayFire binaries based on your operating system.
Use from Crates.io
To use the rust bindings for ArrayFire from crates.io, the following requirements are to be met first.
- Download and install ArrayFire binaries based on your operating system.
- Set the evironment variable
AF_PATHto point to ArrayFire installation root folder. - 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%\libto your PATH environment variable.
- On Linux & OSX: do
- 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
Compatibility
- 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.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
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 |
|
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 |
|
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 daysdormancy: last activity 2016-10-22, 3670 days ago, E = 365: dormantrot: 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 stablelisted: 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
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- repo manifest, 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: 10 years ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2016-10-22 | GitHub repository | Yes | |
| Latest release | 2016-06-17 | crates.io database dump | Yes | |
| First release | 2016-06-17 | crates.io database dump | Yes | |
| Latest version | 0.2.0 | 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 | repo manifest | Yes | |
| Published docs | false | 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 | rustc-serialize (RUSTSEC-2025-0025, https://rustsec.org/advisories/RUSTSEC-2025-0025.html) | crates.io database dump | Yes |
Distribution1 releases, 2 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 1 | crates.io database dump | Yes | |
| Downloads over 30 days | 2 | 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 |
Repository92 stars, 11 forks, 2 contributors, 201 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 92 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 11 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 2 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 201 | 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 | BSD-3-Clause | 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 | No native code found | 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.