talira

tinygrad

Small, hackable deep learning framework and compiler, between PyTorch and micrograd

open sourceMITfree

tinygrad is an end-to-end deep learning stack kept intentionally small and hackable: a tensor library with autograd, an IR and compiler that fuse and lower kernels, JIT and graph execution, and nn, optim and datasets for real training. It takes PyTorch's eager Tensor API, JAX-style IR-based autodiff and TVM-style scheduling, and its whole compiler is readable. It runs on OpenCL, CPU, Metal, CUDA, AMD, NV, Qualcomm and WebGPU, and a new accelerator needs only about 25 low-level ops. It's maintained by tiny corp.

Problems it solves

  • a deep learning framework small enough to read the whole compiler
  • train a neural network on an AMD or Apple GPU without CUDA
  • add support for a new accelerator to a deep learning framework with only a few low-level ops

Alternatives

The same job

These do what tinygrad does.

  1. PyTorch Tensors and dynamic neural networks in Python with strong GPU acceleration
  2. JAX Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more
  3. TensorFlow An Open Source Machine Learning Framework for Everyone
  4. MLX An array framework for Apple silicon
  5. Keras Deep Learning for humans

Compare tinygrad with the top 3