To achieve true efficiency in AI, we must move away from 'CISC' (Complex Instruction Set Computing) frameworks like PyTorch toward a 'RISC' (Reduced Instruction Set Computing) model that treats neural networks as static, predictable operations.
In one sentence
The core thesis of tinygrad is that because neural networks are fundamentally static and predictable, we can achieve superior performance by stripping away the "Turing-complete" overhead of current frameworks to create a "RISC" architecture for machine learning.
Why read this (who it's for)
This is for ML engineers, systems architects, and AI researchers who feel the friction of current deep learning frameworks. It explains why current tools (like PyTorch) are often over-engineered for the specific needs of neural networks and provides a roadmap for building a more efficient, "bare-metal" software stack for the next generation of local and edge AI.
The big idea
George Hotz argues that the current state of ML frameworks is a victim of "Turing completeness." Because frameworks like PyTorch and XLA are designed to handle any possible computation (CISC), they rely on complex, power-hungry features like branch prediction, warp scheduling, and complex cache hierarchies to manage unpredictable execution.
However, neural networks are not "any" computation. They are primarily composed of ADD/MUL operations with static memory access patterns. Hotz argues that by intentionally making a framework less capable—by removing the ability to execute arbitrary, complex instructions—we can optimize at a much lower level. This "RISC" approach allows for extreme efficiency, such as operation fusing and better memory management, because the system knows exactly what the data will do before it even runs.
Key ideas
The RISC vs. CISC of ML
- What it is — CISC (Complex Instruction Set Computing) allows a single instruction to execute many low-level operations; RISC (Reduced Instruction Set Computing) limits instructions to single, low-level operations for faster execution.
- Why it matters — By treating tinygrad as a RISC system, we remove the overhead of complex instruction sets that aren't necessary for neural networks.
- In the book — Hotz compares current frameworks to Apple Silicon or the Raspberry Pi—systems that succeeded by being efficient and streamlined.
Turing Completeness as a Hindrance
- What it is — When a kernel is Turing-complete, you can no longer reason about its behavior, forcing a reliance on caching and branch prediction.
- Why it matters — Since neural networks only need ADD/MUL operations and rely on static memory access, we don't need Turing completeness. Removing it allows for optimizations at a much lower level.
- In the book — Hotz argues that CUDA is Turing-complete, and this is the primary differentiator tinygrad seeks to leverage for competitive advantage.
The "Developer Platform" Moat
- What it is — Hardware specs (TFLOPS) mean nothing if the developer experience is poor. NVIDIA's dominance is due to the CUDA developer platform, not just the chips.
- Why it matters — To compete, you cannot just build a faster chip; you must build a better framework for off-the-shelf hardware.
- In the book — Hotz points out that the AMD RX 7900 XTX offers incredible FLOPS per dollar, yet "nobody in ML uses it" because the developer platform isn't there.
Operation Fusing and Laziness
- What it is — "Laziness" in a framework allows the system to defer execution so it can perform "operation fusing."
- Why it matters — Fusing operations reduces the need to write intermediate results to memory, which is the primary bottleneck in modern computing.
- In the book — Hotz explains that because neural network loads are predictable (the same set of loads/stores every time), we can optimize the memory path in ways that "CPU-style" things with branches cannot.
The "Personal Compute Cluster"
- What it is — A shift toward local, high-performance AI hardware (the "tinybox") for individuals and businesses.
- Why it matters — While big models are for research labs, the real opportunity lies in optimizing for inference at the edge.
- In the book — Hotz describes the tinybox as a $15,000 "luxury AI computer" designed to run 65B FP16 LLaMA out of the box.
Frameworks & tools
The RISC-ML Design Principles
To build a high-performance ML framework, follow these principles:
- Strip Turing Completeness: Remove the ability to execute arbitrary instructions. Focus only on the ADD/MUL operations required for neural networks.
- Static Memory Planning: Leverage the fact that neural network data loads/stores are consistent. Optimize for static scheduling rather than dynamic warp scheduling.
- Operation Fusing: Use "lazy" evaluation to combine multiple operations into a single kernel to minimize memory bandwidth usage.
- Developer-First CI: Prioritize a great developer experience and a robust test suite (like
testops.py) where forwards and backwards matches are checked automatically.
Memorable examples & stories
The "Why is Relu a class?" Critique
Hotz criticizes PyTorch's API, noting that things like ReLU shouldn't be classes with state. He argues that the API isn't "perfectly refined," and for a "TinyGrad style" system, the API must be cleaner and more functional.
Lesson: A messy API is a symptom of a framework trying to do too much.
The AMD "Rabbit Hole"
Hotz describes his attempt to get PyTorch running on AMD hardware, where he found himself in "deep rabbit holes" of weird errors. He notes that while there are "only 10 guys" at AMD working on this, the sheer amount of man-hours invested in NVIDIA's CUDA makes the gap hard to close without a fundamental architectural shift.
Lesson: You cannot win by out-working a monopoly; you must out-think the architecture.
The "Personal" vs. "Research" Model
Hotz argues that while research labs want the biggest models possible, startups and individuals need to optimize for inference. He notes that the ratio of training to inference in the cloud is currently too low; there should be 10x to 100x more inference happening.
Lesson: Efficiency is the only way to make AI accessible at the edge.
Key quotes
"If you can’t write a fast ML framework for GPU, you can’t write one for your own chip."
Why it matters: It establishes the framework as the prerequisite for hardware success.
"Once you call in to Turing complete kernels, you can no longer reason about their behavior."
Why it matters: This is the technical justification for the RISC approach.
"The real truth is whenever a start, whenever a company is secretive, it's because they're hiding something that's not that cool."
Why it matters: A reminder to look for the simple, boring engineering reality behind "revolutionary" AI claims.
How to apply it
This week
- Audit your ML Stack: Identify where your current framework (PyTorch/TensorFlow) is adding unnecessary complexity or "Turing-complete" overhead to your specific model.
- Test for "Lossless" Conversions: If you are experimenting with quantization (like int4), perform a "round-trip" test: convert weights to int4, then back to FP16, and compare the difference to see exactly what information is lost.
Ongoing
- Prioritize Fusing: When designing new model architectures, think about how many operations can be fused into a single pass to save memory bandwidth.
- Think in "Persons of Compute": When evaluating AI progress, look at the raw compute throughput (PFLOPS) rather than just benchmark scores.
Common pitfalls
- The "100X" Trap: Be wary of startups claiming 100x improvements through "clockless" or "analog" computing. Hotz argues that while these might work in theory, the current EDA tools and human engineering constraints make them impractical.
- Over-reliance on Large Weights: Don't assume a bigger model is always better for your use case. If you are deploying to the edge, you want fewer weights and higher inference efficiency.
Connects to
- The Bitter Lesson (Rich Sutton): Hotz explicitly references this, emphasizing that the only thing that matters in the long run is the scale of compute and the ability to learn from it.
- Moloch (Naval Ravikant): Referenced in the context of the systemic incentives in the AI race.
If you remember only three things
- Neural networks are static: Because they are, we can strip away the complex "CISC" features of current frameworks to gain massive efficiency.
- The "RISC" approach: By removing Turing-complete kernels, we can optimize at a lower level (operation fusing, static scheduling).
- Developer Platform is the Moat: Success in AI hardware isn't just about TFLOPS; it's about the developer experience and the software stack.
Internalize it
-
Reflection questions
- If my current ML project were stripped of all "extra" features, what is the absolute minimum set of operations it needs to run?
- How much of my current "training" is actually just "inference" in disguise (e.g., LoRA)?
- Am I choosing a model because it's the "best" research benchmark, or because it's the most efficient for my specific deployment?
-
Flashcards
Q: What is the difference between CISC and RISC in the context of tinygrad?
A: CISC (Complex Instruction Set Computing) allows one instruction to do many low-level operations; RISC (Reduced Instruction Set Computing) limits instructions to single, low-level operations for faster, more efficient execution.
Q: Why does Hotz argue against Turing-complete kernels in ML?
A: Because Turing-complete kernels are harder to reason about, forcing a reliance on complex branch prediction and warp scheduling that isn't necessary for the static ADD/MUL operations of neural networks.
Q: What is "operation fusing"?
A: It is the process of combining multiple operations into a single kernel to reduce the need to write intermediate results to memory, thereby saving memory bandwidth.
Q: What is the "Personal Compute Cluster" (tinybox)?
A: A $15,000 local AI computer designed for high-performance inference and training, capable of running 65B FP16 LLaMA out of the box.
Q: What is the "Bitter Lesson"?
A: A concept (referenced by Hotz) that the only thing that ultimately matters in AI is the ability to scale with more compute.
Fidelity note
Confidence is high. The summary is grounded strictly in the provided transcript. Note that some specific technical details (like the exact number of engineers at AMD) are presented as Hotz's estimates/observations during the conversation and should be verified against current industry data. The "tinybox" specs are directly from the provided text.