Section 01
Introduction: Toy — A Zero-Dependency Native Ruby Neural Network Framework
Toy is a Transformer language model framework written in Ruby. Compiled to native binaries via Spinel, it has zero external dependencies and supports CPU, CUDA, and Metal backends. It can run HuggingFace models and produces bitwise identical outputs to PyTorch. Its core design philosophy is "readable machine learning", with clean and intuitive code that balances functional completeness and understandability.