Introduction
Rust has been known for its performance and memory/thread safety. However, it takes an ecosystem to be successful. So far, Rust has found
a lot of success in network programming and bit coin mining. Rust has an excellent support for async
making it a great language any time
we need distributed systems.
For the reason, Rust has found a lot of success in vector databases.
Vector Databases
There are several start-up companies that are building vector databases using Rust: Pinecone, Qdrant and Fennel.ai.
Const generics
Rust has an interesting feature called const generics that is uniquely suitable for vector databases. Const generics are generic arguments that range over constant values, rather than types or lifetimes. This allows, for instance, types to be parameterized by integers. The follow are some examples of const generics:
|
|
Frameworks
Rust has been growing in machine learning frameworks as well, for example, Hugging Face candle and burn-rs. Each of these frameworks can only run some models. For example, for candle
, candle-whisper and candle-llama2 and for burn
, whisper-burn and llama2-burn.
These frameworks can work in spacial cases where frameworks like PyTorch
are too large. For example, Candle’s core goal is to make serverless inference
possible.
This frameworks gave proof that Rust is a viable language for machine learning. They also built-up an ecosystem of Rust libraries that could be very useful for other Rust projects, for example, tch-rs. Hugging Face also has several tools developed in Rust.
References
I have only touched a small part of machine learning in Rust. For more comprehensive reviews, please check out the following references:
Last modified on 2023-09-04