Rust for AI: Rust Programming for AI Engineers, High-Performance Computing, Memory Safety, Systems Programming, and Building Fast AI Tooling with Rust

fatima ahmad
Ebook
60
Pages
Eligible

About this ebook

Python runs the AI lab. Rust runs the AI infrastructure. This book teaches you to build the infrastructure.Every major AI framework has a dirty secret: the fast parts are not written in Python. NumPy's array operations, PyTorch's tensor kernels, HuggingFace's tokenizers — the code that actually runs at speed is C++, CUDA, or increasingly, Rust. The Python you write is the interface. The Rust underneath is what makes it fast.Rust for AI is the complete guide for AI engineers who are ready to move from calling the fast layer to building it — the guide to writing the tokenizers, the inference servers, the data pipelines, and the model serving infrastructure that production AI systems run on.Inside this book you will find:Twenty chapters organized across five sections covering everything an AI engineer needs to build production-grade systems in Rust. The foundations section covers ownership and borrowing for zero-copy tensor access, fearless concurrency with Rayon and Tokio, and the data structures that AI pipelines are built from. The numerical computing section covers ndarray for NumPy-style array operations, SIMD auto-vectorization for maximum CPU throughput, and GPU computing with CUDA through the cudarc crate. The machine learning section covers building neural networks from scratch, loading and running HuggingFace models with Candle, training with the Burn framework, and ONNX Runtime inference with CUDA acceleration. The AI tooling section covers Polars for lightning-fast data processing, Parquet pipelines for terabyte-scale datasets, BPE tokenizer implementation from scratch, and PyO3 for embedding Rust directly into Python AI stacks. The production systems section covers building inference APIs with Axum, async workloads with Tokio, streaming LLM token output with SSE, and running quantized models in the browser with WebAssembly.Every chapter includes working, copy-paste-ready Rust code organized around the specific patterns that production AI systems actually use — not toy examples but the implementations that handle real data at real scale.The AI engineers building the next generation of infrastructure are choosing Rust. This book is the complete guide to joining them.By Fatima Ahmad. Available on Google Play Books.
Python runs the AI lab. Rust runs the AI infrastructure. This book teaches you to build the infrastructure.Every major AI framework has a dirty secret: the fast parts are not written in Python. NumPy's array operations, PyTorch's tensor kernels, HuggingFace's tokenizers — the code that actually r...

Discover more

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.