Train a 64M language model from scratch in 2 hours
AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.
Why it matters
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.
Questions this answers
The article above answers these:
- how do I train a language model from scratch on one GPU?
- what does the full LLM training pipeline look like in code?
- how much does it cost to pretrain a small LLM?
Read the original
This summary exists to save you time, not to replace the source.
Key terms
MiniMind MiniMind-V MiniMind-O MiniMind-dLM MiniMind-Linear NVIDIA 3090 GPT-3
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Self-hosted YouTube client that falls back to SABR when side doors close
A self-hosted YouTube client lets users watch videos without Google accounts, ads, or tracking, keeping data local and enabling shared libraries across devices.
datasette-charts 0.4a0
Datasette now lets developers add custom chart types more easily, expanding visualisation options for data projects.
Speculative Decoding Makes Tool Calls Faster. Agents Need a Cache.
Speed improvements in speculative decoding mean agents can execute tool calls faster, reducing latency for real-time applications.
Node graph engine that runs big diffusion models on 4GB VRAM
ComfyUI's asynchronous weight streaming lets large diffusion models run on 4GB VRAM, meaning practitioners with modest GPUs no longer need expensive hardware for local image, video and audio generation.