MiniMind

jingyaogong.github.io

Train a ~64M-parameter LLM from scratch in about 2 hours on one GPU, with the full pipeline in plain PyTorch.

Pricing
Open source
Published
Nov 18, 2026

Next steps

What it does

MiniMind is an open-source project and tutorial for understanding large language models by building one. The main model has about 64M parameters, roughly 1/2700 the size of GPT-3, and the README reports that SFT runs one epoch in about 2 hours on a single RTX 3090 for around 3 RMB of GPU rent. All core algorithms are implemented from scratch in native PyTorch, covering dense and MoE structures aligned with the Qwen3 ecosystem, tokenizer, data cleaning, pretraining, SFT, LoRA, DPO, PPO/GRPO/CISPO, tool use, agentic RL and distillation. Sister projects cover vision (MiniMind-V) and omni models. Apache-2.0.

Use cases

  • Learn how an LLM works by training a ~64M-parameter model from scratch on a single consumer GPU
  • Study clean PyTorch implementations of pretraining, SFT, LoRA, DPO and RL methods such as PPO/GRPO
  • Use it as a teaching or course baseline for LLM classes and reproducible experiments

Frequently asked questions

What is MiniMind?
An open-source project that trains a tiny language model (about 64M parameters in the main version) from scratch, with the full training pipeline written in native PyTorch.
How long and how much does training take?
The README says the SFT stage runs one epoch in about 2 hours on a single NVIDIA 3090, costing roughly 3 RMB of rented GPU time.
What stages are covered?
Data cleaning, pretraining, SFT, LoRA, DPO, PPO/GRPO/CISPO, tool use, agentic RL, adaptive thinking and distillation, for dense and MoE structures.
Is it free?
Yes, Apache-2.0 licensed. There is an online demo on ModelScope.
Log in to join the discussion