Train a 64M language model from scratch in 2 hours
MiniMind removes the library abstractions hiding how LLM training works, letting engineers read and run every stage from pretraining to RLHF on one consumer GPU for about $3.
MiniMind is an open-source project that lets anyone train a tiny language model, a 64-million-parameter program that generates text, entirely from scratch. Unlike typical tutorials that stop at the first training step, it covers the whole journey: cleaning data, training, human-preference tuning, and tool use. Everything runs on a single NVIDIA 3090 graphics card in about two hours, costing roughly three dollars in rental fees. It is a learning resource, not a deployable model.
MiniMind is an Apache 2.0 open-source teaching project that trains a 64-million-parameter language model, about 1/2700th the size of GPT-3, on a single NVIDIA 3090 in two hours for roughly 3 yuan in GPU rental. It costs almost nothing to explore, but the output model is far too small for any production use. Its value is as a low-cost training resource for teams wanting to understand the full LLM pipeline, not as a product.
MiniMind trains a 64M-parameter transformer from scratch in native PyTorch with no transformers, trl, or peft dependencies. The pipeline covers pretraining, SFT, LoRA, DPO-based RLHF, PPO/GRPO/CISPO RLAIF, tool use, agentic RL, adaptive reasoning, and distillation. The headline claim is precisely scoped: one SFT epoch on a single RTX 3090, ~3 yuan rental. Variants include MiniMind-V (vision), MiniMind-O (omnimodal), MiniMind-dLM (diffusion), and MiniMind-Linear. Weights are on Hugging Face and ModelScope.