4thd1m/asitpofborscht
Acerca de
the hacker’s whirlwind tour to deep learning alchemy and deep learning systems
IA y aprendizaje automáticoCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Originalasitpofborscht 
This repository hosts the https://sitp.ai textbook under ./sitp where you will train nanogpt
using the borscht teaching deep learning framework and then implement the framework itself.
While the SITP textbook spends a lot more time on intuition and motivation via visualizations, figures, and prose, you can get a condensed "just show me the code" version of the textbook by reading the literary programmed source below.

Deep Neural Networks
Deep neural networks you train throughout the SITP textbook, which are located in ./models:
Part I Age of Pre-history (1969-2001). From Software 1.0 Interlingua to Software 2.0 Embeddings
In which we learn the elements of differentiable neural-based programming of specifying a parameterized architecture, scoring such parameters with a measure, and optimizing the score all in the context of language modeling.
- Model 1: Bigram (Markov 1913), (Shannon 1948)
- Model 2: Discriminative Perceptron (Rosenblatt 1957), (Rumelhart et al., 1986)
- Model 3: Probabilistic Perceptron (Rosenblatt 1957), (Rumelhart et al., 1986)
- Model 4: Multilayer Peceptron (Bengio et al., 2003), (Mikolov et al., 2013)
Part II Age of Research (2012-2019). From Static to Dynamic Embeddings
In which we rediscover the various inductive biases explored during the resurgence of neural networks following (Krizhevsky et al., 2012)(), and internalizing the Bitter Lesson (Sutton 2019)
by seeing how truly simple the equations for model architectures of recurrence, convolution, and attention are.
- Model 5: Hello Recurrence (RNN) (Mikolov et al., 2010)
- Model 6: Hello Long Short-Term Memory (LSTM) (Graves et al., 2014)
- Model 7: Hello Gated Recurrence (GRU) (Cho 2014)
- Model 8: Hello Convolution (CNN) (van den Oord et al., 2016)
- Model 9: Hello Attention (ANN) (Graves et al, 2013), (Bahdanau et al., 2015), (Vaswani et al., 2017)
Part III Age of Scale (2019-2025). From Language Models to Large Language Models
In which we rediscover the post-training during the age of scale following (Hesness et al., 2017) and (Kaplan et al., 2020). We implement karpathy/mingpt and karpathy/nanogpt, and karpathy/nanochat
- Model 10: Hello Child (GPT-1 117M) Liu et al., 2018 (Radford et al., 2018)
- Model 13: Hello High School Student (GPT-2 1.5B (Radford et al., 2019)) via Llama-1/2 (Touvron et al., 2023), (Touvron et al., 2023)
- Model 14: Hello College Student (GPT-3 175B (Brown et al., 2020)) via Llama-3 (AI@Meta 2024)
- Model 15: Hello PhD Student (GPT-4 ~1.8T (OpenAI 2023)) via Whale v3/v4 (DeepSeek-AI 2025), (DeepSeek-AI 2026)
- Model 16: Hello Reasoner (o1/o3 (OpenAI 2024)) via Whale r1 (DeepSeek-AI 2025) and Kimi k1.5 (Kimi Team 2025)
- Model 17: Hello Expert (GPT-5 ~6-8T?)

Deep Learning Framework
Deep neural framework you both use and implement throughout the SITP textbook, located in ./borscht:
Ensure you have Python and Rust toolchains on your machine by running borscht/setup.sh in your shell.
Part I: From Arrays to NDArrays (borscht.Tensor)
In which we transition from software 1.0 arrays to software 2.0 ndarrays.
Want to read the textbook? See SITP Chapter 2. The Massively Parallel Tensor
- File 1. Hello borscht (
__init__.py) - File 2. Hello Tensor (
tensor_managed.py)) - File 3. Accelerate Tensor
- File 3A: Analysis: From Asymptotic Analysis of Growth to Empirical Measurement of Time (
tensor_nativecpu.py) - File 3B: Three Language Problem: From Virtual to Physical Machines (CPython API:
pyproject.tomlRust FFI:Cargo.toml) - File 3C: Optimization (GEMM1): From Rust to RISC-V (PyO3:
lib.rs,kernelscpu.rs)
- File 3A: Analysis: From Asymptotic Analysis of Growth to Empirical Measurement of Time (
- File 4. Accelerate+ Tensor
- File 4A: Analysis: From Asymptotic Analysis of RAM Roofline Analysis of Memory Hierarchies
- File 4B: Optimization (GEMM2): Loop Ordering
- File 4C: Optimization (GEMM3): Threaded
- File 5. Accelerate++ Tensor
- File 5A: Three Language Problem: From Latency-Oriented to Throughput-Oriented Machines (
tensor_nativegpu.py) - File 5B: Optimization (GEMM4): From Rust to CUDA Rust
kernelsgpu.rs
- File 5A: Three Language Problem: From Latency-Oriented to Throughput-Oriented Machines (
- File 6. Abstracted Accelerated Tensor
- File 6A:
Allocator,Storagetensor_native.py - File 6B:
Dispatcher,Iterator
- File 6A:
- File ?? From
borscht.Tensortotorch.Tensor
Part II: From Numerical Linear Algebra Library to Deep Learning Framework (borscht.nn, borscht.autograd, borscht.optim)
In which we add support for first-order gradient-based optimization via automatic differentiation.
Want to read the textbook? See SITP Chapter 4. The Engine of Automatic Differentiation
- File 7. Hello Neural Network
- File 7A. (
nn/module.py) - FIle 7B. (
nn/functional.py)
- File 7A. (
- File 8. Hello Autograd (
tensor_autograd.py)- File 8A. Adding Forward Ops
- File 8B. Adding Backward Ops
- File 9. Hello Optimizer
- File 9A.
borscht.optim
- File 9A.
- File 10. Hello Convolutional Neural Network
- File 11. Hello Recurrent Neural Network
- File 12. Hello Transformer
- File ??. From
borscht.nntotorch.nn - File ??. From
borscht.optimtotorch.optim - File ??. From
borscht.autogradtotorch.autograd
Part III: From CPU Kernels to GPU Kernels (beets)
In which we accelerate our kernel library to reach speed of light throughputs with tensor cores.
Want to read the textbook? See SITP Chapter 5. The Speed of Light
- File ??. From Volta (sm70) to Ampere (sm80)
- File ??. From Ampere (sm80) to Hopper (sm90)
- File ??. From Hopper (sm90) to Blackwell (sm100)
- File ??. From GPUs to TPUs
- File ??. From
beetstoquackandflash-attention
Part IV: From Interpreters to Compilers (bt2)
- File ??. Hello Tensor Compiler
- File ??. From
bortsch bynamoandborscht binductortotorch dynamoandtorch inductor
Part V: Runtimes (bllm)
- File ??. Hello Inference Engine
- File ??. From
bllmtovllm
License
Following GPU MODE, this project is licensed under the June 9 Researcher Reciprocity License.
The license adapts the Open RAIL-S structure and adds one specific use restriction: training, fine-tuning, distillation, synthetic-data generation for training, embedding for training, or otherwise using this project to improve an AI model or AI service requires Researcher Reciprocity.
If you train on it, you let us generate.
Covered AI model and service providers may not use this project while imposing terms that prevent SITP and borscht project contributors, or authorized researchers from generating outputs, evaluating models, benchmarking, publishing research, or exploring their own research ideas on materially equal terms to ordinary users.
Explorar proyectos relacionados
Cargando…