
Minimal GPT-style language model implemented entirely in Rust with Candle, Hugging Face's ML framework. The project rebuilds the complete Transformer architecture (multi-head attention, feed-forward networks, layer normalization, token and positional embeddings) with character-level tokenization and temperature-controlled autoregressive generation. Every component is documented to understand how modern LLMs work under the hood. No Python dependencies, just a single binary, from training to text generation.
Complete Transformer architecture (from scratch)
Multi-head attention and feed-forward networks
Character-level tokenization
Temperature-controlled autoregressive generation
Training loop and backpropagation
100% Rust, single binary, no Python
Optional GPU support (CUDA / Metal)
Deeply understanding how large language models work internally by rebuilding a GPT-style Transformer from scratch, without relying on the usual Python ecosystem. The challenge was to reimplement every mathematical building block (multi-head attention, residual connections, layer normalization, loss computation and backpropagation) in a statically typed systems language, while keeping the code readable and educational rather than over-optimized.
Reimplementing the full GPT architecture (attention, FFN, normalization) block by block
Building character-level tokenization and token & positional embeddings
Coding the training loop with backpropagation and temperature-based autoregressive generation
Mastering Candle and the Rust toolchain for a single binary with no Python dependency
Complete implementation in Rust with Candle, Hugging Face's ML framework, structured into clear modules, the tokenizer (character-level), the model (Transformer architecture) and the training loop. Every component (token and positional embeddings, attention blocks, FFN, output head) is written explicitly and commented. Text generation is autoregressive with temperature-controlled sampling. It all compiles into a single binary exposing a CLI to train and generate, with optional GPU support (CUDA / Metal).
Rust
Language
100% Rust, no Python
~500K
Parameters
Default model
4
Layers
Transformer blocks
4
Attention heads
Multi-head attention
1
Developer
Solo project
Reimplementing a Transformer from scratch anchors the concepts of attention, embeddings and backpropagation far more solidly than using a high-level library
Candle offers a credible alternative to PyTorch for inference and training, with Rust's typing and performance guarantees
On an educational project, explicit and commented code is worth more than a fast but opaque implementation

Secure, GDPR-compliant identity provider written in Rust, enabling single sign-on via OAuth 2.1 / OpenID Connect and controlled sharing of personal data with third-party applications.

French platform for pet adoption, geolocated lost/found reporting and a directory of certified pet boarding facilities, built with a .NET API, PostGIS matching and web & mobile apps.

Modern restaurant reservation web application developed with React and Redux state management.