j4orz / teenygrad
a teaching deep learning framework: the bridge from micrograd to tinygrad
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing j4orz/teenygrad in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewThe teaching deep learning framework for the SITP textbook. *train nanogpt by building teenygrad in Python and Rust — the bridge from micrograd to tinygrad* --- Installation Graph Mode graph mode (developed in part 3 of the book) is a pure Python Tensor compiler. Eager Mode eager mode (developed in part 1 and 2 of the book) has a mixed source of Python, Rust, and CUDA Rust in order to support CPU and GPU acceleration. The Python to Rust interop is implemented using CPython Extension Modules via , with the shared object files compiled by driving via PyO3's build tool . **CPU kernels (x86/ARM)** • CPU kernels do not use the docker container (for now). **GPU kernels (PTX)** To enable GPU acceleration, teenygrad uses CUDA Rust, which in turn requires a specific version matrix required (notably an old version of LLVM) and so CUDA Rust's provided docker containers and shell scripts are used. • Install NVIDIA Container Toolkit on your machine • Run the following in your shell: • Point to the Rust and CUDA Rust source: