ml-by-hand
A deep learning library built from numpy primitives that supports LLM post-training techniques such as supervised fine-tuning (SFT) and reinforcement learning with GRPO. It is developed from scratch without high-level abstractions as a learning exercise, building the wheel and then using that wheel to build the car.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
ml-by-hand
A deep learning library built from numpy primitives that supports LLM post-training techniques such as supervised fine-tuning (SFT) and reinforcement learning with GRPO. It is developed from scratch without high-level abstractions as a learning exercise, building the wheel and then using that wheel to build the car.
Posted by @megadragon9 · Original source ↗
Source text · @megadragon9 · · Source ↗
I'm continuing to expand my own deep learning library [1] built with numpy-primitives to support LLM post-training techniques like supervised fine-tuning (SFT) and reinforcement learning with GRPO.
ml-by-hand
A from-scratch deep learning library built with Python and Numpy as a PyTorch clone, being expanded to support LLM post-training techniques such as supervised fine-tuning (SFT) and reinforcement learning with GRPO, written to work without high-level abstractions.
Posted by @megadragon9 · Original source ↗
Source text · @megadragon9 · · Source ↗
I'm continuing to expand my own deep learning library [1] (PyTorch-clone built with Python and Numpy) to support LLM post-training techniques like supervised fine-tuning (SFT) [2] and reinforcement learning with GRPO [3]
ml-by-hand
A machine learning library built entirely from scratch using only Python and NumPy, with an API similar to PyTorch and inspired by Andrej Karpathy's Micrograd. It is fully functional and can build and train classical CNNs as well as a toy GPT-2, designed to bridge the gap between mathematical formulas and high-level API calls so users can understand how models learn.
Problem: The author wanted to understand how models learn by bridging the gap between mathematical formulas and high-level API calls, believing beginners in machine learning should understand how these libraries work from the ground up before using high-level libraries like PyTorch and TensorFlow.
Audience: Beginners in machine learning who want to strip away abstractions and understand how libraries like PyTorch and TensorFlow work from the ground up.
Posted by @megadragon9 · Original source ↗
Source text · @megadragon9 · · Source ↗
I built a machine learning library [1] (similar to PyTorch's API) entirely from scratch using only Python and NumPy. It was inspired by Andrej Karpathy's Micrograd project [2]. I slowly added more functionality and evolved it into a fully functional ML library that can build and train classical CNNs [3] to even a toy GPT-2 [4].