MiniMind trains a 64M-parameter model from scratch for 3 yuan in 2 hours
MiniMind is an Apache 2.0 open-source project that implements a roughly 64M-parameter tiny language model from scratch in native PyTorch code, with a full tutorial. It covers pretraining, supervised fine-tuning (SFT), LoRA, preference alignment (DPO), reinforcement learning (PPO/GRPO and others), tool calling and model distillation, with core algorithms not relying on third-party high-level wrappers. The author's cost figures: one SFT epoch on a single NVIDIA 3090 takes about 2 hours, around 3 yuan in GPU rental; the model is about 1/2700 the size of GPT-3. Branches include a vision version MiniMind-V and a multimodal version MiniMind-O; weights are on Hugging Face and ModelScope, with an online demo. The author notes that 0.1B-level models hit sparse-reward problems on general reasoning tasks, gives no benchmark numbers against mainstream models, and says it is not suitable for production.
Training a language model usually goes through three stages: pretraining (learning to predict the next word from huge amounts of text), supervised fine-tuning (teaching it to converse using question-answer data) and preference alignment (adjusting outputs using human preferences or reward signals). In industry these steps are often wrapped inside frameworks. MiniMind's value is that it takes these steps apart and reruns them with a small amount of data and single-GPU compute, so readers can see what the code and data look like at each step.
For beginners, this means not having to apply for a compute cluster first: one consumer-grade graphics card, a few hours and a few yuan are enough to go through the whole pipeline, which suits validating a data pipeline or teaching demos. But a 64M-parameter model has limited ability, and the author also warns that on tasks like mathematical reasoning the reward is almost always zero and reinforcement learning struggles to learn anything, so it cannot replace any production model. Anyone who wants to experiment on top of it needs to prepare their own data and evaluation methods.