Skip to content
Proyectos

4thd1m/asitpofborscht

Ver en GitHub

Acerca de

the hacker’s whirlwind tour to deep learning alchemy and deep learning systems

IA y aprendizaje automático

Cómo se miden estas cifras

Crecimiento 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

Original

asitpofborscht

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.

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.

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

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 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 6. Abstracted Accelerated Tensor
  • File ?? From borscht.Tensor to torch.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 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 10. Hello Convolutional Neural Network
  • File 11. Hello Recurrent Neural Network
  • File 12. Hello Transformer
  • File ??. From borscht.nn to torch.nn
  • File ??. From borscht.optim to torch.optim
  • File ??. From borscht.autograd to torch.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 beets to quack and flash-attention

Part IV: From Interpreters to Compilers (bt2)

Part V: Runtimes (bllm)

  • File ??. Hello Inference Engine
  • File ??. From bllm to vllm

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…