Deep learning architectures, especially Transformers, often feel like black boxes, with core computations buried inside complex frameworks. Imagine being able to see every arithmetic operation of self-attention, backpropagation, and multi-head mechanisms laid out cell by cell in a spreadsheet — no Python, no hidden code, just formulas you can inspect and modify. That’s exactly what the ai-by-hand-excel repository offers.
What ai-by-hand-excel does
This repo is a pedagogical collection of Excel workbooks that implement fundamental components of deep learning models entirely using spreadsheet formulas. It covers the math behind operations like Softmax, backpropagation, dot products, and matrix multiplication, as well as full architectures such as ResNet, Autoencoders, Seq2Seq models, LSTMs, and Transformers.
Each Excel workbook exposes the raw arithmetic that normally runs under the hood in frameworks like PyTorch or TensorFlow. Instead of opaque code or libraries, you get a transparent, cell-by-cell walk-through of forward and backward passes. For example, the Transformer sheets break down self-attention and multi-head attention into explicit formulaic steps, letting engineers trace how queries, keys, and values combine to produce outputs.
The repo also includes recent additions like the DeepSeek Multi-head Latent Attention and Mixture of Experts as blank-sheet exercises, demonstrating how cutting-edge architectures can be built from scratch purely with spreadsheet logic.
Technically, this project is zero dependencies — just .xlsx files you open in Excel or compatible spreadsheet software. There’s no code, no scripts, no environment setup. The focus is strictly on pedagogy and mechanistic interpretability by making the math literally visible.
What makes this repository technically interesting
The standout feature is the complete implementation of deep learning primitives using only spreadsheet formulas. This is unusual because deep learning math typically lives in specialized libraries with optimized tensor operations. Here, the tradeoff is clarity and educational transparency at the cost of practicality for large-scale training or deployment.
By encoding operations like matrix multiplication and nonlinear activations directly as Excel formulas, the repo reveals the exact arithmetic flow of models. Engineers can watch a single cell’s formula and understand how inputs propagate forward or gradients flow backward.
This approach also sidesteps all dependencies and tooling complexity — no Python, no CUDA, no package installs. It’s pure arithmetic laid bare, helping those who want to understand or teach the fundamentals without abstraction layers.
However, the tradeoff is performance and scalability. Excel isn’t designed for heavy numerical workloads, so these workbooks are strictly for educational exploration, not production or research training. Also, while the formulas can become quite complex, the repo manages this with clear organization and documentation.
The code quality — or rather formula quality — is surprisingly clean and well-structured given the medium. Each workbook builds from basic operations to full architectures incrementally, making it easier to grasp how simple matrix math scales up to complex models.
Explore the project
Since there are no installation or command setup instructions, the best way to engage is to clone or download the repository and open the Excel files directly in your spreadsheet software.
Start with the basic operations sheets that implement core building blocks like dot products, matrix multiplication, and linear layers. These lay the foundation for understanding the more advanced architectures.
Next, browse through the Transformer sheets to see the full forward and backward passes of self-attention and multi-head attention implemented as formulas. Here you can trace the computations cell-by-cell and even experiment by changing inputs or parameters.
Additional resources include sheets implementing ResNet, Autoencoders, LSTMs, and the recent DeepSeek Multi-head Latent Attention and Mixture of Experts exercises. The README provides an overview of the workbook contents and how they relate to each other.
Because the repo uses standard Excel files, you can leverage your spreadsheet software’s auditing and formula tracing tools to dive deeper into any calculation path you want to understand.
Verdict
ai-by-hand-excel is a unique resource for engineers, educators, and AI enthusiasts who want to truly understand the arithmetic underpinnings of deep learning architectures — especially the Transformer family — without relying on black-box frameworks.
Its zero-code, formula-driven approach makes the complexity of models accessible and traceable at a granular level. This can be invaluable for teaching, debugging conceptual understanding, or researching mechanistic interpretability.
That said, the repo is not suited for production workflows, large datasets, or typical model training. Excel’s performance limitations and the complexity of formulas mean it’s primarily a learning and exploration tool.
If your goal is to get hands-on with the math inside deep learning models, especially if you want to trace forward and backward passes step-by-step, this repo is worth your time. It shines as a transparent window into the mechanics of AI that are usually hidden in code or frameworks.
Related Articles
- Understanding LLM internals: a hands-on guide to transformers and attention math — A curated repo breaking down large language model internals with numeric attention math, tokenization, and transformer a
- annotated_deep_learning_paper_implementations: annotated PyTorch implementations of key deep learning papers — This repo provides annotated PyTorch implementations of major deep learning papers with side-by-side explanations, aidin
- Dive into Deep Learning (D2L.ai) Chinese Edition: An interactive textbook bridging theory and code — Dive into Deep Learning Chinese edition offers an interactive, code-driven deep learning textbook in Python, integrating
- Building machine learning intuition through engineering analogies with thereisnospoon — There Is No Spoon offers a unique ML primer for software engineers, using physical analogies to build deep intuition for
- Hands-On Large Language Models: A practical, visual journey through LLM engineering — Explore the Hands-On Large Language Models repo, a Jupyter notebook-based practical guide from fundamentals to fine-tuni
→ GitHub Repo: ImagineAILab/ai-by-hand-excel ⭐ 6,114