femtoGPT
femtoGPT is a minimal generative pretrained Transformer (GPT) project implemented in pure Rust, supporting inference and training of GPT-style language models on CPU and GPU. The project implements tensor processing logic and training/inference code from scratch, and its architecture is very similar to Andrej Karpathy's nanoGPT. It depends only on random generation libraries (rand/rand-distr), data serialization libraries (serde/bincode), and a parallel computing library (rayon), making it suitable for learners who want to deeply understand the underlying working principles of large language models. The project explicitly states that it runs extremely slowly, that most basic operations (such as matrix multiplication) use the simplest implementation, and that gradient correctness is verified through gradient checking methods, but some layer implementations may still contain errors.