Every AI you have ever used arrived finished. MiniMind is the opposite: a free project on GitHub that hands you the empty workbench and walks you through training a small language model of your own, from the very first step to a chatbot you can talk to. Over 70,000 people have starred it, and the whole exercise takes about an afternoon.

Here is what it covers. You start with the tokenizer, the piece that chops text into pieces a model can count. Then pretraining, where the model reads millions of example sentences and learns to predict the next word, which is the same first step ChatGPT took. Then fine-tuning, where example conversations teach it to answer questions instead of just continuing text. After that come the optional stages the big labs use too: LoRA for cheap retraining, and reinforcement learning methods with names like DPO and GRPO. Every stage is written from scratch in plain PyTorch, the standard AI coding library, with no framework doing the interesting parts behind your back. The datasets are included, and when you finish you can chat with your model in a terminal or a simple web page.

The numbers are the hook. The project's own training table puts the mini path at about 2.3 hours in total on a single NVIDIA RTX 3090, a normal home graphics card: roughly 1.2 hours of pretraining plus 1.1 hours of fine-tuning, one pass through the data each. Renting that card for the run cost about 3 yuan, well under a dollar. The model you get has 64 million parameters, the working parts inside it, and the smallest published version has 26 million. For scale, GPT-3 has 175 billion, so your model is about one 2,700th of its size. The honest catch follows from that: it chats at a basic level, its training data leans Chinese so its English is weaker, and it will get facts wrong. Nobody is cancelling a subscription over it.

Why it matters

There is a widening gap between people who use AI through a chat box and people who understand what the box is doing. Training a tiny model yourself closes that gap faster than any explainer video, because every mysterious word in the field, tokens, weights, fine-tuning, turns into a file you wrote and a number you watched move. It is also the cheapest lab in AI: a borrowed graphics card, a free download, and an afternoon. What you keep afterwards is not the little chatbot. It is the mental model, and that is the part that transfers to every bigger system you will ever build, buy, or be interviewed about.

Sources: the MiniMind repository on GitHub (stars, forks, license, training cost table and model list read on November 25, 2026) and explainx.ai's MiniMind training walkthrough.

Go deeper

Training a model from scratch is pretraining, fine-tuning, and evaluation working together, the same pieces the course teaches hands on. The full interactive course, 11 chapters free, no signup, is at deployedlab.dev.

← All the latest in AI