Skip to content

Latest commit

 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML-Rust

Rust License: MIT

A family of machine learning libraries written from scratch in Rust, with zero ML dependencies.

Libraries

Library Focus Size
mlrust-core Shared tensor & autograd foundation ~1,200 lines
mlrust Transformers & NLP ~10,000 lines
MLRustFoundation CNNs & computer vision ~2,600 lines

See ECOSYSTEM.md for the full architecture, feature comparison, and integration examples across the three libraries.

Quick start

[dependencies]
mlrust-core = { path = "../mlrust-core" }
use mlrust_core::Tensor;

let a = Tensor::ones((2, 2), true);
let b = Tensor::ones((2, 2), true);

let c = a.add(&b);
let mut loss = c.sum();
loss.backward();

println!("gradient of a: {:?}", a.grad());

Each crate has its own README with install instructions, quick-start examples, and a rundown of what is (and isn't) implemented yet:

Building

Each library is its own Cargo project:

cd mlrust-core && cargo test
cd MLRustFoundation && cargo test
cd mlrust-transformers && cargo test

Philosophy

Clarity over performance. These are learning projects — every component is written to be readable and easy to follow rather than optimized for production workloads.

License

MIT - see LICENSE.

About

Machine learning libraries written from scratch in Rust: tensors, autograd, transformers, and CNNs.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages