Awesome-Rust-MachineLearning
Awesome Rust Machine Learning crate list that writing this with the idea of migrating from Python.
And reference of Machine Learning using Rust (blog, book, movie, discussion, ...and more).
It's a list with the major items at the top.
For Japanese: README.ja.md
ToC
- Undercarriage
- Comprehensive (like sklearn)
- Comprehensive (statistics)
- Gradient Boosting
- Deep Neural Network
- Graph Model
- Natural Language Processing (model)
- Recommendation
- Information Retrieval
- Reinforcement Learning
- Supervised Learning
- Unsupervised Learning & Clustering Model
- Statistical Model
- Evolutionary Algorithm
- Reference
- Thanks
Undercarriage
Jupyter Notebook
- google/evcxr - An evaluation context for Rust.
- emakryo/rustdef - Jupyter extension for rust.
Plot
- 38/plotters - A rust drawing library for high quality data plotting for both WASM and native, statically and realtimely ๐ฆ ๐๐
- igiagkiozis/plotly - Plotly for Rust
- milliams/plotlib - Data plotting library for Rust
- SiegeLord/RustGnuplot - A Rust library for drawing plots, powered by Gnuplot.
Vector
Most things use ndarray or std::vec. Also look at nalgebra.
ndarray vs nalgebra - reddit https://www.reddit.com/r/rust/comments/btn1cz/ndarray_vs_nalgebra/
- dimforge/nalgebra - Linear algebra library for Rust.
- rust-ndarray/ndarray - ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations
- bluss/arrayvec - A vector with a fixed capacity. (Rust)
- vbarrielle/sprs - sparse linear algebra library for rust
- liborty/rstats - Rust Statistics and Vector Algebra Library
- PyO3/rust-numpy - PyO3-based Rust binding of NumPy C-API
Dataframe
Mainstream is polars using arrow.
datafusion looks good too.
- ritchie46/polars - Rust DataFrame library
- apache/arrow - In-memory columnar format, in Rust.
- apache/arrow-datafusion - Apache Arrow DataFusion and Ballista query engines
- milesgranger/black-jack - DataFrame / Series data processing in Rust
- nevi-me/rust-dataframe - A Rust DataFrame implementation, built on Apache Arrow
- kernelmachine/utah - Dataframe structure and operations in Rust
Image Processing
- image-rs/image - Encoding and decoding images in Rust
- image-rs/imageproc - Image processing operations
- rust-cv/ndarray-image - Allows conversion between ndarray's types and image's types
- twistedfall/opencv-rust - Rust bindings for OpenCV 3 & 4
- rustgd/cgmath - A linear algebra and mathematics library for computer graphics.
- atomashpolskiy/rustface - Face detection library for the Rust programming language
Natural Language Processing (preprocessing)
There is also the familiar huggingface/tokenizers in Python.
In rs-natural, addition to Tokenize, Distance, NGrams, Naive-Bayes and TF-IDF can also be used.
Machine learning models may be used to process NLP.
- huggingface/tokenizers - The core of tokenizers, written in Rust. Provides an implementation of today's most used tokenizers, with a focus on performance and versatility.
- google-research/deduplicate-text-datasets - This repository contains code to deduplicate language model datasets as descrbed in the paper "Deduplicating Training Data Makes Language Models Better" by Katherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang, Douglas Eck, Chris Callison-Burch and Nicholas Carlini. This repository contains both the ExactSubstr deduplication implementation (written in Rust) along with the scripts we used in the paper to perform deduplication and inspect the results (written in Python). In an upcoming update, we will add files to reproduce the NearDup-deduplicated versions of the C4, RealNews, LM1B, and Wiki-40B-en datasets.
- guillaume-be/rust-tokenizers - Rust-tokenizer offers high-performance tokenizers for modern language models, including WordPiece, Byte-Pair Encoding (BPE) and Unigram (SentencePiece) models
- christophertrml/rs-natural - Natural Language Processing for Rust
- bminixhofer/nnsplit - Semantic text segmentation. For sentence boundary detection, compound splitting and more.
- greyblake/whatlang-rs - Natural language detection library for Rust.
- finalfusion/finalfrontier - Context-sensitive word embeddings with subwords. In Rust.
- stickeritis/sticker - A LSTM/Transformer/dilated convolution sequence labeler
- pemistahl/lingua-rs - ๐ The most accurate natural language detection library in the Rust ecosystem, suitable for long and short text alike
- usamec/cntk-rs - Wrapper around Microsoft CNTK library
- bminixhofer/nlprule - A fast, low-resource Natural Language Processing and Error Correction library written in Rust.
- rth/vtext - Simple NLP in Rust with Python bindings
- tamuhey/tokenizations - Robust and Fast tokenizations alignment library for Rust and Python
- vgel/treebender - A HDPSG-inspired symbolic natural language parser written in Rust
- reinfer/blingfire-rs - Rust wrapper for the BlingFire tokenization library
- CurrySoftware/rust-stemmers - Common stop words in a variety of languages
- cmccomb/rust-stop-words - Common stop words in a variety of languages
- Freyskeyd/nlp - Rust-nlp is a library to use Natural Language Processing algorithm with RUST
Graph
- alibaba/GraphScope - GraphScope: A One-Stop Large-Scale Graph Computing System from Alibaba
- petgraph/petgraph - Graph data structure library for Rust.
- rs-graph/rs-graph - rs-graph is a library for graph algorithms and combinatorial optimization
- metamolecular/gamma - A graph library for Rust.
- purpleprotocol/graphlib - Simple but powerful graph library for Rust
Interface & Pipeline & AutoML
- tangramxyz/tangram - Tangram is an all-in-one automated machine learning framework. https://github.com/tangramxyz/tangram
- datafuselabs/datafuse - A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, written in Rust
- mstallmo/tensorrt-rs - Rust library for running TensorRT accelerated deep learning models
- ehsanmok/tvm-rust - Rust bindings for TVM runtime
- vertexclique/orkhon - Orkhon: ML Inference Framework and Server Runtime
- xaynetwork/xaynet - Xaynet represents an agnostic Federated Machine Learning framework to build privacy-preserving AI applications
- sonos/tract - Tiny, no-nonsense, self-contained, Tensorflow and ONNX inference
Workflow
- substantic/rain - Framework for large distributed pipelines
- timberio/vector - A high-performance, highly reliable, observability data pipeline
Comprehensive (like sklearn)
Many libraries support the following.
- Linear Regression
- Logistic Regression
- K-Means Clustering
- Neural Networks
- Gaussian Process Regression
- Support Vector Machines
- kGaussian Mixture Models
- Naive Bayes Classifiers
- DBSCAN
- k-Nearest Neighbor Classifiers
- Principal Component Analysis
- Decision Tree
- Support Vector Machines
- Naive Bayes
- Elastic Net
It writes down the features.
- smartcorelib/smartcore - SmartCore is a comprehensive library for machine learning and numerical computing. The library provides a set of tools for linear algebra, numerical computing, optimization, and enables a generic, powerful yet still efficient approach to machine learning.
- LASSO, Ridge, Random Forest, LU, QR, SVD, EVD, and more metrics
- https://smartcorelib.org/user_guide/quick_start.html
- rust-ml/linfa - A Rust machine learning framework.
- Gaussian Mixture Model Clustering, Agglomerative Hierarchical Clustering, ICA
- https://github.com/rust-ml/linfa#current-state
- maciejkula/rustlearn - Machine learning crate for Rust
- factorization machines, k-fold cross-validation, ndcg
- https://github.com/maciejkula/rustlearn#features
- AtheMathmo/rusty-machine - Machine Learning library for Rust
- Confusion Matrix, Cross Varidation, Accuracy, F1 Score, MSE
- https://github.com/AtheMathmo/rusty-machine#machine-learning
- benjarison/eval-metrics - Evaluation metrics for machine learning
- Many evaluation functions
- blue-yonder/vikos - A machine learning library for supervised training of parametrized models
Comprehensive (Statistics)
Optimize, Automatic Differentiation, Numerical Analysis, Statistics, ... and more
- Axect/Peroxide - Rust numeric library with R, MATLAB & Python syntax
- Linear Algebra, Functional Programming, Automatic Differentiation, Numerical Analysis, Statistics, Special functions, Plotting, Dataframe
Gradient Boosting
catboost is for predict only.
- mesalock-linux/gbdt-rs - MesaTEE GBDT-RS : a fast and secure GBDT library, supporting TEEs such as Intel SGX and ARM TrustZone
- davechallis/rust-xgboost - Rust bindings for XGBoost.
- vaaaaanquish/lightgbm-rs - LightGBM Rust binding
- catboost/catboost - A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks
- Entscheider/stamm - Generic decision trees for rust
Deep Neural Network
Tensorflow or Pythorch are the most common.
tch-rs also includes torch vision.
- tensorflow/rust - Rust language bindings for TensorFlow
- LaurentMazare/tch-rs - Rust bindings for the C++ api of PyTorch.
- spearow/juice - The Hacker's Machine Learning Engine
- neuronika/neuronika - Tensors and dynamic neural networks in pure Rust.
- bilal2vec/L2 - l2 is a fast, Pytorch-style Tensor+Autograd library written in Rust
- raskr/rust-autograd - Tensors and differentiable operations (like TensorFlow) in Rust
- charles-r-earp/autograph - Machine Learning Library for Rust
- patricksongzy/corgi - A neural network, and tensor dynamic automatic differentiation implementation for Rust.
- JonathanWoollett-Light/cogent - Simple neural network library for classification written in Rust.
- oliverfunk/darknet-rs - Rust bindings for darknet
- jakelee8/mxnet-rs - mxnet for Rust
- jramapuram/hal - Rust based Cross-GPU Machine Learning
- primitiv/primitiv-rust - Rust binding of primitiv
- chantera/dynet-rs - The Rust Language Bindings for DyNet
- millardjn/alumina - A deep learning library for rust
- jramapuram/hal - Rust based Cross-GPU Machine Learning
- afck/fann-rs - Rust wrapper for the Fast Artificial Neural Network library
- autumnai/leaf - Open Machine Intelligence Framework for Hackers. (GPU/CPU)
- c0dearm/mushin - Compile-time creation of neural networks
- tedsta/deeplearn-rs - Neural networks in Rust
Graph Model
- Synerise/cleora - Cleora AI is a general-purpose model for efficient, scalable learning of stable and inductive entity embeddings for heterogeneous relational data.
Natural Language Processing (model)
- guillaume-be/rust-bert - Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)
- cpcdoy/rust-sbert - Rust port of sentence-transformers (https://github.com/UKPLab/sentence-transformers)
- proycon/deepfrog - An NLP-suite powered by deep learning
- ferristseng/rust-tfidf - Library to calculate TF-IDF
- messense/fasttext-rs - fastText Rust binding
- mklf/word2vec-rs - pure rust implementation of word2vec
- DimaKudosh/word2vec - Rust interface to word2vec.
- lloydmeta/sloword2vec-rs - A naive (read: slow) implementation of Word2Vec. Uses BLAS behind the scenes for speed.
Recommendation
For Matrix Factorization, you can use rustlearn.
- jackgerrits/vowpalwabbit-rs - ๐ฆ๐ Rusty VowpalWabbit
- outbrain/fwumious_wabbit - Fwumious Wabbit, fast on-line machine learning toolkit written in Rust
- hja22/rucommender - Rust implementation of user-based collaborative filtering
- maciejkula/sbr-rs - Deep recommender systems for Rust
- chrisvittal/quackin - A recommender systems framework for Rust
- snd/onmf - fast rust implementation of online nonnegative matrix factorization as laid out in the paper "detect and track latent factors with online nonnegative matrix factorization"
- rhysnewell/nymph - Non-Negative Matrix Factorization in Rust
Information Retrieval
Full Text Search
- quickwit-inc/quickwit - Quickwit is a big data search engine.
- bayard-search/bayard - A full-text search and indexing server written in Rust.
- neuml/txtai.rs - AI-powered search engine for Rust
- meilisearch/MeiliSearch - Lightning Fast, Ultra Relevant, and Typo-Tolerant Search Engine
- toshi-search/Toshi - A full-text search engine in rust
- BurntSushi/fst - Represent large sets and maps compactly with finite state transducers.
- tantivy-search/tantivy - Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust
- tinysearch/tinysearch - ๐ Tiny, full-text search engine for static websites built with Rust and Wasm
- https://github.com/andylokandy/simsearch-rs - A simple and lightweight fuzzy search engine that works in memory, searching for similar strings
- jameslittle230/stork - ๐ Impossibly fast web search, made for static sites.
- elastic/elasticsearch-rs - Official Elasticsearch Rust Client
Nearest Neighbor Search
ANN search (approximate nearest neighbor), hashing, dimensional tree, etc...
- Enet4/faiss-rs - Rust language bindings for Faiss
- rust-cv/hnsw - HNSW ANN from the paper "Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs"
- InstantDomain/instant-distance - Fast approximate nearest neighbor searching in Rust, based on HNSW index
- lerouxrgd/ngt-rs - Rust wrappers for NGT approximate nearest neighbor search
- granne/granne - Graph-based Approximate Nearest Neighbor Search
- qdrant/qdrant - Qdrant - vector similarity search engine with extended filtering support
- rust-cv/hwt - Hamming Weight Tree from the paper "Online Nearest Neighbor Search in Hamming Space"
- kornelski/vpsearch - C library for finding nearest (most similar) element in a set
- mrhooray/kdtree-rs - K-dimensional tree in Rust for fast geospatial indexing and lookup
- petabi/petal-neighbors - Nearest neighbor search algorithms including a ball tree and a vantage point tree.
- ritchie46/lsh-rs - Locality Sensitive Hashing in Rust with Python bindings
- kampersanda/mih-rs - Rust implementation of multi-index hashing for neighbor searches on 64-bit codes in the Hamming space
Reinforcement Learning
Looks good border.
- taku-y/border - Border is a reinforcement learning library in Rust.
- NivenT/REnforce - Reinforcement learning library written in Rust
- tspooner/rsrl - A fast, safe and easy to use reinforcement learning framework in Rust.
- milanboers/rurel - Flexible, reusable reinforcement learning (Q learning) implementation in Rust
- MrRobb/gym-rs - OpenAI Gym bindings for Rust
Supervised Learning Model
- shadeMe/liblinear-rs - Rust language bindings for the LIBLINEAR C/C++ library.
- messense/crfsuite-rs - Rust binding to crfsuite
- ralfbiedert/ffsvm-rust - FFSVM stands for "Really Fast Support Vector Machine"
- zenoxygen/bayespam - A simple bayesian spam classifier written in Rust.
- Rui_Vieira/naive-bayesnaive-bayes - A Naive Bayes classifier written in Rust.
- sile/randomforest - A random forest implementation in Rust
- tomtung/craftml-rs - A Rust๐ฆ implementation of CRAFTML, an Efficient Clustering-based Random Forest for Extreme Multi-label Learning
Unsupervised Learning & Clustering Model
- frjnn/bhtsne - Barnes-Hut t-SNE implementation written in Rust.
- avinashshenoy97/RusticSOM - Rust library for Self Organising Maps (SOM).
- diffeo/kodama - Fast hierarchical agglomerative clustering in Rust.
- kno10/rust-kmedoids - k-Medoids clustering in Rust with the FasterPAM algorithm
- petabi/petal-clustering - DBSCAN and OPTICS clustering algorithms.
- milesgranger/gap_statistic - Dynamically get the suggested clusters in the data for unsupervised learning.
- genbattle/rkm - Generic k-means implementation written in Rust
Statistical Model
- Redpoll/changepoint - Includes the following change point detection algorithms: Bocpd -- Online Bayesian Change Point Detection Reference. BocpdTruncated -- Same as Bocpd but truncated the run-length distribution when those lengths are unlikely.
- krfricke/arima - ARIMA modelling for Rust
- Daingun/automatica - Automatic Control Systems Library
- rbagd/rust-linearkalman - Kalman filtering and smoothing in Rust
- sanity/pair_adjacent_violators - An implementation of the Pair Adjacent Violators algorithm for isotonic regression in Rust
Evolutionary Algorithm
- martinus/differential-evolution-rs - Generic Differential Evolution for Rust
- innoave/genevo - Execute genetic algorithm (GA) simulations in a customizable and extensible way.
- Jeffail/spiril - Rust library for genetic algorithms
- sotrh/rust-genetic-algorithm - Example of a genetic algorithm in Rust and Python
- willi-kappler/darwin-rs - darwin-rs, evolutionary algorithms with rust
Reference
Nearby Projects
- Are we learning yet?, A work-in-progress to catalog the state of machine learning in Rust
- e-tony/best-of-ml-rust, A ranked list of awesome machine learning Rust libraries
- The Best 51 Rust Machine learning Libraries, RustRepo
- rust-unofficial/awesome-rust, A curated list of Rust code and resources
- Top 16 Rust Machine learning Projects, Open-source Rust projects categorized as Machine learning
- 39+ Best Rust Machine learning frameworks, libraries, software and resourcese, ReposHub
Blogs
Introduction
- About Rustโs Machine Learning Community, Medium, 2016/1/6, Autumn Engineering
- Rust vs Python: Technology And Business Comparison, 2021/3/4, Miลosz Kaczorowski
- I wrote one of the fastest DataFrame libraries, 2021/2/28, Ritchie Vink
- Polars: The fastest DataFrame library you've never heard of 2021/1/19, Analytics Vidhya
- Data Manipulation: Polars vs Rust, 2021/3/13, Xavier Tao
- State of Machine Learning in Rust โ Ehsan's Blog, 2019/5/13, Published by Ehsan
- Ritchie Vink, Machine Learning Engineer, writes Polars, one of the fastest DataFrame libraries in Python and Rust, Xomnia, 2021/5/11
- Quickwit: A highly cost-efficient search engine in Rust, 2021/7/13, quickwit, PAUL MASUREL
- Data Manipulation: Polars vs Rust, 2021/3/13, Xavier Tao
Tutorial
- Rust Machine Learning Book, Examples of KMeans and DBSCAN with linfa-clustering
- Artificial Intelligence and Machine Learning โ Practical Rust Projects: Building Game, Physical Computing, and Machine Learning Applications โ Dev Guis , 2021/5/19
- Machine learning in Rust using Linfa, LogRocket Blog, 2021/4/30, Timeular, Mario Zupan, Examples of LogisticRegression
- Machine Learning in Rust, Smartcore, Medium, The Startup, 2021/1/15, Vlad Orlov, Examples of LinerRegression, Random Forest Regressor, and K-Fold
- Machine Learning in Rust, Logistic Regression, Medium, The Startup, 2021/1/6, Vlad Orlov
- Machine Learning in Rust, Linear Regression, Medium, The Startup, 2020/12/16, Vlad Orlov
- Machine Learning in Rust, 2016/3/7, James, Examples of LogisticRegressor
- Machine Learning and Rust (Part 1): Getting Started!, Level Up Coding, 2021/1/9, Stefano Bosisio
- Machine Learning and Rust (Part 2): Linear Regression, Level Up Coding, 2021/6/15, Stefano Bosisio
- Machine Learning and Rust (Part 3): Smartcore, Dataframe, and Linear Regression, Level Up Coding, 2021/7/1, Stefano Bosisio
- Tensorflow Rust Practical Part 1, Programmer Sought, 2018
- A Machine Learning introduction to ndarray, RustFest 2019, 2019/11/12, Luca Palmieri
- Simple Linear Regression from scratch in Rust, Web Development, Software Architecture, Algorithms and more, 2018/12/13, philipp
- Interactive Rust in a REPL and Jupyter Notebook with EVCXR, Depth-First, 2020/9/21, Richard L. Apodaca
Apply
- Deep Learning in Rust: baby steps, Medium, 2016/2/2, Theodore DeRego
- A Rust SentencePiece implementation, Rust NLP tales, 2020/5/30
- Accelerating text generation with Rust, Rust NLP tales, 2020/11/21
- A Simple Text Summarizer written in Rust, Towards Data Science, 2020/11/24, Charles Chan, Examples of Text Sentence Vector, Cosine Distance and PageRank
- Extracting deep learning image embeddings in Rust, RecoAI, 2021/6/1, Paweล Jankiewic, Examples of ONNX
Case study
- Production users - Rust Programming Language, by rust-lang.org
- Taking ML to production with Rust: a 25x speedup, A LEARNING JOURNAL, 2019/12/1, @algo_luca
- 9 Companies That Use Rust in Production, serokell, 2020/11/18, Gints Dreimanis
Discussion
- Natural Language Processing in Rust : rust, 2016/12/6
- Future prospect of Machine Learning in Rust Programming Language : MachineLearning, 2017/11/11
- Interest for NLP in Rust? - The Rust Programming Language Forum, 2018/1/19
- Is Rust good for deep learning and artificial intelligence? - The Rust Programming Language Forum, 2018/11/18
- ndarray vs nalgebra : rust, 2019/5/28
- Taking ML to production with Rust | Hacker News, 2019/12/2
- Who is using Rust for Machine learning in production/research? : rust, 2020/4/5
- SmartCore, fast and comprehensive machine learning library for Rust! : rust, 2020/9/29
Books
- Practical Machine Learning with Rust: Creating Intelligent Applications in Rust (English Edition), 2019/12/10, Joydeep Bhattacharjee
- Write machine learning algorithms in Rust
- Use Rust libraries for different tasks in machine learning
- Create concise Rust packages for your machine learning applications
- Implement NLP and computer vision in Rust
- Deploy your code in the cloud and on bare metal servers
- source code: Apress/practical-machine-learning-w-rust
Movie
- The /r/playrust Classifier: Real World Rust Data Science, RustConf 2016, 2016/10/05, Suchin Gururangan & Colin O'Brien
- Machine Learning is changing - is Rust the right tool for the job?, RustLab 2019, 2019/10/31, Luca Palmieri
- Using TensorFlow in Embedded Rust, 2020/09/29, Ferrous Systems GmbH, Richard Meadows
- Building AI Units in Rust, FOSSASIA 2018, 2018/3/25, Vigneshwer Dhinakaran
Paper
- End-to-end NLP Pipelines in Rust, Proceedings of Second Workshop for NLP Open Source Software (NLP-OSS), pages 20โ25 Virtual Conference, 2020/11/19, Guillaume Becquin
Thanks
Thanks for all the projects.
Please PR. Thanks.